From 4f4f4c7820845e2430c0afefba97250973aa3886 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 22 Jan 2013 14:51:38 +0000 Subject: Moved some basic units to RTL Added video, mouse and keyboard from MorphOS, complete rewrite Keyboard, better key handling changed all calls to CDECL bring FP-IDE to life git-svn-id: http://svn.freepascal.org/svn/fpc/branches/aros@23493 3ad0048d-3df7-0310-abae-a5850022a9f2 --- ide/fp.pas | 2 +- ide/fpdebug.pas | 2 +- ide/fpide.pas | 16 +- ide/fpmdebug.inc | 3 + ide/fpredir.pas | 20 +- ide/fpusrscr.pas | 6 +- ide/fputils.pas | 6 +- ide/fpviews.pas | 11 +- ide/globdir.inc | 3 + ide/wconsole.pas | 4 + ide/whelp.pas | 6 +- ide/wresourc.pas | 3 + ide/wutils.pas | 19 +- packages/arosunits/Makefile.fpc | 4 +- packages/arosunits/src/agraphics.pas | 4338 ----------------------- packages/arosunits/src/amigados.pas | 4560 ------------------------ packages/arosunits/src/asl.pas | 16 +- packages/arosunits/src/diskfont.pas | 14 +- packages/arosunits/src/exec.pas | 2699 --------------- packages/arosunits/src/gadtools.pas | 16 +- packages/arosunits/src/inputevent.pas | 285 -- packages/arosunits/src/intuition.pas | 6090 --------------------------------- packages/arosunits/src/keymap.pas | 170 - packages/arosunits/src/layers.pas | 568 --- packages/arosunits/src/longarray.pas | 73 - packages/arosunits/src/mui.pas | 50 +- packages/arosunits/src/pastoc.pas | 131 - packages/arosunits/src/tagsarray.pas | 117 - packages/arosunits/src/timer.pas | 145 - packages/arosunits/src/utility.pas | 772 ----- rtl/aros/Makefile | 972 +----- rtl/aros/Makefile.fpc | 5 +- rtl/aros/agraphics.pas | 4338 +++++++++++++++++++++++ rtl/aros/amigados.pas | 4123 ++++++++++++++++++++++ rtl/aros/dos.pp | 67 +- rtl/aros/exec.pas | 2699 +++++++++++++++ rtl/aros/i386/doslibf.inc | 72 +- rtl/aros/i386/execd.inc | 1 - rtl/aros/i386/execf.inc | 51 +- rtl/aros/i386/prt0.as | 73 +- rtl/aros/i386/utilf.inc | 4 +- rtl/aros/inputevent.pas | 285 ++ rtl/aros/intuition.pas | 6090 +++++++++++++++++++++++++++++++++ rtl/aros/keyboard.pp | 469 +++ rtl/aros/keymap.pas | 170 + rtl/aros/layers.pas | 486 +++ rtl/aros/longarray.pas | 73 + rtl/aros/mouse.pp | 61 + rtl/aros/pastoc.pas | 131 + rtl/aros/sysdir.inc | 105 +- rtl/aros/sysfile.inc | 481 +-- rtl/aros/sysos.inc | 1 - rtl/aros/system.pp | 16 +- rtl/aros/sysutils.pp | 82 +- rtl/aros/tagsarray.pas | 117 + rtl/aros/timer.pas | 145 + rtl/aros/utility.pas | 772 +++++ rtl/aros/video.pp | 656 ++++ rtl/aros/videodata.inc | 281 ++ 59 files changed, 21621 insertions(+), 21354 deletions(-) delete mode 100644 packages/arosunits/src/agraphics.pas delete mode 100644 packages/arosunits/src/amigados.pas delete mode 100644 packages/arosunits/src/exec.pas delete mode 100644 packages/arosunits/src/inputevent.pas delete mode 100644 packages/arosunits/src/intuition.pas delete mode 100644 packages/arosunits/src/keymap.pas delete mode 100644 packages/arosunits/src/layers.pas delete mode 100644 packages/arosunits/src/longarray.pas delete mode 100644 packages/arosunits/src/pastoc.pas delete mode 100644 packages/arosunits/src/tagsarray.pas delete mode 100644 packages/arosunits/src/timer.pas delete mode 100644 packages/arosunits/src/utility.pas create mode 100644 rtl/aros/agraphics.pas create mode 100644 rtl/aros/amigados.pas create mode 100644 rtl/aros/exec.pas create mode 100644 rtl/aros/inputevent.pas create mode 100644 rtl/aros/intuition.pas create mode 100644 rtl/aros/keyboard.pp create mode 100644 rtl/aros/keymap.pas create mode 100644 rtl/aros/layers.pas create mode 100644 rtl/aros/longarray.pas create mode 100644 rtl/aros/mouse.pp create mode 100644 rtl/aros/pastoc.pas create mode 100644 rtl/aros/tagsarray.pas create mode 100644 rtl/aros/timer.pas create mode 100644 rtl/aros/utility.pas create mode 100644 rtl/aros/video.pp create mode 100644 rtl/aros/videodata.inc diff --git a/ide/fp.pas b/ide/fp.pas index 37a24b54bc..9dafe80d60 100644 --- a/ide/fp.pas +++ b/ide/fp.pas @@ -318,7 +318,7 @@ procedure InitCompilerSwitches; page is not available before video is initialized. (And only in certain circumstances after that, so, use a plain ascii character as bullet on Unix.)} -{$if defined(unix) or defined(amiga) or defined(morphos)} +{$if defined(aros) or defined(unix) or defined(amiga) or defined(morphos)} const bullet='*'; {$else} const bullet='þ'; diff --git a/ide/fpdebug.pas b/ide/fpdebug.pas index a02026d3ef..fbf63a1388 100644 --- a/ide/fpdebug.pas +++ b/ide/fpdebug.pas @@ -580,7 +580,7 @@ function OSFileName(st : string) : string; var i : longint; {$endif Unix} begin -{$ifdef Unix} +{$if defined(Unix) or defined(aros)} OSFileName:=st; {$else} {$ifdef Windows} diff --git a/ide/fpide.pas b/ide/fpide.pas index f96e651593..22b1d4fdda 100644 --- a/ide/fpide.pas +++ b/ide/fpide.pas @@ -380,6 +380,8 @@ resourcestring menu_local_gotosource = '~G~oto source'; menu_key_edit_copy_microsoft = menu_key_common_copy_microsoft; menu_key_edit_paste_microsoft = 'Ctrl+V'; menu_key_edit_clear = 'Ctrl+Del'; + menu_key_edit_all_microsoft = 'Ctrl+A'; + menu_key_edit_all_borland = ''; menu_key_run_run = 'Ctrl+F9'; menu_key_run_stepover = 'F8'; @@ -878,7 +880,7 @@ begin NewItem(menu_edit_copy,menu_key_edit_copy, copy_key, cmCopy, hcCut, NewItem(menu_edit_paste,menu_key_edit_paste, paste_key, cmPaste, hcPaste, NewItem(menu_edit_clear,menu_key_edit_clear, kbCtrlDel, cmClear, hcClear, - NewItem(menu_edit_selectall,'', kbNoKey, cmSelectAll, hcSelectAll, + NewItem(menu_edit_selectall,menu_key_edit_all, all_key, cmSelectAll, hcSelectAll, NewItem(menu_edit_unselect,'', kbNoKey, cmUnselect, hcUnselect, NewLine( NewItem(menu_edit_showclipboard,'', kbNoKey, cmShowClipboard, hcShowClipboard, @@ -1041,20 +1043,24 @@ begin menu_key_edit_cut:=menu_key_edit_cut_microsoft; menu_key_edit_copy:=menu_key_edit_copy_microsoft; menu_key_edit_paste:=menu_key_edit_paste_microsoft; + menu_key_edit_all:=menu_key_edit_all_microsoft; menu_key_hlplocal_copy:=menu_key_hlplocal_copy_microsoft; cut_key:=kbCtrlX; copy_key:=kbCtrlC; paste_key:=kbCtrlV; + all_key:=kbCtrlA; end; ekm_borland: begin menu_key_edit_cut:=menu_key_edit_cut_borland; menu_key_edit_copy:=menu_key_edit_copy_borland; menu_key_edit_paste:=menu_key_edit_paste_borland; + menu_key_edit_all:=menu_key_edit_all_microsoft; menu_key_hlplocal_copy:=menu_key_hlplocal_copy_borland; cut_key:=kbShiftDel; copy_key:=kbCtrlIns; paste_key:=kbShiftIns; + all_key:=kbNoKey; end; end; loadmenubar; @@ -1558,6 +1564,12 @@ begin ErrFile:='stderr'; ExecuteRedir(ProgramPath,Params,InFile,OutFile,ErrFile); end; +{$ifdef aros} + end else + begin + DosExecute(ProgramPath, Params); + end; +{$else} {$ifndef Unix} end else if (InFile='') and (OutFile='') and (ErrFile='') then @@ -1570,7 +1582,7 @@ begin InFile,OutFile,ErrFile); end; {$endif Unix} - +{$endif} {$ifdef Unix} if (DebuggeeTTY='') and (OutFile='') and (ExecType<>exDosShell) then begin diff --git a/ide/fpmdebug.inc b/ide/fpmdebug.inc index 8cad30cb25..31ad91de7e 100644 --- a/ide/fpmdebug.inc +++ b/ide/fpmdebug.inc @@ -82,6 +82,9 @@ var Event : TEvent; ev : TMouseEvent; Clear : Boolean; begin + {$ifdef aros} + Exit; + {$endif} if UserScreen=nil then begin ErrorBox(msg_userscreennotavailable,nil); diff --git a/ide/fpredir.pas b/ide/fpredir.pas index a257272d0f..f3e47c1cd9 100644 --- a/ide/fpredir.pas +++ b/ide/fpredir.pas @@ -95,10 +95,13 @@ Uses baseunix, unix, {$endif unix} +{$ifdef aros} + SysUtils, +{$endif} dos; Const -{$ifdef UNIX} +{$if defined(UNIX) or defined(aros)} DirSep='/'; listsep = [';',':']; exeext = ''; @@ -270,8 +273,12 @@ end; function CompleteDir(const Path: string): string; begin { keep c: untouched PM } + {$ifdef aros} + if (Path<>'') and (Path[Length(Path)]<>DirSep) then + {$else} if (Path<>'') and (Path[Length(Path)]<>DirSep) and (Path[Length(Path)]<>':') then + {$endif} CompleteDir:=Path+DirSep else CompleteDir:=Path; @@ -627,8 +634,12 @@ end; function CompleteDir(const Path: string): string; begin { keep c: untouched PM } + {$ifdef aros} + if (Path<>'') and (Path[Length(Path)]<>DirSep) then + {$else} if (Path<>'') and (Path[Length(Path)]<>DirSep) and (Path[Length(Path)]<>':') then + {$endif} CompleteDir:=Path+DirSep else CompleteDir:=Path; @@ -786,6 +797,12 @@ end; {............................................................................} +{$ifdef aros} + procedure DosExecute(ProgName, ComLine : String); + begin + Dos.Exec(Progname, ComLine); + end; +{$else} procedure DosExecute(ProgName, ComLine : String); {$ifdef Windows} var @@ -834,6 +851,7 @@ end; end; {$endif CPU86} End; +{$endif aros} {***************************************************************************** Initialize diff --git a/ide/fpusrscr.pas b/ide/fpusrscr.pas index 92e03b9f36..740e253675 100644 --- a/ide/fpusrscr.pas +++ b/ide/fpusrscr.pas @@ -85,6 +85,10 @@ type {$IFDEF MORPHOS} {$DEFINE AMIGASCREEN} {$ENDIF} +{$IFDEF AROS} + {$DEFINE AMIGASCREEN} +{$ENDIF} + {$IFDEF AMIGASCREEN} PAmigaScreen = ^TAmigaScreen; @@ -1572,7 +1576,7 @@ begin UserScreen:=New(PNWLScreen, Init); {$else} {$ifdef AMIGASCREEN} - UserScreen:=nil; //New(PAmigaScreen, Init); + UserScreen:=New(PAmigaScreen, Init); {$else} UserScreen:=New(PScreen, Init); {$endif AMIGASCREEN} diff --git a/ide/fputils.pas b/ide/fputils.pas index 1000e86570..007e46455a 100644 --- a/ide/fputils.pas +++ b/ide/fputils.pas @@ -21,7 +21,7 @@ uses Objects; const dirsep = System.DirectorySeparator; -{$ifdef Unix} +{$if defined(Unix) or defined(aros)} listsep = [';',':']; exeext = ''; pasext = '.pas'; @@ -113,8 +113,12 @@ begin for i:=1 to length(s) do if s[i] in ['/','\'] then s[i]:=DirSep; +{$ifdef aros} if (length(s)>0) and (s[length(s)]<>DirSep) and (s[length(s)]<>':') then +{$else} + if (length(s)>0) and (s[length(s)]<>DirSep) then +{$endif} s:=s+DirSep; if (not allowdot) and (s='.'+DirSep) then s:=''; diff --git a/ide/fpviews.pas b/ide/fpviews.pas index 43e0e7bc75..e5f22c46ca 100644 --- a/ide/fpviews.pas +++ b/ide/fpviews.pas @@ -511,6 +511,7 @@ const menu_key_common_copy_borland = 'Ctrl+Ins'; menu_key_edit_copy_microsoft = menu_key_common_copy_microsoft; menu_key_edit_paste_microsoft = 'Ctrl+V'; menu_key_edit_clear = 'Ctrl+Del'; + menu_key_edit_all_borland = ''; menu_key_common_helpindex = 'Shift+F1'; menu_key_common_topicsearch = 'Ctrl+F1'; @@ -530,11 +531,12 @@ const menu_key_common_copy_borland = 'Ctrl+Ins'; const menu_key_edit_cut:string[63]=menu_key_edit_cut_borland; menu_key_edit_copy:string[63]=menu_key_edit_copy_borland; menu_key_edit_paste:string[63]=menu_key_edit_paste_borland; + menu_key_edit_all:string[63]=menu_key_edit_all_borland; menu_key_hlplocal_copy:string[63]=menu_key_hlplocal_copy_borland; cut_key:word=kbShiftDel; copy_key:word=kbCtrlIns; paste_key:word=kbShiftIns; - + all_key:word=kbNoKEy; procedure RegisterFPViews; implementation @@ -4384,10 +4386,17 @@ var P: PVideoMode; begin P:=Item; S:=IntToStr(P^.Col)+'x'+IntToStr(P^.Row)+' '; + {$ifdef aros} // color flag is used in Aros for mark on a seperate window + if P^.Color then + S:=S+'window' + else + S:=S+'screen'; + {$else} if P^.Color then S:=S+'color' else S:=S+'mono'; + {$endif} GetText:=copy(S,1,MaxLen); end; diff --git a/ide/globdir.inc b/ide/globdir.inc index 3e8afe1ae0..ad39893e92 100644 --- a/ide/globdir.inc +++ b/ide/globdir.inc @@ -98,6 +98,9 @@ {$ifdef MorphOS} {$define FSCaseInsensitive} {$endif} +{$ifdef aros} + {$define FSCaseInsensitive} +{$endif} { --- Exclude debugger support --- } {.$DEFINE NODEBUG} diff --git a/ide/wconsole.pas b/ide/wconsole.pas index cf1906eda7..aa8ed821c3 100644 --- a/ide/wconsole.pas +++ b/ide/wconsole.pas @@ -43,6 +43,10 @@ interface {$ifdef morphos} longint {$endif morphos} +{$ifdef aros} + longint +{$endif aros} + ; Procedure SaveConsoleMode(var ConsoleMode : TConsoleMode); Procedure RestoreConsoleMode(const ConsoleMode : TConsoleMode); diff --git a/ide/whelp.pas b/ide/whelp.pas index 4c35cbd4eb..ef17704ed1 100644 --- a/ide/whelp.pas +++ b/ide/whelp.pas @@ -316,7 +316,11 @@ begin GetDosTicks := -1; end; {$endif} - +{$ifdef aros} +begin + GetDosTicks := -1; +end; +{$endif} procedure DisposeRecord(var R: TRecord); begin diff --git a/ide/wresourc.pas b/ide/wresourc.pas index e4fa731aa7..c1b796100b 100644 --- a/ide/wresourc.pas +++ b/ide/wresourc.pas @@ -777,6 +777,9 @@ begin Fail; End; MyStream:=true; + {$ifdef aros} + Flush; // must write the header on open or later seek will not work + {$endif} end; constructor TResourceFile.LoadFile(AFileName: string); diff --git a/ide/wutils.pas b/ide/wutils.pas index ad7568fff2..127653b52b 100644 --- a/ide/wutils.pas +++ b/ide/wutils.pas @@ -514,7 +514,11 @@ function DirOf(const S: string): string; var D: DirStr; E: ExtStr; N: NameStr; begin FSplit(S,D,N,E); - if (D<>'') and (D[Length(D)]<>DirSep) then + if (D<>'') and (D[Length(D)]<>DirSep) + {$ifdef aros} + and (D[Length(D)]<>':') + {$endif} + then DirOf:=D+DirSep else DirOf:=D; @@ -1209,8 +1213,12 @@ end; function CompleteDir(const Path: string): string; begin { keep c: untouched PM } +{$ifdef aros} + if (Path<>'') and (Path[Length(Path)]<>DirSep) then +{$else} if (Path<>'') and (Path[Length(Path)]<>DirSep) and (Path[Length(Path)]<>':') then +{$endif} CompleteDir:=Path+DirSep else CompleteDir:=Path; @@ -1220,7 +1228,12 @@ function GetCurDir: string; var S: string; begin GetDir(0,S); - if copy(S,length(S),1)<>DirSep then S:=S+DirSep; + if (copy(S,length(S),1)<>DirSep) +{$ifdef aros} + and (copy(S,length(S),1) <> ':') +{$endif} + then + S:=S+DirSep; GetCurDir:=S; end; @@ -1233,7 +1246,7 @@ var Dir: string; begin Dir:=GetEnv('TEMP'); if Dir='' then Dir:=GetEnv('TMP'); -{$if defined(morphos) or defined(amiga)} +{$if defined(aros) or defined(morphos) or defined(amiga)} if Dir='' then Dir:='T:'; {$endif} if (Dir<>'') then if not ExistsDir(Dir) then Dir:=''; diff --git a/packages/arosunits/Makefile.fpc b/packages/arosunits/Makefile.fpc index 71b98e2b16..6880554874 100644 --- a/packages/arosunits/Makefile.fpc +++ b/packages/arosunits/Makefile.fpc @@ -7,8 +7,8 @@ name=arosunits version=2.7.1 [target] -units= amigados exec intuition gadtools workbench asl agraphics inputevent layers longarray \ - mui pastoc tagsarray timer utility amigalib timerutils diskfont keymap +units= gadtools workbench asl \ + mui amigalib timerutils diskfont [compiler] includedir=src diff --git a/packages/arosunits/src/agraphics.pas b/packages/arosunits/src/agraphics.pas deleted file mode 100644 index 35ba61419f..0000000000 --- a/packages/arosunits/src/agraphics.pas +++ /dev/null @@ -1,4338 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - - { - History: - - Found bugs in, - WritePixelArray8, - WritePixelLine8, - ReadPixelArray8, - ReadPixelLine8, - WriteChunkyPixels. - They all had one argument(array_) defined as pchar, - should be pointer, fixed. - 20 Aug 2000. - - InitTmpRas had wrong define for the buffer arg. - Changed from pchar to PLANEPTR. - 23 Aug 2000. - - Compiler had problems with Text, changed to GText. - 24 Aug 2000. - - Added functions and procedures with array of const. - For use with fpc 1.0.7. They are in systemvartags. - 11 Nov 2002. - - Added the defines use_amiga_smartlink and - use_auto_openlib. - 13 Jan 2003. - - Update for AmifaOS 3.9. - Changed start code for unit. - Bugs in ChangeSprite, GetRGB32, LoadRGB32, - LoadRGB4 and PolyDraw, fixed. - 01 Feb 2003. - - Changed integer > smallint, - cardinal > longword. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se - -} - -unit agraphics; - -{$mode objfpc} - -INTERFACE - -uses exec, {hardware,} utility; - - -const - - BITSET = $8000; - BITCLR = 0; - -type - - PBltNode = ^TBltNode; - TBltNode = record - m: PBltNode; - _function: Pointer; - stat: Byte; - BlitSize: SmallInt; - BeamSync: SmallInt; - Cleanup: Pointer; - end; - - pRectangle = ^tRectangle; - tRectangle = record - MinX,MinY : Word; - MaxX,MaxY : Word; - end; - - pRect32 = ^tRect32; - tRect32 = record - MinX,MinY : Longint; - MaxX,MaxY : Longint; - end; - - pPoint = ^tPoint; - tPoint = record - x,y : Word; - end; - - PLANEPTR = Pointer; - - pBitMap = ^tBitMap; - tBitMap = record - BytesPerRow : Word; - Rows : Word; - Flags : Byte; - Depth : Byte; - pad : Word; - Planes : Array [0..7] of PLANEPTR; - end; -{* flags for AllocBitMap, etc. *} -const - BMB_CLEAR = 0; - BMB_DISPLAYABLE = 1; - BMB_INTERLEAVED = 2; - BMB_STANDARD = 3; - BMB_MINPLANES = 4; - - BMF_CLEAR = (1 shl BMB_CLEAR); - BMF_DISPLAYABLE = (1 shl BMB_DISPLAYABLE); - BMF_INTERLEAVED = (1 shl BMB_INTERLEAVED); - BMF_STANDARD = (1 shl BMB_STANDARD); - BMF_MINPLANES = (1 shl BMB_MINPLANES); - -{* the following are for GetBitMapAttr() *} - BMA_HEIGHT = 0; - BMA_DEPTH = 4; - BMA_WIDTH = 8; - BMA_FLAGS = 12; - - -TYPE - - pRegionRectangle = ^tRegionRectangle; - tRegionRectangle = record - Next, Prev : pRegionRectangle; - bounds : tRectangle; - END; - - pRegion = ^tRegion; - tRegion = record - bounds : tRectangle; - RegionRectangle : pRegionRectangle; - END; - -{ structures used by and constructed by windowlib.a } -{ understood by rom software } -type - pClipRect = ^tClipRect; //checked 20.12.2012 ALB - tClipRect = record - Next : pClipRect; { roms used to find next ClipRect } - prev : pClipRect; { ignored by roms, used by windowlib } - lobs : Pointer; { ignored by roms, used by windowlib (LayerPtr)} - BitMap : pBitMap; - bounds : tRectangle; { set up by windowlib, used by roms } - _p1, - _p2 : Pointer; { system reserved } - reserved : Longint; { system use } - Flags : Longint; { only exists in layer allocation } - end; - - pLayer = ^tLayer; //checked 20.12.2012 ALB - tLayer = record - front, - back : pLayer; { ignored by roms } - ClipRect : pClipRect; { read by roms to find first cliprect } - rp : Pointer; { (RastPortPtr) ignored by roms, I hope } - bounds : tRectangle; { ignored by roms } - reserved : Array [0..3] of Byte; - priority : Word; { system use only } - Flags : Word; { obscured ?, Virtual BitMap? } - SuperBitMap : pBitMap; - SuperClipRect : pClipRect; { super bitmap cliprects if - VBitMap != 0} - { else damage cliprect list for refresh } - Window : Pointer; { reserved for user interface use } - Scroll_X, - Scroll_Y : Word; - cr, - cr2, - crnew : pClipRect; { used by dedice } - SuperSaveClipRects : pClipRect; { preallocated cr's } - cliprects : pClipRect; { system use during refresh } - LayerInfo : Pointer; { points to head of the list } - Lock : tSignalSemaphore; - BackFill : pHook; - reserved1 : ULONG; - ClipRegion : Pointer; - saveClipRects : Pointer; { used to back out when in trouble} - Width, - Height : smallint; - reserved2 : Array [0..17] of Byte; - { this must stay here } - DamageList : Pointer; { list of rectangles to refresh - through } - end; - - tChangeLayerShapeMsg = record //checked 20.12.2012 ALB - NewShape: pRegion; - ClipRect: pClipRect; - shape: pRegion; - end; - - tCollectPixelsLayerMsg = record //checked 20.12.2012 ALB - xSrc: LongInt; - ySrc: LongInt; - width: LongInt; - height: LongInt; - xDest: LongInt; - yDest: LongInt; - bm: pBitmap; - layer: pLayer; - minterm: ULONG; - end; - - tShapeHookMsg = record //checked 20.12.2012 ALB - Action: LongInt; - Layer: pLayer; - ActualShape: pRegion; - NewBounds: TRectangle; - OldBounds: TRectangle; - end; - -const - -{ internal cliprect flags } - - CR_NEEDS_NO_CONCEALED_RASTERS = 1; - CR_NEEDS_NO_LAYERBLIT_DAMAGE = 2; - - -{ defines for code values for getcode } - - ISLESSX = 1; - ISLESSY = 2; - ISGRTRX = 4; - ISGRTRY = 8; - - -{------ Font Styles ------------------------------------------------} - - FS_NORMAL = 0; { normal text (no style bits set) } - FSB_EXTENDED = 3; { extended face (wider than normal) } - FSF_EXTENDED = 8; - FSB_ITALIC = 2; { italic (slanted 1:2 right) } - FSF_ITALIC = 4; - FSB_BOLD = 1; { bold face text (ORed w/ shifted) } - FSF_BOLD = 2; - FSB_UNDERLINED = 0; { underlined (under baseline) } - FSF_UNDERLINED = 1; - - FSB_COLORFONT = 6; { this uses ColorTextFont structure } - FSF_COLORFONT = $40; - FSB_TAGGED = 7; { the TextAttr is really an TTextAttr, } - FSF_TAGGED = $80; - - -{------ Font Flags -------------------------------------------------} - FPB_ROMFONT = 0; { font is in rom } - FPF_ROMFONT = 1; - FPB_DISKFONT = 1; { font is from diskfont.library } - FPF_DISKFONT = 2; - FPB_REVPATH = 2; { designed path is reversed (e.g. left) } - FPF_REVPATH = 4; - FPB_TALLDOT = 3; { designed for hires non-interlaced } - FPF_TALLDOT = 8; - FPB_WIDEDOT = 4; { designed for lores interlaced } - FPF_WIDEDOT = 16; - FPB_PROPORTIONAL = 5; { character sizes can vary from nominal } - FPF_PROPORTIONAL = 32; - FPB_DESIGNED = 6; { size is "designed", not constructed } - FPF_DESIGNED = 64; - FPB_REMOVED = 7; { the font has been removed } - FPF_REMOVED = 128; - -{***** TextAttr node, matches text attributes in RastPort *********} - -type - - pTextAttr = ^tTextAttr; - tTextAttr = record - ta_Name : STRPTR; { name of the font } - ta_YSize : Word; { height of the font } - ta_Style : Byte; { intrinsic font style } - ta_Flags : Byte; { font preferences and flags } - end; - - pTTextAttr = ^tTTextAttr; - tTTextAttr = record - tta_Name : STRPTR; { name of the font } - tta_YSize : Word; { height of the font } - tta_Style : Byte; { intrinsic font style } - tta_Flags : Byte; { font preferences AND flags } - tta_Tags : pTagItem; { extended attributes } - end; - -{***** Text Tags **************************************************} -CONST - TA_DeviceDPI = (1+TAG_USER); { Tag value is Point union: } - { Hi Longint XDPI, Lo Longint YDPI } - - MAXFONTMATCHWEIGHT = 32767; { perfect match from WeighTAMatch } - - - -{***** TextFonts node *********************************************} -Type - - pTextFont = ^tTextFont; - tTextFont = record - tf_Message : tMessage; { reply message for font removal } - { font name in LN \ used in this } - tf_YSize : Word; { font height | order to best } - tf_Style : Byte; { font style | match a font } - tf_Flags : Byte; { preferences and flags / request. } - tf_XSize : Word; { nominal font width } - tf_Baseline : Word; { distance from the top of char to baseline } - tf_BoldSmear : Word; { smear to affect a bold enhancement } - - tf_Accessors : Word; { access count } - - tf_LoChar : Byte; { the first character described here } - tf_HiChar : Byte; { the last character described here } - tf_CharData : Pointer; { the bit character data } - - tf_Modulo : Word; { the row modulo for the strike font data } - tf_CharLoc : Pointer; { ptr to location data for the strike font } - { 2 words: bit offset then size } - tf_CharSpace : Pointer; { ptr to words of proportional spacing data } - tf_CharKern : Pointer; { ptr to words of kerning data } - end; - - -{----- tfe_Flags0 (partial definition) ----------------------------} -CONST - TE0B_NOREMFONT = 0; { disallow RemFont for this font } - TE0F_NOREMFONT = $01; - -Type - - pTextFontExtension = ^tTextFontExtension; - tTextFontExtension = record { this structure is read-only } - tfe_MatchWord : Word; { a magic cookie for the extension } - tfe_Flags0 : Byte; { (system private flags) } - tfe_Flags1 : Byte; { (system private flags) } - tfe_BackPtr : pTextFont; { validation of compilation } - tfe_OrigReplyPort : pMsgPort; { original value in tf_Extension } - tfe_Tags : pTagItem; { Text Tags for the font } - tfe_OFontPatchS, { (system private use) } - tfe_OFontPatchK : Pointer; { (system private use) } - { this space is reserved for future expansion } - END; - -{***** ColorTextFont node *****************************************} -{----- ctf_Flags --------------------------------------------------} -CONST - CT_COLORMASK = $000F; { mask to get to following color styles } - CT_COLORFONT = $0001; { color map contains designer's colors } - CT_GREYFONT = $0002; { color map describes even-stepped } - { brightnesses from low to high } - CT_ANTIALIAS = $0004; { zero background thru fully saturated char } - - CTB_MAPCOLOR = 0; { map ctf_FgColor to the rp_FgPen IF it's } - CTF_MAPCOLOR = $0001; { is a valid color within ctf_Low..ctf_High } - -{----- ColorFontColors --------------------------------------------} -Type - pColorFontColors = ^tColorFontColors; - tColorFontColors = record - cfc_Reserved, { *must* be zero } - cfc_Count : Word; { number of entries in cfc_ColorTable } - cfc_ColorTable : Pointer; { 4 bit per component color map packed xRGB } - END; - -{----- ColorTextFont ----------------------------------------------} - - pColorTextFont = ^tColorTextFont; - tColorTextFont = record - ctf_TF : tTextFont; - ctf_Flags : Word; { extended flags } - ctf_Depth, { number of bit planes } - ctf_FgColor, { color that is remapped to FgPen } - ctf_Low, { lowest color represented here } - ctf_High, { highest color represented here } - ctf_PlanePick, { PlanePick ala Images } - ctf_PlaneOnOff : Byte; { PlaneOnOff ala Images } - ctf_ColorFontColors : pColorFontColors; { colors for font } - ctf_CharData : Array[0..7] of APTR; {pointers to bit planes ala tf_CharData } - END; - -{***** TextExtent node ********************************************} - - pTextExtent = ^tTextExtent; - tTextExtent = record - te_Width, { same as TextLength } - te_Height : Word; { same as tf_YSize } - te_Extent : tRectangle; { relative to CP } - END; - - -const - - COPPER_MOVE = 0; { pseude opcode for move #XXXX,dir } - COPPER_WAIT = 1; { pseudo opcode for wait y,x } - CPRNXTBUF = 2; { continue processing with next buffer } - CPR_NT_LOF = $8000; { copper instruction only for Longint frames } - CPR_NT_SHT = $4000; { copper instruction only for long frames } - CPR_NT_SYS = $2000; { copper user instruction only } -type - -{ Note: The combination VWaitAddr and HWaitAddr replace a three way - union in C. The three possibilities are: - - nxtList : CopListPtr; or - - VWaitPos : Longint; - HWaitPos : Longint; or - - DestAddr : Longint; - DestData : Longint; -} - - pCopIns = ^tCopIns; - tCopIns = record - OpCode : smallint; { 0 = move, 1 = wait } - VWaitAddr : smallint; { vertical or horizontal wait position } - HWaitData : smallint; { destination Pointer or data to send } - end; - -{ structure of cprlist that points to list that hardware actually executes } - - pcprlist = ^tcprlist; - tcprlist = record - Next : pcprlist; - start : psmallint; { start of copper list } - MaxCount : smallint; { number of long instructions } - end; - - pCopList = ^tCopList; - tCopList = record - Next : pCopList; { next block for this copper list } - CopList : pCopList; { system use } - ViewPort : Pointer; { system use } - CopIns : pCopIns; { start of this block } - CopPtr : pCopIns; { intermediate ptr } - CopLStart : psmallint; { mrgcop fills this in for Long Frame} - CopSStart : psmallint; { mrgcop fills this in for Longint Frame} - Count : smallint; { intermediate counter } - MaxCount : smallint; { max # of copins for this block } - DyOffset : smallint; { offset this copper list vertical waits } - SLRepeat : Word; - Flags : Word; - end; - - pUCopList = ^tUCopList; - tUCopList = record - Next : pUCopList; - FirstCopList : pCopList; { head node of this copper list } - CopList : pCopList; { node in use } - end; - - pcopinit = ^tcopinit; - tcopinit = record - vsync_hblank : array [0..1] of word; - diagstrt : Array [0..11] of word; - fm0 : array [0..1] of word; - diwstart : array [0..9] of word; - bplcon2 : array [0..1] of word; - sprfix : array [0..(2*8)] of word; - sprstrtup : Array [0..(2*8*2)] of Word; - wait14 : array [0..1] of word; - norm_hblank : array [0..1] of word; - jump : array [0..1] of word; - wait_forever : array [0..5] of word; - sprstop : Array [0..7] of Word; - end; - - - - pAreaInfo = ^tAreaInfo; - tAreaInfo = record - VctrTbl : Pointer; { ptr to start of vector table } - VctrPtr : Pointer; { ptr to current vertex } - FlagTbl : Pointer; { ptr to start of vector flag table } - FlagPtr : Pointer; { ptrs to areafill flags } - Count : smallint; { number of vertices in list } - MaxCount : smallint; { AreaMove/Draw will not allow Count>MaxCount} - FirstX, - FirstY : smallint; { first point for this polygon } - end; - - pTmpRas = ^tTmpRas; - tTmpRas = record - RasPtr : Pointer; - Size : Longint; - end; - -{ unoptimized for 32bit alignment of pointers } - - pGelsInfo = ^tGelsInfo; - tGelsInfo = record - sprRsrvd : Shortint; { flag of which sprites to reserve from - vsprite system } - Flags : Byte; { system use } - gelHead, - gelTail : Pointer; { (VSpritePtr) dummy vSprites for list management} - - { pointer to array of 8 WORDS for sprite available lines } - - nextLine : Pointer; - - { pointer to array of 8 pointers for color-last-assigned to vSprites } - - lastColor : Pointer; - collHandler : Pointer; { (collTablePtr) Pointeres of collision routines } - leftmost, - rightmost, - topmost, - bottommost : smallint; - firstBlissObj, - lastBlissObj : Pointer; { system use only } - end; - - pRastPort = ^tRastPort; - tRastPort = record - Layer : pLayer; { LayerPtr } - BitMap : pBitMap; { BitMapPtr } - AreaPtrn : Pointer; { ptr to areafill pattern } - TmpRas : pTmpRas; - AreaInfo : pAreaInfo; - GelsInfo : pGelsInfo; - Mask : Byte; { write mask for this raster } - FgPen : Shortint; { foreground pen for this raster } - BgPen : Shortint; { background pen } - AOlPen : Shortint; { areafill outline pen } - DrawMode : Shortint; { drawing mode for fill, lines, and text } - AreaPtSz : Shortint; { 2^n words for areafill pattern } - linpatcnt : Shortint; { current line drawing pattern preshift } - dummy : Shortint; - Flags : Word; { miscellaneous control bits } - LinePtrn : Word; { 16 bits for textured lines } - cp_x, - cp_y : smallint; { current pen position } - minterms : Array [0..7] of Byte; - PenWidth : smallint; - PenHeight : smallint; - Font : pTextFont; { (TextFontPtr) current font Pointer } - AlgoStyle : Byte; { the algorithmically generated style } - TxFlags : Byte; { text specific flags } - TxHeight : Word; { text height } - TxWidth : Word; { text nominal width } - TxBaseline : Word; { text baseline } - TxSpacing : smallint; { text spacing (per character) } - RP_User : Pointer; - longreserved : Array [0..1] of ULONG; - wordreserved : Array [0..6] of Word; { used to be a node } - reserved : Array [0..7] of Byte; { for future use } - end; - -const - -{ drawing modes } - - JAM1 = 0; { jam 1 color into raster } - JAM2 = 1; { jam 2 colors into raster } - COMPLEMENT = 2; { XOR bits into raster } - INVERSVID = 4; { inverse video for drawing modes } - -{ these are the flag bits for RastPort flags } - - FRST_DOT = $01; { draw the first dot of this line ? } - ONE_DOT = $02; { use one dot mode for drawing lines } - DBUFFER = $04; { flag set when RastPorts are double-buffered } - - { only used for bobs } - - AREAOUTLINE = $08; { used by areafiller } - NOCROSSFILL = $20; { areafills have no crossovers } - -{ there is only one style of clipping: raster clipping } -{ this preserves the continuity of jaggies regardless of clip window } -{ When drawing into a RastPort, if the ptr to ClipRect is nil then there } -{ is no clipping done, this is dangerous but useful for speed } - - -Const - CleanUp = $40; - CleanMe = CleanUp; - - BltClearWait = 1; { Waits for blit to finish } - BltClearXY = 2; { Use Row/Bytes per row method } - - { Useful minterms } - - StraightCopy = $C0; { Vanilla copy } - InvertAndCopy = $30; { Invert the source before copy } - InvertDest = $50; { Forget source, invert dest } - - - { mode coercion definitions } - -const -{ These flags are passed (in combination) to CoerceMode() to determine the - * type of coercion required. - } - -{ Ensure that the mode coerced to can display just as many colours as the - * ViewPort being coerced. - } - PRESERVE_COLORS = 1; - -{ Ensure that the mode coerced to is not interlaced. } - AVOID_FLICKER = 2; - -{ Coercion should ignore monitor compatibility issues. } - IGNORE_MCOMPAT = 4; - - - BIDTAG_COERCE = 1; { Private } - -const - -{ VSprite flags } -{ user-set VSprite flags: } - - SUSERFLAGS = $00FF; { mask of all user-settable VSprite-flags } - VSPRITE_f = $0001; { set if VSprite, clear if Bob } - { VSPRITE had to be changed for name conflict } - SAVEBACK = $0002; { set if background is to be saved/restored } - OVERLAY = $0004; { set to mask image of Bob onto background } - MUSTDRAW = $0008; { set if VSprite absolutely must be drawn } - -{ system-set VSprite flags: } - - BACKSAVED = $0100; { this Bob's background has been saved } - BOBUPDATE = $0200; { temporary flag, useless to outside world } - GELGONE = $0400; { set if gel is completely clipped (offscreen) } - VSOVERFLOW = $0800; { VSprite overflow (if MUSTDRAW set we draw!) } - -{ Bob flags } -{ these are the user flag bits } - - BUSERFLAGS = $00FF; { mask of all user-settable Bob-flags } - SAVEBOB = $0001; { set to not erase Bob } - BOBISCOMP = $0002; { set to identify Bob as AnimComp } - -{ these are the system flag bits } - - BWAITING = $0100; { set while Bob is waiting on 'after' } - BDRAWN = $0200; { set when Bob is drawn this DrawG pass} - BOBSAWAY = $0400; { set to initiate removal of Bob } - BOBNIX = $0800; { set when Bob is completely removed } - SAVEPRESERVE = $1000; { for back-restore during double-buffer} - OUTSTEP = $2000; { for double-clearing if double-buffer } - -{ defines for the animation procedures } - - ANFRACSIZE = 6; - ANIMHALF = $0020; - RINGTRIGGER = $0001; - - -{ UserStuff definitions - * the user can define these to be a single variable or a sub-structure - * if undefined by the user, the system turns these into innocuous variables - * see the manual for a thorough definition of the UserStuff definitions - * - } - -type - - VUserStuff = smallint; { Sprite user stuff } - BUserStuff = smallint; { Bob user stuff } - AUserStuff = smallint; { AnimOb user stuff } - -{********************** GEL STRUCTURES **********************************} - - pVSprite = ^tVSprite; - tVSprite = record - -{ --------------------- SYSTEM VARIABLES ------------------------------- } -{ GEL linked list forward/backward pointers sorted by y,x value } - - NextVSprite : pVSprite; - PrevVSprite : pVSprite; - -{ GEL draw list constructed in the order the Bobs are actually drawn, then - * list is copied to clear list - * must be here in VSprite for system boundary detection - } - - DrawPath : pVSprite; { pointer of overlay drawing } - ClearPath : pVSprite; { pointer for overlay clearing } - -{ the VSprite positions are defined in (y,x) order to make sorting - * sorting easier, since (y,x) as a long Longint - } - - OldY, OldX : smallint; { previous position } - -{ --------------------- COMMON VARIABLES --------------------------------- } - - Flags : smallint; { VSprite flags } - - -{ --------------------- USER VARIABLES ----------------------------------- } -{ the VSprite positions are defined in (y,x) order to make sorting - * sorting easier, since (y,x) as a long Longint - } - - Y, X : smallint; { screen position } - - Height : smallint; - Width : smallint; { number of words per row of image data } - Depth : smallint; { number of planes of data } - - MeMask : smallint; { which types can collide with this VSprite} - HitMask : smallint; { which types this VSprite can collide with} - - ImageData : Pointer; { pointer to VSprite image } - -{ borderLine is the one-dimensional logical OR of all - * the VSprite bits, used for fast collision detection of edge - } - - BorderLine : Pointer; { logical OR of all VSprite bits } - CollMask : Pointer; { similar to above except this is a matrix } - -{ pointer to this VSprite's color definitions (not used by Bobs) } - - SprColors : Pointer; - - VSBob : Pointer; { (BobPtr) points home if this VSprite - is part of a Bob } - -{ planePick flag: set bit selects a plane from image, clear bit selects - * use of shadow mask for that plane - * OnOff flag: if using shadow mask to fill plane, this bit (corresponding - * to bit in planePick) describes whether to fill with 0's or 1's - * There are two uses for these flags: - * - if this is the VSprite of a Bob, these flags describe how the Bob - * is to be drawn into memory - * - if this is a simple VSprite and the user intends on setting the - * MUSTDRAW flag of the VSprite, these flags must be set too to describe - * which color registers the user wants for the image - } - - PlanePick : Shortint; - PlaneOnOff : Shortint; - - VUserExt : VUserStuff; { user definable: see note above } - end; - - - - -{ dBufPacket defines the values needed to be saved across buffer to buffer - * when in double-buffer mode - } - - pDBufPacket = ^tDBufPacket; - tDBufPacket = record - BufY, - BufX : Word; { save other buffers screen coordinates } - BufPath : pVSprite; { carry the draw path over the gap } - -{ these pointers must be filled in by the user } -{ pointer to other buffer's background save buffer } - - BufBuffer : Pointer; - end; - - - - - - pBob = ^tBob; - tBob = record -{ blitter-objects } - -{ --------------------- SYSTEM VARIABLES --------------------------------- } - -{ --------------------- COMMON VARIABLES --------------------------------- } - - Flags : smallint; { general purpose flags (see definitions below) } - -{ --------------------- USER VARIABLES ----------------------------------- } - - SaveBuffer : Pointer; { pointer to the buffer for background save } - -{ used by Bobs for "cookie-cutting" and multi-plane masking } - - ImageShadow : Pointer; - -{ pointer to BOBs for sequenced drawing of Bobs - * for correct overlaying of multiple component animations - } - Before : pBob; { draw this Bob before Bob pointed to by before } - After : pBob; { draw this Bob after Bob pointed to by after } - - BobVSprite : pVSprite; { this Bob's VSprite definition } - - BobComp : Pointer; { (AnimCompPtr) pointer to this Bob's AnimComp def } - - DBuffer : Pointer; { pointer to this Bob's dBuf packet } - - BUserExt : BUserStuff; { Bob user extension } - end; - - pAnimComp = ^tAnimComp; - tAnimComp = record - -{ --------------------- SYSTEM VARIABLES --------------------------------- } - -{ --------------------- COMMON VARIABLES --------------------------------- } - - Flags : smallint; { AnimComp flags for system & user } - -{ timer defines how long to keep this component active: - * if set non-zero, timer decrements to zero then switches to nextSeq - * if set to zero, AnimComp never switches - } - - Timer : smallint; - -{ --------------------- USER VARIABLES ----------------------------------- } -{ initial value for timer when the AnimComp is activated by the system } - - TimeSet : smallint; - -{ pointer to next and previous components of animation object } - - NextComp : pAnimComp; - PrevComp : pAnimComp; - -{ pointer to component component definition of next image in sequence } - - NextSeq : pAnimComp; - PrevSeq : pAnimComp; - - AnimCRoutine : Pointer; { Pointer of special animation procedure } - - YTrans : smallint; { initial y translation (if this is a component) } - XTrans : smallint; { initial x translation (if this is a component) } - - HeadOb : Pointer; { AnimObPtr } - - AnimBob : pBob; - end; - - pAnimOb = ^tAnimOb; - tAnimOb = record - -{ --------------------- SYSTEM VARIABLES --------------------------------- } - - NextOb, - PrevOb : pAnimOb; - -{ number of calls to Animate this AnimOb has endured } - - Clock : Longint; - - AnOldY, - AnOldX : smallint; { old y,x coordinates } - -{ --------------------- COMMON VARIABLES --------------------------------- } - - AnY, - AnX : smallint; { y,x coordinates of the AnimOb } - -{ --------------------- USER VARIABLES ----------------------------------- } - - YVel, - XVel : smallint; { velocities of this object } - YAccel, - XAccel : smallint; { accelerations of this object } - - RingYTrans, - RingXTrans : smallint; { ring translation values } - - AnimORoutine : Pointer; { Pointer of special animation - procedure } - - HeadComp : pAnimComp; { pointer to first component } - - AUserExt : AUserStuff; { AnimOb user extension } - end; - - ppAnimOb = ^pAnimOb; - - -{ ************************************************************************ } - -const - - B2NORM = 0; - B2SWAP = 1; - B2BOBBER = 2; - -{ ************************************************************************ } - -type - -{ a structure to contain the 16 collision procedure addresses } - - collTable = Array [0..15] of Pointer; - pcollTable = ^collTable; - -const - -{ These bit descriptors are used by the GEL collide routines. - * These bits are set in the hitMask and meMask variables of - * a GEL to describe whether or not these types of collisions - * can affect the GEL. BNDRY_HIT is described further below; - * this bit is permanently assigned as the boundary-hit flag. - * The other bit GEL_HIT is meant only as a default to cover - * any GEL hitting any other; the user may redefine this bit. - } - - BORDERHIT = 0; - -{ These bit descriptors are used by the GEL boundry hit routines. - * When the user's boundry-hit routine is called (via the argument - * set by a call to SetCollision) the first argument passed to - * the user's routine is the Pointer of the GEL involved in the - * boundry-hit, and the second argument has the appropriate bit(s) - * set to describe which boundry was surpassed - } - - TOPHIT = 1; - BOTTOMHIT = 2; - LEFTHIT = 4; - RIGHTHIT = 8; - -Type - pExtendedNode = ^tExtendedNode; - tExtendedNode = record - xln_Succ, - xln_Pred : pNode; - xln_Type : Byte; - xln_Pri : Shortint; - xln_Name : STRPTR; - xln_Subsystem : Byte; - xln_Subtype : Byte; - xln_Library : Longint; - xln_Init : Pointer; - END; - -CONST - SS_GRAPHICS = $02; - - VIEW_EXTRA_TYPE = 1; - VIEWPORT_EXTRA_TYPE = 2; - SPECIAL_MONITOR_TYPE = 3; - MONITOR_SPEC_TYPE = 4; - -type - -{ structure used by AddTOFTask } - - pIsrvstr = ^tIsrvstr; - tIsrvstr = record - is_Node : tNode; - Iptr : pIsrvstr; { passed to srvr by os } - code : Pointer; - ccode : Pointer; - Carg : Pointer; - end; - -Type - pAnalogSignalInterval = ^tAnalogSignalInterval; - tAnalogSignalInterval = record - asi_Start, - asi_Stop : Word; - END; - - pSpecialMonitor = ^tSpecialMonitor; - tSpecialMonitor = record - spm_Node : tExtendedNode; - spm_Flags : Word; - do_monitor, - reserved1, - reserved2, - reserved3 : Pointer; - hblank, - vblank, - hsync, - vsync : tAnalogSignalInterval; - END; - - - pMonitorSpec = ^tMonitorSpec; - tMonitorSpec = record - ms_Node : tExtendedNode; - ms_Flags : Word; - ratioh, - ratiov : Longint; - total_rows, - total_colorclocks, - DeniseMaxDisplayColumn, - BeamCon0, - min_row : Word; - ms_Special : pSpecialMonitor; - ms_OpenCount : Word; - ms_transform, - ms_translate, - ms_scale : Pointer; - ms_xoffset, - ms_yoffset : Word; - ms_LegalView : tRectangle; - ms_maxoscan, { maximum legal overscan } - ms_videoscan : Pointer; { video display overscan } - DeniseMinDisplayColumn : Word; - DisplayCompatible : ULONG; - DisplayInfoDataBase : tList; - DisplayInfoDataBaseSemaphore : tSignalSemaphore; - ms_MrgCop, - ms_LoadView, - ms_KillView : Longint; - END; - -const - TO_MONITOR = 0; - FROM_MONITOR = 1; - STANDARD_XOFFSET = 9; - STANDARD_YOFFSET = 0; - - MSB_REQUEST_NTSC = 0; - MSB_REQUEST_PAL = 1; - MSB_REQUEST_SPECIAL = 2; - MSB_REQUEST_A2024 = 3; - MSB_DOUBLE_SPRITES = 4; - MSF_REQUEST_NTSC = 1; - MSF_REQUEST_PAL = 2; - MSF_REQUEST_SPECIAL = 4; - MSF_REQUEST_A2024 = 8; - MSF_DOUBLE_SPRITES = 16; - - -{ obsolete, v37 compatible definitions follow } - REQUEST_NTSC = 1; - REQUEST_PAL = 2; - REQUEST_SPECIAL = 4; - REQUEST_A2024 = 8; - - DEFAULT_MONITOR_NAME : PChar = 'default.monitor'; - NTSC_MONITOR_NAME : PChar = 'ntsc.monitor'; - PAL_MONITOR_NAME : PChar = 'pal.monitor'; - STANDARD_MONITOR_MASK = ( REQUEST_NTSC OR REQUEST_PAL ) ; - - STANDARD_NTSC_ROWS = 262; - STANDARD_PAL_ROWS = 312; - STANDARD_COLORCLOCKS = 226; - STANDARD_DENISE_MAX = 455; - STANDARD_DENISE_MIN = 93 ; - STANDARD_NTSC_BEAMCON = $0000; - //STANDARD_PAL_BEAMCON = DISPLAYPAL ; - - //SPECIAL_BEAMCON = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE); - - MIN_NTSC_ROW = 21 ; - MIN_PAL_ROW = 29 ; - STANDARD_VIEW_X = $81 ; - STANDARD_VIEW_Y = $2C ; - STANDARD_HBSTRT = $06 ; - STANDARD_HSSTRT = $0B ; - STANDARD_HSSTOP = $1C ; - STANDARD_HBSTOP = $2C ; - STANDARD_VBSTRT = $0122; - STANDARD_VSSTRT = $02A6; - STANDARD_VSSTOP = $03AA; - STANDARD_VBSTOP = $1066; - - VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2); - VGA_TOTAL_ROWS = (STANDARD_NTSC_ROWS*2); - VGA_DENISE_MIN = 59 ; - MIN_VGA_ROW = 29 ; - VGA_HBSTRT = $08 ; - VGA_HSSTRT = $0E ; - VGA_HSSTOP = $1C ; - VGA_HBSTOP = $1E ; - VGA_VBSTRT = $0000; - VGA_VSSTRT = $0153; - VGA_VSSTOP = $0235; - VGA_VBSTOP = $0CCD; - - VGA_MONITOR_NAME : PChar = 'vga.monitor'; - -{ NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been - * implemented. - } - VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ; - VGA70_TOTAL_ROWS = 449; - VGA70_DENISE_MIN = 59; - MIN_VGA70_ROW = 35 ; - VGA70_HBSTRT = $08 ; - VGA70_HSSTRT = $0E ; - VGA70_HSSTOP = $1C ; - VGA70_HBSTOP = $1E ; - VGA70_VBSTRT = $0000; - VGA70_VSSTRT = $02A6; - VGA70_VSSTOP = $0388; - VGA70_VBSTOP = $0F73; - - //VGA70_BEAMCON = (SPECIAL_BEAMCON XOR VSYNCTRUE); - VGA70_MONITOR_NAME : PChar = 'vga70.monitor'; - - BROADCAST_HBSTRT = $01 ; - BROADCAST_HSSTRT = $06 ; - BROADCAST_HSSTOP = $17 ; - BROADCAST_HBSTOP = $27 ; - BROADCAST_VBSTRT = $0000; - BROADCAST_VSSTRT = $02A6; - BROADCAST_VSSTOP = $054C; - BROADCAST_VBSTOP = $1C40; - //BROADCAST_BEAMCON = ( LOLDIS OR CSBLANK ); - RATIO_FIXEDPART = 4; - RATIO_UNITY = 16; - - - -Type - pRasInfo = ^tRasInfo; - tRasInfo = record { used by callers to and InitDspC() } - Next : pRasInfo; { used for dualpf } - BitMap : pBitMap; - RxOffset, - RyOffset : smallint; { scroll offsets in this BitMap } - end; - - - pView = ^tView; - tView = record - ViewPort : Pointer; { ViewPortPtr } - LOFCprList : pcprlist; { used for interlaced and noninterlaced } - SHFCprList : pcprlist; { only used during interlace } - DyOffset, - DxOffset : smallint; { for complete View positioning } - { offsets are +- adjustments to standard #s } - Modes : WORD; { such as INTERLACE, GENLOC } - end; - -{ these structures are obtained via GfxNew } -{ and disposed by GfxFree } -Type - pViewExtra = ^tViewExtra; - tViewExtra = record - n : tExtendedNode; - View : pView; { backwards link } { view in C-Includes } - Monitor : pMonitorSpec; { monitors for this view } - TopLine : Word; - END; - - - pViewPort = ^tViewPort; - tViewPort = record - Next : pViewPort; - ColorMap : Pointer; { table of colors for this viewport } { ColorMapPtr } - { if this is nil, MakeVPort assumes default values } - DspIns : pCopList; { user by MakeView() } - SprIns : pCopList; { used by sprite stuff } - ClrIns : pCopList; { used by sprite stuff } - UCopIns : pUCopList; { User copper list } - DWidth, - DHeight : smallint; - DxOffset, - DyOffset : smallint; - Modes : Word; - SpritePriorities : Byte; { used by makevp } - reserved : Byte; - RasInfo : pRasInfo; - end; - - -{ this structure is obtained via GfxNew } -{ and disposed by GfxFree } - - pViewPortExtra = ^tViewPortExtra; - tViewPortExtra = record - n : tExtendedNode; - ViewPort : pViewPort; { backwards link } { ViewPort in C-Includes } - DisplayClip : tRectangle; { makevp display clipping information } - { These are added for V39 } - VecTable : Pointer; { Private } - DriverData : Array[0..1] of Pointer; - Flags : WORD; - Origin : Array[0..1] of tPoint; { First visible point relative to the DClip. - * One for each possible playfield. - } - cop1ptr, { private } - cop2ptr : ULONG; { private } - END; - - - pColorMap = ^tColorMap; - tColorMap = record - Flags : Byte; - CType : Byte; { This is "Type" in C includes } - Count : Word; - ColorTable : Pointer; - cm_vpe : pViewPortExtra; - LowColorBits : Pointer; - TransparencyPlane, - SpriteResolution, - SpriteResDefault, - AuxFlags : Byte; - cm_vp : pViewPort; { ViewPortPtr } - NormalDisplayInfo, - CoerceDisplayInfo : Pointer; - cm_batch_items : pTagItem; - VPModeID : ULONG; - PalExtra : Pointer; - SpriteBase_Even, - SpriteBase_Odd, - Bp_0_base, - Bp_1_base : Word; - end; - -{ if Type == 0 then ColorMap is V1.2/V1.3 compatible } -{ if Type != 0 then ColorMap is V36 compatible } -{ the system will never create other than V39 type colormaps when running V39 } - -CONST - COLORMAP_TYPE_V1_2 = $00; - COLORMAP_TYPE_V1_4 = $01; - COLORMAP_TYPE_V36 = COLORMAP_TYPE_V1_4; { use this definition } - COLORMAP_TYPE_V39 = $02; - - -{ Flags variable } - COLORMAP_TRANSPARENCY = $01; - COLORPLANE_TRANSPARENCY = $02; - BORDER_BLANKING = $04; - BORDER_NOTRANSPARENCY = $08; - VIDEOCONTROL_BATCH = $10; - USER_COPPER_CLIP = $20; - - -CONST - EXTEND_VSTRUCT = $1000; { unused bit in Modes field of View } - - -{ defines used for Modes in IVPargs } - -CONST - GENLOCK_VIDEO = $0002; - LACE = $0004; - SUPERHIRES = $0020; - PFBA = $0040; - EXTRA_HALFBRITE= $0080; - GENLOCK_AUDIO = $0100; - DUALPF = $0400; - HAM = $0800; - EXTENDED_MODE = $1000; - VP_HIDE = $2000; - SPRITES = $4000; - HIRES = $8000; - - VPF_A2024 = $40; - VPF_AGNUS = $20; - VPF_TENHZ = $20; - - BORDERSPRITES = $40; - - CMF_CMTRANS = 0; - CMF_CPTRANS = 1; - CMF_BRDRBLNK = 2; - CMF_BRDNTRAN = 3; - CMF_BRDRSPRT = 6; - - SPRITERESN_ECS = 0; -{ ^140ns, except in 35ns viewport, where it is 70ns. } - SPRITERESN_140NS = 1; - SPRITERESN_70NS = 2; - SPRITERESN_35NS = 3; - SPRITERESN_DEFAULT = -1; - -{ AuxFlags : } - CMAB_FULLPALETTE = 0; - CMAF_FULLPALETTE = 1; - CMAB_NO_INTERMED_UPDATE = 1; - CMAF_NO_INTERMED_UPDATE = 2; - CMAB_NO_COLOR_LOAD = 2; - CMAF_NO_COLOR_LOAD = 4; - CMAB_DUALPF_DISABLE = 3; - CMAF_DUALPF_DISABLE = 8; - -Type - pPaletteExtra = ^tPaletteExtra; - tPaletteExtra = record { structure may be extended so watch out! } - pe_Semaphore : tSignalSemaphore; { shared semaphore for arbitration } - pe_FirstFree, { *private* } - pe_NFree, { number of free colors } - pe_FirstShared, { *private* } - pe_NShared : WORD; { *private* } - pe_RefCnt : Pointer; { *private* } - pe_AllocList : Pointer; { *private* } - pe_ViewPort : pViewPort; { back pointer to viewport } - pe_SharableColors : WORD; { the number of sharable colors. } - end; -{ flags values for ObtainPen } -Const - PENB_EXCLUSIVE = 0; - PENB_NO_SETCOLOR = 1; - - PENF_EXCLUSIVE = 1; - PENF_NO_SETCOLOR = 2; - -{ obsolete names for PENF_xxx flags: } - - PEN_EXCLUSIVE = PENF_EXCLUSIVE; - PEN_NO_SETCOLOR = PENF_NO_SETCOLOR; - -{ precision values for ObtainBestPen : } - - PRECISION_EXACT = -1; - PRECISION_IMAGE = 0; - PRECISION_ICON = 16; - PRECISION_GUI = 32; - - -{ tags for ObtainBestPen: } - OBP_Precision = $84000000; - OBP_FailIfBad = $84000001; - -{ From V39, MakeVPort() will return an error if there is not enough memory, - * or the requested mode cannot be opened with the requested depth with the - * given bitmap (for higher bandwidth alignments). - } - - MVP_OK = 0; { you want to see this one } - MVP_NO_MEM = 1; { insufficient memory for intermediate workspace } - MVP_NO_VPE = 2; { ViewPort does not have a ViewPortExtra, and - * insufficient memory to allocate a temporary one. - } - MVP_NO_DSPINS = 3; { insufficient memory for intermidiate copper - * instructions. - } - MVP_NO_DISPLAY = 4; { BitMap data is misaligned for this viewport's - * mode and depth - see AllocBitMap(). - } - MVP_OFF_BOTTOM = 5; { PRIVATE - you will never see this. } - -{ From V39, MrgCop() will return an error if there is not enough memory, - * or for some reason MrgCop() did not need to make any copper lists. - } - - MCOP_OK = 0; { you want to see this one } - MCOP_NO_MEM = 1; { insufficient memory to allocate the system - * copper lists. - } - MCOP_NOP = 2; { MrgCop() did not merge any copper lists - * (eg, no ViewPorts in the list, or all marked as - * hidden). - } -Type - pDBufInfo = ^tDBufInfo; - tDBufInfo = record - dbi_Link1 : Pointer; - dbi_Count1 : ULONG; - dbi_SafeMessage : tMessage; { replied to when safe to write to old bitmap } - dbi_UserData1 : Pointer; { first user data } - - dbi_Link2 : Pointer; - dbi_Count2 : ULONG; - dbi_DispMessage : tMessage; { replied to when new bitmap has been displayed at least - once } - dbi_UserData2 : Pointer; { second user data } - dbi_MatchLong : ULONG; - dbi_CopPtr1, - dbi_CopPtr2, - dbi_CopPtr3 : Pointer; - dbi_BeamPos1, - dbi_BeamPos2 : WORD; - end; - - - - { include define file for graphics display mode IDs. } - - -const - - INVALID_ID = NOT 0; - -{ With all the new modes that are available under V38 and V39, it is highly - * recommended that you use either the asl.library screenmode requester, - * and/or the V39 graphics.library function BestModeIDA(). - * - * DO NOT interpret the any of the bits in the ModeID for its meaning. For - * example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced. - * Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_... - * flags to determine a ModeID's characteristics. The only exception to - * this rule is that bit 7 ($80) will always mean the ModeID is - * ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM. - } - -{ normal identifiers } - - MONITOR_ID_MASK = $FFFF1000; - - DEFAULT_MONITOR_ID = $00000000; - NTSC_MONITOR_ID = $00011000; - PAL_MONITOR_ID = $00021000; - -{ the following 22 composite keys are for Modes on the default Monitor. - * NTSC & PAL "flavors" of these particular keys may be made by or'ing - * the NTSC or PAL MONITOR_ID with the desired MODE_KEY... - * - * For example, to specifically open a PAL HAM interlaced ViewPort - * (or intuition screen), you would use the modeid of - * (PAL_MONITOR_ID OR HAMLACE_KEY) - } - - LORES_KEY = $00000000; - HIRES_KEY = $00008000; - SUPER_KEY = $00008020; - HAM_KEY = $00000800; - LORESLACE_KEY = $00000004; - HIRESLACE_KEY = $00008004; - SUPERLACE_KEY = $00008024; - HAMLACE_KEY = $00000804; - LORESDPF_KEY = $00000400; - HIRESDPF_KEY = $00008400; - SUPERDPF_KEY = $00008420; - LORESLACEDPF_KEY = $00000404; - HIRESLACEDPF_KEY = $00008404; - SUPERLACEDPF_KEY = $00008424; - LORESDPF2_KEY = $00000440; - HIRESDPF2_KEY = $00008440; - SUPERDPF2_KEY = $00008460; - LORESLACEDPF2_KEY = $00000444; - HIRESLACEDPF2_KEY = $00008444; - SUPERLACEDPF2_KEY = $00008464; - EXTRAHALFBRITE_KEY = $00000080; - EXTRAHALFBRITELACE_KEY = $00000084; -{ New for AA ChipSet (V39) } - HIRESHAM_KEY = $00008800; - SUPERHAM_KEY = $00008820; - HIRESEHB_KEY = $00008080; - SUPEREHB_KEY = $000080a0; - HIRESHAMLACE_KEY = $00008804; - SUPERHAMLACE_KEY = $00008824; - HIRESEHBLACE_KEY = $00008084; - SUPEREHBLACE_KEY = $000080a4; -{ Added for V40 - may be useful modes for some games or animations. } - LORESSDBL_KEY = $00000008; - LORESHAMSDBL_KEY = $00000808; - LORESEHBSDBL_KEY = $00000088; - HIRESHAMSDBL_KEY = $00008808; - - -{ VGA identifiers } - - VGA_MONITOR_ID = $00031000; - - VGAEXTRALORES_KEY = $00031004; - VGALORES_KEY = $00039004; - VGAPRODUCT_KEY = $00039024; - VGAHAM_KEY = $00031804; - VGAEXTRALORESLACE_KEY = $00031005; - VGALORESLACE_KEY = $00039005; - VGAPRODUCTLACE_KEY = $00039025; - VGAHAMLACE_KEY = $00031805; - VGAEXTRALORESDPF_KEY = $00031404; - VGALORESDPF_KEY = $00039404; - VGAPRODUCTDPF_KEY = $00039424; - VGAEXTRALORESLACEDPF_KEY = $00031405; - VGALORESLACEDPF_KEY = $00039405; - VGAPRODUCTLACEDPF_KEY = $00039425; - VGAEXTRALORESDPF2_KEY = $00031444; - VGALORESDPF2_KEY = $00039444; - VGAPRODUCTDPF2_KEY = $00039464; - VGAEXTRALORESLACEDPF2_KEY = $00031445; - VGALORESLACEDPF2_KEY = $00039445; - VGAPRODUCTLACEDPF2_KEY = $00039465; - VGAEXTRAHALFBRITE_KEY = $00031084; - VGAEXTRAHALFBRITELACE_KEY = $00031085; -{ New for AA ChipSet (V39) } - VGAPRODUCTHAM_KEY = $00039824; - VGALORESHAM_KEY = $00039804; - VGAEXTRALORESHAM_KEY = VGAHAM_KEY; - VGAPRODUCTHAMLACE_KEY = $00039825; - VGALORESHAMLACE_KEY = $00039805; - VGAEXTRALORESHAMLACE_KEY = VGAHAMLACE_KEY; - VGAEXTRALORESEHB_KEY = VGAEXTRAHALFBRITE_KEY; - VGAEXTRALORESEHBLACE_KEY = VGAEXTRAHALFBRITELACE_KEY; - VGALORESEHB_KEY = $00039084; - VGALORESEHBLACE_KEY = $00039085; - VGAEHB_KEY = $000390a4; - VGAEHBLACE_KEY = $000390a5; -{ These ModeIDs are the scandoubled equivalents of the above, with the - * exception of the DualPlayfield modes, as AA does not allow for scandoubling - * dualplayfield. - } - VGAEXTRALORESDBL_KEY = $00031000; - VGALORESDBL_KEY = $00039000; - VGAPRODUCTDBL_KEY = $00039020; - VGAEXTRALORESHAMDBL_KEY = $00031800; - VGALORESHAMDBL_KEY = $00039800; - VGAPRODUCTHAMDBL_KEY = $00039820; - VGAEXTRALORESEHBDBL_KEY = $00031080; - VGALORESEHBDBL_KEY = $00039080; - VGAPRODUCTEHBDBL_KEY = $000390a0; - -{ a2024 identifiers } - - A2024_MONITOR_ID = $00041000; - - A2024TENHERTZ_KEY = $00041000; - A2024FIFTEENHERTZ_KEY = $00049000; - -{ prototype identifiers (private) } - - PROTO_MONITOR_ID = $00051000; - - -{ These monitors and modes were added for the V38 release. } - - EURO72_MONITOR_ID = $00061000; - - EURO72EXTRALORES_KEY = $00061004; - EURO72LORES_KEY = $00069004; - EURO72PRODUCT_KEY = $00069024; - EURO72HAM_KEY = $00061804; - EURO72EXTRALORESLACE_KEY = $00061005; - EURO72LORESLACE_KEY = $00069005; - EURO72PRODUCTLACE_KEY = $00069025; - EURO72HAMLACE_KEY = $00061805; - EURO72EXTRALORESDPF_KEY = $00061404; - EURO72LORESDPF_KEY = $00069404; - EURO72PRODUCTDPF_KEY = $00069424; - EURO72EXTRALORESLACEDPF_KEY = $00061405; - EURO72LORESLACEDPF_KEY = $00069405; - EURO72PRODUCTLACEDPF_KEY = $00069425; - EURO72EXTRALORESDPF2_KEY = $00061444; - EURO72LORESDPF2_KEY = $00069444; - EURO72PRODUCTDPF2_KEY = $00069464; - EURO72EXTRALORESLACEDPF2_KEY = $00061445; - EURO72LORESLACEDPF2_KEY = $00069445; - EURO72PRODUCTLACEDPF2_KEY = $00069465; - EURO72EXTRAHALFBRITE_KEY = $00061084; - EURO72EXTRAHALFBRITELACE_KEY = $00061085; -{ New AA modes (V39) } - EURO72PRODUCTHAM_KEY = $00069824; - EURO72PRODUCTHAMLACE_KEY = $00069825; - EURO72LORESHAM_KEY = $00069804; - EURO72LORESHAMLACE_KEY = $00069805; - EURO72EXTRALORESHAM_KEY = EURO72HAM_KEY; - EURO72EXTRALORESHAMLACE_KEY = EURO72HAMLACE_KEY ; - EURO72EXTRALORESEHB_KEY = EURO72EXTRAHALFBRITE_KEY; - EURO72EXTRALORESEHBLACE_KEY = EURO72EXTRAHALFBRITELACE_KEY; - EURO72LORESEHB_KEY = $00069084; - EURO72LORESEHBLACE_KEY = $00069085; - EURO72EHB_KEY = $000690a4; - EURO72EHBLACE_KEY = $000690a5; -{ These ModeIDs are the scandoubled equivalents of the above, with the - * exception of the DualPlayfield modes, as AA does not allow for scandoubling - * dualplayfield. - } - EURO72EXTRALORESDBL_KEY = $00061000; - EURO72LORESDBL_KEY = $00069000; - EURO72PRODUCTDBL_KEY = $00069020; - EURO72EXTRALORESHAMDBL_KEY = $00061800; - EURO72LORESHAMDBL_KEY = $00069800; - EURO72PRODUCTHAMDBL_KEY = $00069820; - EURO72EXTRALORESEHBDBL_KEY = $00061080; - EURO72LORESEHBDBL_KEY = $00069080; - EURO72PRODUCTEHBDBL_KEY = $000690a0; - - - EURO36_MONITOR_ID = $00071000; - -{ Euro36 modeids can be ORed with the default modeids a la NTSC and PAL. - * For example, Euro36 SuperHires is - * (EURO36_MONITOR_ID OR SUPER_KEY) - } - - SUPER72_MONITOR_ID = $00081000; - -{ Super72 modeids can be ORed with the default modeids a la NTSC and PAL. - * For example, Super72 SuperHiresLace (80$600) is - * (SUPER72_MONITOR_ID OR SUPERLACE_KEY). - * The following scandoubled Modes are the exception: - } - SUPER72LORESDBL_KEY = $00081008; - SUPER72HIRESDBL_KEY = $00089008; - SUPER72SUPERDBL_KEY = $00089028; - SUPER72LORESHAMDBL_KEY = $00081808; - SUPER72HIRESHAMDBL_KEY = $00089808; - SUPER72SUPERHAMDBL_KEY = $00089828; - SUPER72LORESEHBDBL_KEY = $00081088; - SUPER72HIRESEHBDBL_KEY = $00089088; - SUPER72SUPEREHBDBL_KEY = $000890a8; - - -{ These monitors and modes were added for the V39 release. } - - DBLNTSC_MONITOR_ID = $00091000; - - DBLNTSCLORES_KEY = $00091000; - DBLNTSCLORESFF_KEY = $00091004; - DBLNTSCLORESHAM_KEY = $00091800; - DBLNTSCLORESHAMFF_KEY = $00091804; - DBLNTSCLORESEHB_KEY = $00091080; - DBLNTSCLORESEHBFF_KEY = $00091084; - DBLNTSCLORESLACE_KEY = $00091005; - DBLNTSCLORESHAMLACE_KEY = $00091805; - DBLNTSCLORESEHBLACE_KEY = $00091085; - DBLNTSCLORESDPF_KEY = $00091400; - DBLNTSCLORESDPFFF_KEY = $00091404; - DBLNTSCLORESDPFLACE_KEY = $00091405; - DBLNTSCLORESDPF2_KEY = $00091440; - DBLNTSCLORESDPF2FF_KEY = $00091444; - DBLNTSCLORESDPF2LACE_KEY = $00091445; - DBLNTSCHIRES_KEY = $00099000; - DBLNTSCHIRESFF_KEY = $00099004; - DBLNTSCHIRESHAM_KEY = $00099800; - DBLNTSCHIRESHAMFF_KEY = $00099804; - DBLNTSCHIRESLACE_KEY = $00099005; - DBLNTSCHIRESHAMLACE_KEY = $00099805; - DBLNTSCHIRESEHB_KEY = $00099080; - DBLNTSCHIRESEHBFF_KEY = $00099084; - DBLNTSCHIRESEHBLACE_KEY = $00099085; - DBLNTSCHIRESDPF_KEY = $00099400; - DBLNTSCHIRESDPFFF_KEY = $00099404; - DBLNTSCHIRESDPFLACE_KEY = $00099405; - DBLNTSCHIRESDPF2_KEY = $00099440; - DBLNTSCHIRESDPF2FF_KEY = $00099444; - DBLNTSCHIRESDPF2LACE_KEY = $00099445; - DBLNTSCEXTRALORES_KEY = $00091200; - DBLNTSCEXTRALORESHAM_KEY = $00091a00; - DBLNTSCEXTRALORESEHB_KEY = $00091280; - DBLNTSCEXTRALORESDPF_KEY = $00091600; - DBLNTSCEXTRALORESDPF2_KEY = $00091640; - DBLNTSCEXTRALORESFF_KEY = $00091204; - DBLNTSCEXTRALORESHAMFF_KEY = $00091a04; - DBLNTSCEXTRALORESEHBFF_KEY = $00091284; - DBLNTSCEXTRALORESDPFFF_KEY = $00091604; - DBLNTSCEXTRALORESDPF2FF_KEY = $00091644; - DBLNTSCEXTRALORESLACE_KEY = $00091205; - DBLNTSCEXTRALORESHAMLACE_KEY = $00091a05; - DBLNTSCEXTRALORESEHBLACE_KEY = $00091285; - DBLNTSCEXTRALORESDPFLACE_KEY = $00091605; - DBLNTSCEXTRALORESDPF2LACE_KEY = $00091645; - - DBLPAL_MONITOR_ID = $000a1000; - - DBLPALLORES_KEY = $000a1000; - DBLPALLORESFF_KEY = $000a1004; - DBLPALLORESHAM_KEY = $000a1800; - DBLPALLORESHAMFF_KEY = $000a1804; - DBLPALLORESEHB_KEY = $000a1080; - DBLPALLORESEHBFF_KEY = $000a1084; - DBLPALLORESLACE_KEY = $000a1005; - DBLPALLORESHAMLACE_KEY = $000a1805; - DBLPALLORESEHBLACE_KEY = $000a1085; - DBLPALLORESDPF_KEY = $000a1400; - DBLPALLORESDPFFF_KEY = $000a1404; - DBLPALLORESDPFLACE_KEY = $000a1405; - DBLPALLORESDPF2_KEY = $000a1440; - DBLPALLORESDPF2FF_KEY = $000a1444; - DBLPALLORESDPF2LACE_KEY = $000a1445; - DBLPALHIRES_KEY = $000a9000; - DBLPALHIRESFF_KEY = $000a9004; - DBLPALHIRESHAM_KEY = $000a9800; - DBLPALHIRESHAMFF_KEY = $000a9804; - DBLPALHIRESLACE_KEY = $000a9005; - DBLPALHIRESHAMLACE_KEY = $000a9805; - DBLPALHIRESEHB_KEY = $000a9080; - DBLPALHIRESEHBFF_KEY = $000a9084; - DBLPALHIRESEHBLACE_KEY = $000a9085; - DBLPALHIRESDPF_KEY = $000a9400; - DBLPALHIRESDPFFF_KEY = $000a9404; - DBLPALHIRESDPFLACE_KEY = $000a9405; - DBLPALHIRESDPF2_KEY = $000a9440; - DBLPALHIRESDPF2FF_KEY = $000a9444; - DBLPALHIRESDPF2LACE_KEY = $000a9445; - DBLPALEXTRALORES_KEY = $000a1200; - DBLPALEXTRALORESHAM_KEY = $000a1a00; - DBLPALEXTRALORESEHB_KEY = $000a1280; - DBLPALEXTRALORESDPF_KEY = $000a1600; - DBLPALEXTRALORESDPF2_KEY = $000a1640; - DBLPALEXTRALORESFF_KEY = $000a1204; - DBLPALEXTRALORESHAMFF_KEY = $000a1a04; - DBLPALEXTRALORESEHBFF_KEY = $000a1284; - DBLPALEXTRALORESDPFFF_KEY = $000a1604; - DBLPALEXTRALORESDPF2FF_KEY = $000a1644; - DBLPALEXTRALORESLACE_KEY = $000a1205; - DBLPALEXTRALORESHAMLACE_KEY = $000a1a05; - DBLPALEXTRALORESEHBLACE_KEY = $000a1285; - DBLPALEXTRALORESDPFLACE_KEY = $000a1605; - DBLPALEXTRALORESDPF2LACE_KEY = $000a1645; - - -{ Use these tags for passing to BestModeID() (V39) } - - SPECIAL_FLAGS = $100E; - { Original: - SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE; - ( Mu?te aufgrund eines Fehler in PCQ ge?ndert werden ) - } - - - BIDTAG_DIPFMustHave = $80000001; { mask of the DIPF_ flags the ModeID must have } - { Default - NULL } - BIDTAG_DIPFMustNotHave = $80000002; { mask of the DIPF_ flags the ModeID must not have } - { Default - SPECIAL_FLAGS } - BIDTAG_ViewPort = $80000003; { ViewPort for which a ModeID is sought. } - { Default - NULL } - BIDTAG_NominalWidth = $80000004; { \ together make the aspect ratio and } - BIDTAG_NominalHeight = $80000005; { / override the vp->Width/Height. } - { Default - SourceID NominalDimensionInfo, - * or vp->DWidth/Height, or (640 * 200), - * in that preferred order. - } - BIDTAG_DesiredWidth = $80000006; { \ Nominal Width and Height of the } - BIDTAG_DesiredHeight = $80000007; { / returned ModeID. } - { Default - same as Nominal } - BIDTAG_Depth = $80000008; { ModeID must support this depth. } - { Default - vp->RasInfo->BitMap->Depth or 1 } - BIDTAG_MonitorID = $80000009; { ModeID must use this monitor. } - { Default - use best monitor available } - BIDTAG_SourceID = $8000000a; { instead of a ViewPort. } - { Default - VPModeID(vp) if BIDTAG_ViewPort is - * specified, else leave the DIPFMustHave and - * DIPFMustNotHave values untouched. - } - BIDTAG_RedBits = $8000000b; { \ } - BIDTAG_BlueBits = $8000000c; { > Match up from the database } - BIDTAG_GreenBits = $8000000d; { / } - { Default - 4 } - BIDTAG_GfxPrivate = $8000000e; { Private } - - -const - -{ bplcon0 defines } - - MODE_640 = $8000; - PLNCNTMSK = $7; { how many bit planes? } - { 0 = none, 1->6 = 1->6, 7 = reserved } - PLNCNTSHFT = 12; { bits to shift for bplcon0 } - PF2PRI = $40; { bplcon2 bit } - COLORON = $0200; { disable color burst } - DBLPF = $400; - HOLDNMODIFY = $800; - INTERLACE = 4; { interlace mode for 400 } - -{ bplcon1 defines } - - PFA_FINE_SCROLL = $F; - PFB_FINE_SCROLL_SHIFT = 4; - PF_FINE_SCROLL_MASK = $F; - -{ display window start and stop defines } - - DIW_HORIZ_POS = $7F; { horizontal start/stop } - DIW_VRTCL_POS = $1FF; { vertical start/stop } - DIW_VRTCL_POS_SHIFT = $7; - -{ Data fetch start/stop horizontal position } - - DFTCH_MASK = $FF; - -{ vposr bits } - - VPOSRLOF = $8000; - - { include define file for displayinfo database } - -{ the "public" handle to a DisplayInfoRecord } -Type - - DisplayInfoHandle = APTR; - -{ datachunk type identifiers } - -CONST - DTAG_DISP = $80000000; - DTAG_DIMS = $80001000; - DTAG_MNTR = $80002000; - DTAG_NAME = $80003000; - DTAG_VEC = $80004000; { internal use only } - -Type - - pQueryHeader = ^tQueryHeader; - tQueryHeader = record - tructID, { datachunk type identifier } - DisplayID, { copy of display record key } - SkipID, { TAG_SKIP -- see tagitems.h } - Length : ULONG; { length of local data in double-longwords } - END; - - pDisplayInfo = ^tDisplayInfo; - tDisplayInfo = record - Header : tQueryHeader; - NotAvailable : Word; { IF NULL available, else see defines } - PropertyFlags : ULONG; { Properties of this mode see defines } - Resolution : tPoint; { ticks-per-pixel X/Y } - PixelSpeed : Word; { aproximation in nanoseconds } - NumStdSprites : Word; { number of standard amiga sprites } - PaletteRange : Word; { distinguishable shades available } - SpriteResolution : tPoint; { std sprite ticks-per-pixel X/Y } - pad : Array[0..3] of Byte; - RedBits : Byte; - GreenBits : Byte; - BlueBits : Byte; - pad2 : array [0..4] of Byte; - reserved : Array[0..1] of ULONG; { terminator } - END; - -{ availability } - -CONST - DI_AVAIL_NOCHIPS =$0001; - DI_AVAIL_NOMONITOR =$0002; - DI_AVAIL_NOTWITHGENLOCK =$0004; - -{ mode properties } - - DIPF_IS_LACE = $00000001; - DIPF_IS_DUALPF = $00000002; - DIPF_IS_PF2PRI = $00000004; - DIPF_IS_HAM = $00000008; - - DIPF_IS_ECS = $00000010; { note: ECS modes (SHIRES, VGA, AND ** - PRODUCTIVITY) do not support ** - attached sprites. ** - } - DIPF_IS_AA = $00010000; { AA modes - may only be available - ** if machine has correct memory - ** type to support required - ** bandwidth - check availability. - ** (V39) - } - DIPF_IS_PAL = $00000020; - DIPF_IS_SPRITES = $00000040; - DIPF_IS_GENLOCK = $00000080; - - DIPF_IS_WB = $00000100; - DIPF_IS_DRAGGABLE = $00000200; - DIPF_IS_PANELLED = $00000400; - DIPF_IS_BEAMSYNC = $00000800; - - DIPF_IS_EXTRAHALFBRITE = $00001000; - -{ The following DIPF_IS_... flags are new for V39 } - DIPF_IS_SPRITES_ATT = $00002000; { supports attached sprites } - DIPF_IS_SPRITES_CHNG_RES = $00004000; { supports variable sprite resolution } - DIPF_IS_SPRITES_BORDER = $00008000; { sprite can be displayed in the border } - DIPF_IS_SCANDBL = $00020000; { scan doubled } - DIPF_IS_SPRITES_CHNG_BASE = $00040000; - { can change the sprite base colour } - DIPF_IS_SPRITES_CHNG_PRI = $00080000; - { can change the sprite priority - ** with respect to the playfield(s). - } - DIPF_IS_DBUFFER = $00100000; { can support double buffering } - DIPF_IS_PROGBEAM = $00200000; { is a programmed beam-sync mode } - DIPF_IS_FOREIGN = $80000000; { this mode is not native to the Amiga } - -Type - pDimensionInfo =^tDimensionInfo; - tDimensionInfo = record - Header : tQueryHeader; - MaxDepth, { log2( max number of colors ) } - MinRasterWidth, { minimum width in pixels } - MinRasterHeight, { minimum height in pixels } - MaxRasterWidth, { maximum width in pixels } - MaxRasterHeight : Word; { maximum height in pixels } - Nominal, { "standard" dimensions } - MaxOScan, { fixed, hardware dependant } - VideoOScan, { fixed, hardware dependant } - TxtOScan, { editable via preferences } - StdOScan : tRectangle; { editable via preferences } - pad : Array[0..13] of Byte; - reserved : Array[0..1] of Longint; { terminator } - END; - - pMonitorInfo = ^tMonitorInfo; - tMonitorInfo = record - Header : tQueryHeader; - Mspc : pMonitorSpec; { pointer to monitor specification } - ViewPosition, { editable via preferences } - ViewResolution : tPoint; { standard monitor ticks-per-pixel } - ViewPositionRange : tRectangle; { fixed, hardware dependant } - TotalRows, { display height in scanlines } - TotalColorClocks, { scanline width in 280 ns units } - MinRow : Word; { absolute minimum active scanline } - Compatibility : smallint; { how this coexists with others } - pad : Array[0..31] of Byte; - MouseTicks : tPoint; - DefaultViewPosition : tPoint; - PreferredModeID : ULONG; - reserved : Array[0..1] of ULONG; { terminator } - END; - -{ monitor compatibility } - -CONST - MCOMPAT_MIXED = 0; { can share display with other MCOMPAT_MIXED } - MCOMPAT_SELF = 1; { can share only within same monitor } - MCOMPAT_NOBODY= -1; { only one viewport at a time } - - DISPLAYNAMELEN = 32; - -Type - pNameInfo = ^tNameInfo; - tNameInfo = record - Header : tQueryHeader; - Name : Array[0..DISPLAYNAMELEN-1] of Char; - reserved : Array[0..1] of ULONG; { terminator } - END; - - -{****************************************************************************} - -{ The following VecInfo structure is PRIVATE, for our use only - * Touch these, and burn! (V39) - } -Type - pVecInfo = ^tVecInfo; - tVecInfo = record - Header : tQueryHeader; - Vec : Pointer; - Data : Pointer; - vi_Type : WORD; { Type in C Includes } - pad : Array[0..2] of WORD; - reserved : Array[0..1] of ULONG; - end; - - -CONST - VTAG_END_CM = $00000000; - VTAG_CHROMAKEY_CLR = $80000000; - VTAG_CHROMAKEY_SET = $80000001; - VTAG_BITPLANEKEY_CLR = $80000002; - VTAG_BITPLANEKEY_SET = $80000003; - VTAG_BORDERBLANK_CLR = $80000004; - VTAG_BORDERBLANK_SET = $80000005; - VTAG_BORDERNOTRANS_CLR = $80000006; - VTAG_BORDERNOTRANS_SET = $80000007; - VTAG_CHROMA_PEN_CLR = $80000008; - VTAG_CHROMA_PEN_SET = $80000009; - VTAG_CHROMA_PLANE_SET = $8000000A; - VTAG_ATTACH_CM_SET = $8000000B; - VTAG_NEXTBUF_CM = $8000000C; - VTAG_BATCH_CM_CLR = $8000000D; - VTAG_BATCH_CM_SET = $8000000E; - VTAG_NORMAL_DISP_GET = $8000000F; - VTAG_NORMAL_DISP_SET = $80000010; - VTAG_COERCE_DISP_GET = $80000011; - VTAG_COERCE_DISP_SET = $80000012; - VTAG_VIEWPORTEXTRA_GET = $80000013; - VTAG_VIEWPORTEXTRA_SET = $80000014; - VTAG_CHROMAKEY_GET = $80000015; - VTAG_BITPLANEKEY_GET = $80000016; - VTAG_BORDERBLANK_GET = $80000017; - VTAG_BORDERNOTRANS_GET = $80000018; - VTAG_CHROMA_PEN_GET = $80000019; - VTAG_CHROMA_PLANE_GET = $8000001A; - VTAG_ATTACH_CM_GET = $8000001B; - VTAG_BATCH_CM_GET = $8000001C; - VTAG_BATCH_ITEMS_GET = $8000001D; - VTAG_BATCH_ITEMS_SET = $8000001E; - VTAG_BATCH_ITEMS_ADD = $8000001F; - VTAG_VPMODEID_GET = $80000020; - VTAG_VPMODEID_SET = $80000021; - VTAG_VPMODEID_CLR = $80000022; - VTAG_USERCLIP_GET = $80000023; - VTAG_USERCLIP_SET = $80000024; - VTAG_USERCLIP_CLR = $80000025; -{ The following tags are V39 specific. They will be ignored (returing error -3) by - earlier versions } - VTAG_PF1_BASE_GET = $80000026; - VTAG_PF2_BASE_GET = $80000027; - VTAG_SPEVEN_BASE_GET = $80000028; - VTAG_SPODD_BASE_GET = $80000029; - VTAG_PF1_BASE_SET = $8000002a; - VTAG_PF2_BASE_SET = $8000002b; - VTAG_SPEVEN_BASE_SET = $8000002c; - VTAG_SPODD_BASE_SET = $8000002d; - VTAG_BORDERSPRITE_GET = $8000002e; - VTAG_BORDERSPRITE_SET = $8000002f; - VTAG_BORDERSPRITE_CLR = $80000030; - VTAG_SPRITERESN_SET = $80000031; - VTAG_SPRITERESN_GET = $80000032; - VTAG_PF1_TO_SPRITEPRI_SET = $80000033; - VTAG_PF1_TO_SPRITEPRI_GET = $80000034; - VTAG_PF2_TO_SPRITEPRI_SET = $80000035; - VTAG_PF2_TO_SPRITEPRI_GET = $80000036; - VTAG_IMMEDIATE = $80000037; - VTAG_FULLPALETTE_SET = $80000038; - VTAG_FULLPALETTE_GET = $80000039; - VTAG_FULLPALETTE_CLR = $8000003A; - VTAG_DEFSPRITERESN_SET = $8000003B; - VTAG_DEFSPRITERESN_GET = $8000003C; - -{ all the following tags follow the new, rational standard for videocontrol tags: - * VC_xxx,state set the state of attribute 'xxx' to value 'state' - * VC_xxx_QUERY,&var get the state of attribute 'xxx' and store it into the longword - * pointed to by &var. - * - * The following are new for V40: - } - - VC_IntermediateCLUpdate = $80000080; - { default=true. When set graphics will update the intermediate copper - * lists on color changes, etc. When false, it won't, and will be faster. - } - VC_IntermediateCLUpdate_Query = $80000081; - - VC_NoColorPaletteLoad = $80000082; - { default = false. When set, graphics will only load color 0 - * for this ViewPort, and so the ViewPort's colors will come - * from the previous ViewPort's. - * - * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined. - } - VC_NoColorPaletteLoad_Query = $80000083; - - VC_DUALPF_Disable = $80000084; - { default = false. When this flag is set, the dual-pf bit - in Dual-Playfield screens will be turned off. Even bitplanes - will still come from the first BitMap and odd bitplanes - from the second BitMap, and both R[xy]Offsets will be - considered. This can be used (with appropriate palette - selection) for cross-fades between differently scrolling - images. - When this flag is turned on, colors will be loaded for - the viewport as if it were a single viewport of depth - depth1+depth2 } - VC_DUALPF_Disable_Query = $80000085; - - -const - - SPRITE_ATTACHED = $80; - -type - - pSimpleSprite = ^tSimpleSprite; - tSimpleSprite = record - posctldata : Pointer; - height : Word; - x,y : Word; { current position } - num : Word; - end; - - pExtSprite = ^tExtSprite; - tExtSprite = record - es_SimpleSprite : tSimpleSprite; { conventional simple sprite structure } - es_wordwidth : WORD; { graphics use only, subject to change } - es_flags : WORD; { graphics use only, subject to change } - end; - -const -{ tags for AllocSpriteData() } - SPRITEA_Width = $81000000; - SPRITEA_XReplication = $81000002; - SPRITEA_YReplication = $81000004; - SPRITEA_OutputHeight = $81000006; - SPRITEA_Attached = $81000008; - SPRITEA_OldDataFormat = $8100000a; { MUST pass in outputheight if using this tag } - -{ tags for GetExtSprite() } - GSTAG_SPRITE_NUM = $82000020; - GSTAG_ATTACHED = $82000022; - GSTAG_SOFTSPRITE = $82000024; - -{ tags valid for either GetExtSprite or ChangeExtSprite } - GSTAG_SCANDOUBLED = $83000000; { request "NTSC-Like" height if possible. } - - -Type - pBitScaleArgs = ^tBitScaleArgs; - tBitScaleArgs = record - bsa_SrcX, bsa_SrcY, { source origin } - bsa_SrcWidth, bsa_SrcHeight, { source size } - bsa_XSrcFactor, bsa_YSrcFactor, { scale factor denominators } - bsa_DestX, bsa_DestY, { destination origin } - bsa_DestWidth, bsa_DestHeight, { destination size result } - bsa_XDestFactor, bsa_YDestFactor : Word; { scale factor numerators } - bsa_SrcBitMap, { source BitMap } - bsa_DestBitMap : pBitMap; { destination BitMap } - bsa_Flags : ULONG; { reserved. Must be zero! } - bsa_XDDA, bsa_YDDA : Word; { reserved } - bsa_Reserved1, - bsa_Reserved2 : Longint; - END; - - { tag definitions for GetRPAttr, SetRPAttr } - -const - RPTAG_Font = $80000000; { get/set font } - RPTAG_APen = $80000002; { get/set apen } - RPTAG_BPen = $80000003; { get/set bpen } - RPTAG_DrMd = $80000004; { get/set draw mode } - RPTAG_OutlinePen = $80000005; { get/set outline pen. corrected case. } - RPTAG_WriteMask = $80000006; { get/set WriteMask } - RPTAG_MaxPen = $80000007; { get/set maxpen } - - RPTAG_DrawBounds = $80000008; { get only rastport draw bounds. pass &rect } - - - - - - -type - - pGfxBase = ^tGfxBase; - tGfxBase = record - LibNode : tLibrary; - ActiView : pView; { ViewPtr } - copinit : pcopinit; { (copinitptr) ptr to copper start up list } - cia : Pointer; { for 8520 resource use } - blitter : Pointer; { for future blitter resource use } - LOFlist : Pointer; - SHFlist : Pointer; - blthd, - blttl : Pointer;//pbltnode; - bsblthd, - bsblttl : Pointer; //pbltnode; { Previous four are (bltnodeptr) } - vbsrv, - timsrv, - bltsrv : tInterrupt; - TextFonts : tList; - DefaultFont : pTextFont; { TextFontPtr } - Modes : Word; { copy of current first bplcon0 } - VBlank : Shortint; - Debug : Shortint; - BeamSync : smallint; - system_bplcon0 : smallint; { it is ored into each bplcon0 for display } - SpriteReserved : Byte; - bytereserved : Byte; - Flags : Word; - BlitLock : smallint; - BlitNest : smallint; - - BlitWaitQ : tList; - BlitOwner : pTask; { TaskPtr } - TOF_WaitQ : tList; - DisplayFlags : Word; { NTSC PAL GENLOC etc} - - { Display flags are determined at power on } - - SimpleSprites : Pointer; { SimpleSpritePtr ptr } - MaxDisplayRow : Word; { hardware stuff, do not use } - MaxDisplayColumn : Word; { hardware stuff, do not use } - NormalDisplayRows : Word; - NormalDisplayColumns : Word; - - { the following are for standard non interlace, 1/2 wb width } - - NormalDPMX : Word; { Dots per meter on display } - NormalDPMY : Word; { Dots per meter on display } - LastChanceMemory : pSignalSemaphore; { SignalSemaphorePtr } - LCMptr : Pointer; - MicrosPerLine : Word; { 256 time usec/line } - MinDisplayColumn : Word; - ChipRevBits0 : Byte; - MemType : Byte; - crb_reserved : Array[0..3] of Byte; - monitor_id : Word; { normally null } - hedley : Array[0..7] of ULONG; - hedley_sprites : Array[0..7] of ULONG; { sprite ptrs for intuition mouse } - hedley_sprites1 : Array[0..7] of ULONG; { sprite ptrs for intuition mouse } - hedley_count : smallint; - hedley_flags : Word; - hedley_tmp : smallint; - hash_table : Pointer; - current_tot_rows : Word; - current_tot_cclks : Word; - hedley_hint : Byte; - hedley_hint2 : Byte; - nreserved : Array[0..3] of ULONG; - a2024_sync_raster : Pointer; - control_delta_pal : Word; - control_delta_ntsc : Word; - current_monitor : pMonitorSpec; - MonitorList : tList; - default_monitor : pMonitorSpec; - MonitorListSemaphore : pSignalSemaphore; - DisplayInfoDataBase : Pointer; - TopLine : Word; - ActiViewCprSemaphore : pSignalSemaphore; - UtilityBase : Pointer; { for hook AND tag utilities } - ExecBase : Pointer; { to link with rom.lib } - bwshifts : Pointer; - StrtFetchMasks, - StopFetchMasks, - Overrun, - RealStops : Pointer; - SpriteWidth, { current width (in words) of sprites } - SpriteFMode : WORD; { current sprite fmode bits } - SoftSprites, { bit mask of size change knowledgeable sprites } - arraywidth : Shortint; - DefaultSpriteWidth : WORD; { what width intuition wants } - SprMoveDisable : Shortint; - WantChips, - BoardMemType, - Bugs : Byte; - gb_LayersBase : Pointer; - ColorMask : ULONG; - IVector, - IData : Pointer; - SpecialCounter : ULONG; { special for double buffering } - DBList : Pointer; - MonitorFlags : WORD; - ScanDoubledSprites, - BP3Bits : Byte; - MonitorVBlank : tAnalogSignalInterval; - natural_monitor : pMonitorSpec; - ProgData : Pointer; - ExtSprites : Byte; - pad3 : Byte; - GfxFlags : WORD; - VBCounter : ULONG; - HashTableSemaphore : pSignalSemaphore; - HWEmul : Array[0..8] of Pointer; - end; - -const - - NTSC = 1; - GENLOC = 2; - PAL = 4; - TODA_SAFE = 8; - - BLITMSG_FAULT = 4; - -{ bits defs for ChipRevBits } - GFXB_BIG_BLITS = 0 ; - GFXB_HR_AGNUS = 0 ; - GFXB_HR_DENISE = 1 ; - GFXB_AA_ALICE = 2 ; - GFXB_AA_LISA = 3 ; - GFXB_AA_MLISA = 4 ; { internal use only. } - - GFXF_BIG_BLITS = 1 ; - GFXF_HR_AGNUS = 1 ; - GFXF_HR_DENISE = 2 ; - GFXF_AA_ALICE = 4 ; - GFXF_AA_LISA = 8 ; - GFXF_AA_MLISA = 16; { internal use only } - -{ Pass ONE of these to SetChipRev() } - SETCHIPREV_A = GFXF_HR_AGNUS; - SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE); - SETCHIPREV_AA = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS); - SETCHIPREV_BEST= $ffffffff; - -{ memory type } - BUS_16 = 0; - NML_CAS = 0; - BUS_32 = 1; - DBL_CAS = 2; - BANDWIDTH_1X = (BUS_16 OR NML_CAS); - BANDWIDTH_2XNML= BUS_32; - BANDWIDTH_2XDBL= DBL_CAS; - BANDWIDTH_4X = (BUS_32 OR DBL_CAS); - -{ GfxFlags (private) } - NEW_DATABASE = 1; - - GRAPHICSNAME : PChar = 'graphics.library'; - - -var - GfxBase : pLibrary; - -procedure AddAnimOb(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort); -procedure AddBob(bob : PBob; Rp : PRastPort); -function AddDisplayDriverA(P: Pointer; tags: PTagItem): LongInt; -procedure AddFont(TextFont : PTextFont); -procedure AddVSprite(VSprite : PVSprite; Rp : PRastPort); -function AllocBitMap(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap) : PBitMap; -function AllocDBufInfo(Vp : PViewPort) : PDBufInfo; -function AllocRaster(Width : LongWord; Height : LongWord) : PChar; -function AllocSpriteDataA(const Bm : PBitMap;const tags : PTagItem) : PExtSprite; -procedure AndRectRegion(region : PRegion;const rectangle : pRectangle); -function AndRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -procedure Animate(AnKey : PPAnimOb; Rp : PRastPort); -function AreaDraw(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; -function AreaEllipse(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word) : LongInt; -function AreaEnd(Rp : PRastPort) : LongInt; -function AreaMove(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; -procedure AskFont(Rp : PRastPort; textAttr : pTextAttr); -function AskSoftStyle(Rp : PRastPort) : LongWord; -function AttachPalExtra(cm : pColorMap; Vp : PViewPort) : LongInt; -function AttemptLockLayerRom(layer : pLayer) : BOOLEAN; -function BestModeIDA(const tags : PTagItem) : LongWord; -procedure BitMapScale(bitScaleArgs : pBitScaleArgs); -function BltBitMap(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar) : LongInt; -procedure BltBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); -procedure BltClear(memBlock : PChar; byteCount : LongWord; Flags : LongWord); -procedure BltMaskBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar); -procedure BltPattern(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord); -procedure BltTemplate(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt); -function CalcIVG(v : pView; Vp : PViewPort) : WORD; -procedure CBump(copList : pUCopList); -function ChangeExtSpriteA(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem) : LongInt; -procedure ChangeSprite(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD); -procedure ChangeVPBitMap(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo); -procedure ClearEOL(Rp : PRastPort); -function ClearRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -procedure ClearRegion(region : PRegion); -procedure ClearScreen(Rp : PRastPort); -procedure ClipBlit(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); -procedure CloseFont(TextFont : PTextFont); -function CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN; -procedure CMove(copList : pUCopList; destination : Pointer; data : LongInt); -function CoerceMode(Vp : PViewPort; monitorid : LongWord; Flags : LongWord) : LongWord; -procedure CopySBitMap(layer : pLayer); -function CreateRastPort(): PRastPort; -function CloneRastPort(Rp: PRastPort): PRastPort; -procedure DeinitRastPort(Rp: PRastPort); -procedure FreeRastPort(Rp: PRastPort); -procedure CWait(copList : pUCopList; v : LongInt; h : LongInt); -procedure DisownBlitter; -procedure DisposeRegion(region : PRegion); -procedure DoCollision(Rp : PRastPort); -procedure Draw(Rp : PRastPort; x : LongInt; y : LongInt); -procedure DrawEllipse(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt); -procedure DrawGList(Rp : PRastPort; Vp : PViewPort); -procedure EraseRect(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -function ExtendFont(font : PTextFont;const fontTags : PTagItem) : LongWord; -function FindColor(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt) : LongInt; -function FindDisplayInfo(displayID : LongWord) : Pointer; -function Flood(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt) : BOOLEAN; -procedure FontExtent(const font : PTextFont; fontExtent : pTextExtent); -procedure FreeBitMap(Bm : PBitMap); -procedure FreeColorMap(colorMap : pColorMap); -procedure FreeCopList(copList : pCopList); -procedure FreeCprList(cprList : pcprlist); -procedure FreeDBufInfo(dbi : PDBufInfo); -procedure FreeGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt); -procedure FreeRaster(p : PChar; Width : LongWord; Height : LongWord); -procedure FreeSprite(num : LongInt); -procedure FreeSpriteData(sp : PExtSprite); -procedure FreeVPortCopLists(Vp : PViewPort); -function GetAPen(Rp : PRastPort) : LongWord; -function GetBitMapAttr(const Bm : PBitMap; attrnum : LongWord) : LongWord; -function GetBPen(Rp : PRastPort) : LongWord; -function GetColorMap(entries : LongInt) : pColorMap; -function GetDisplayInfoData(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord) : LongWord; -function GetDrMd(Rp : PRastPort) : LongWord; -function GetExtSpriteA(ss : PExtSprite;const tags : PTagItem) : LongInt; -function GetGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt) : BOOLEAN; -function GetOutlinePen(Rp : PRastPort) : LongWord; -procedure GetRGB32(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pulong); -function GetRGB4(colorMap : pColorMap; entry : LongInt) : LongWord; -procedure GetRPAttrsA(const Rp : PRastPort;const tags : PTagItem); -function GetSprite(sprite : pSimpleSprite; num : LongInt) : smallint; -function GetVPModeID(const Vp : PViewPort) : LongInt; -procedure GfxAssociate(const associateNode : Pointer; gfxNodePtr : Pointer); -procedure GfxFree(gfxNodePtr : Pointer); -function GfxLookUp(const associateNode : Pointer) : Pointer; -function GfxNew(gfxNodeType : LongWord) : Pointer; -procedure InitArea(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt); -procedure InitBitMap(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt); -procedure InitGels(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo); -procedure InitGMasks(AnOb : PAnimOb); -procedure InitMasks(VSprite : PVSprite); -procedure InitRastPort(Rp : PRastPort); -function InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt) : pTmpRas; -procedure InitView(view : pView); -procedure InitVPort(Vp : PViewPort); -procedure LoadRGB32(Vp : PViewPort;const table : pULONG); -procedure LoadRGB4(Vp : PViewPort;const colors : pWord; count : LongInt); -procedure LoadView(view : pView); -procedure LockLayerRom(layer : pLayer); -function MakeVPort(view : pView; Vp : PViewPort) : LongWord; -function ModeNotAvailable(modeID : LongWord) : LongInt; -procedure Move(Rp : PRastPort; x : LongInt; y : LongInt); -procedure MoveSprite(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt); -function MrgCop(view : pView) : LongWord; -function NewRegion : PRegion; -function NextDisplayInfo(displayID : LongWord) : LongWord; -function ObtainBestPenA(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem) : LongInt; -function ObtainPen(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt) : LongWord; -function OpenFont(textAttr : pTextAttr) : PTextFont; -function OpenMonitor(const monitorName : PChar; displayID : LongWord) : pMonitorSpec; -function OrRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -function OrRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -procedure OwnBlitter; -procedure PolyDraw(Rp : PRastPort; count : LongInt;const polyTable : pLongint); -procedure QBlit(blit : pbltnode); -procedure QBSBlit(blit : pbltnode); -function ReadPixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongWord; -function ReadPixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; -function ReadPixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; -procedure RectFill(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -procedure ReleasePen(cm : pColorMap; n : LongWord); -procedure RemFont(TextFont : PTextFont); -procedure RemIBob(bob : PBob; Rp : PRastPort; Vp : PViewPort); -procedure RemVSprite(VSprite : PVSprite); -function ScalerDiv(factor : LongWord; numerator : LongWord; denominator : LongWord) : WORD; -procedure ScrollRaster(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -procedure ScrollRasterBF(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -procedure ScrollVPort(Vp : PViewPort); -procedure SetABPenDrMd(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord); -procedure SetAPen(Rp : PRastPort; pen : LongWord); -procedure SetBPen(Rp : PRastPort; pen : LongWord); -function SetChipRev(want : LongWord) : LongWord; -procedure SetCollision(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo); -procedure SetDrMd(Rp : PRastPort; drawMode : LongWord); -function SetFont(Rp : PRastPort;const TextFont : PTextFont) : LongInt; -procedure SetMaxPen(Rp : PRastPort; maxpen : LongWord); -function SetOutlinePen(Rp : PRastPort; pen : LongWord) : LongWord; -procedure SetRast(Rp : PRastPort; pen : LongWord); -procedure SetRGB32(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord); -procedure SetRGB32CM(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord); -procedure SetRGB4(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); -procedure SetRGB4CM(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); -procedure SetRPAttrsA(Rp : PRastPort;const tags : PTagItem); -function SetSoftStyle(Rp : PRastPort; style : LongWord; enable : LongWord) : LongWord; -function SetWriteMask(Rp : PRastPort; msk : LongWord) : LongWord; -procedure SortGList(Rp : PRastPort); -procedure StripFont(font : PTextFont); -procedure SyncSBitMap(layer : pLayer); -function GText(Rp : PRastPort;const string_ : PChar; count : LongWord) : LongInt; -function TextExtent(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent) : smallint; -function TextFit(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord) : LongWord; -function TextLength(Rp : PRastPort;const string_ : PChar; count : LongWord) : smallint; -function UCopperListInit(uCopList : pUCopList; n : LongInt) : pCopList; -procedure UnlockLayerRom(layer : pLayer); -function VBeamPos : LongInt; -function VideoControl(colorMap : pColorMap; tagarray : PTagItem) : BOOLEAN; -procedure WaitBlit; -procedure WaitBOVP(Vp : PViewPort); -procedure WaitTOF; -function WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem) : smallint; -procedure WriteChunkyPixels(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt); -function WritePixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; -function WritePixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; -function WritePixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; -function XorRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -function XorRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; - -{ gfxmacros } -(* -procedure BNDRYOFF (w: PRastPort); -procedure InitAnimate (animkey: PPAnimOb); -procedure SetAfPt(w: PRastPort;p: Pointer; n: Byte); -procedure SetDrPt(w: PRastPort;p: Word); -procedure SetOPen(w: PRastPort;c: Byte); -procedure SetWrMsk(w: PRastPort; m: Byte); - -procedure SafeSetOutlinePen(w : PRastPort; c : byte); -procedure SafeSetWriteMask( w : PRastPort ; m : smallint ) ; - -procedure OFF_DISPLAY (cust: pCustom); -procedure ON_DISPLAY (cust: pCustom); -procedure OFF_SPRITE (cust: pCustom); -procedure ON_SPRITE (cust: pCustom); -procedure OFF_VBLANK (cust: pCustom); -procedure ON_VBLANK (cust: pCustom); -*) - -IMPLEMENTATION -(* -procedure BNDRYOFF (w: PRastPort); -BEGIN - WITH w^ DO BEGIN - Flags := Flags AND (NOT AREAOUTLINE); - END; -END; - -procedure InitAnimate (animkey: PPAnimOb); -BEGIN - animkey^ := NIL; -END; - -procedure SetAfPt(w: PRastPort;p: Pointer; n: Byte); -BEGIN - WITH w^ DO - BEGIN - AreaPtrn := p; - AreaPtSz := n; - END; -END; - -procedure SetDrPt(w: PRastPort;p: Word); -BEGIN - WITH w^ DO - BEGIN - LinePtrn := p; - Flags := Flags OR FRST_DOT; - linpatcnt := 15; - END; -END; - -procedure SetOPen(w: PRastPort;c: Byte); -BEGIN - WITH w^ DO - BEGIN - AOlPen := c; - Flags := Flags OR AREAOUTLINE; - END; -END; - -{ This function is fine, but FOR OS39 the SetWriteMask() gfx function - should be prefered because it SHOULD operate WITH gfx boards as well. - At least I hope it does.... } -procedure SetWrMsk(w: PRastPort; m: Byte); -BEGIN - w^.Mask := m; -END; - -procedure SafeSetOutlinePen(w : PRastPort; c : byte); -begin - IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN begin - w^.AOlPen := c; - w^.Flags := w^.Flags OR AREAOUTLINE; - END ELSE begin - c := SetOutlinePen(w,c); - END; -END; - -procedure SafeSetWriteMask( w : PRastPort ; m : smallint ) ; - VAR x : smallint ; -BEGIN - IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m) - ELSE x := SetWriteMask( w, m ); -END; - -procedure OFF_DISPLAY (cust: pCustom); -BEGIN - cust^.dmacon := BITCLR OR DMAF_RASTER; -END; - -procedure ON_DISPLAY (cust: pCustom); -BEGIN - cust^.dmacon := BITSET OR DMAF_RASTER; -END; - -procedure OFF_SPRITE (cust: pCustom); -BEGIN - cust^.dmacon := BITCLR OR DMAF_SPRITE; -END; - -procedure ON_SPRITE (cust: pCustom); -BEGIN - cust^.dmacon := BITSET OR DMAF_SPRITE; -END; - -procedure OFF_VBLANK (cust: pCustom); -BEGIN - cust^.intena := BITCLR OR INTF_VERTB; -END; - -procedure ON_VBLANK (cust: pCustom); -BEGIN - cust^.intena := BITSET OR INTF_VERTB; -END; - -*) - -procedure AddAnimOb(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort); -type - TLocalCall = procedure(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 26)); - Call(AnOb, AnKey, Rp, GfxBase); -end; - -procedure AddBob(bob : PBob; Rp : PRastPort); -type - TLocalCall = procedure(bob : PBob; Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 16)); - Call(bob, Rp, GfxBase); -end; - -function AddDisplayDriverA(P: Pointer; tags: PTagItem): LongInt; -type - TLocalCall = function(P: Pointer; tags: PTagItem; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 181)); - Result := Call(P, tags, GfxBase); -end; - -procedure AddFont(TextFont : PTextFont); -type - TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 80)); - Call(TextFont, GfxBase); -end; - -procedure AddVSprite(VSprite : PVSprite; Rp : PRastPort); -type - TLocalCall = procedure(VSprite : PVSprite; Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 17)); - Call(VSprite, Rp, GfxBase); -end; - -function AllocBitMap(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap): PBitMap; -type - TLocalCall = function(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap; Base: Pointer): PBitMap; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 153)); - Result := Call(sizex, Sizey, Depth, Flags, Friend_bitmap, GfxBase); -end; - -function AllocDBufInfo(Vp : PViewPort): PDBufInfo; -type - TLocalCall = function(Vp : PViewPort; Base: Pointer): PDBufInfo; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 161)); - Result := Call(Vp, GfxBase); -end; - -function AllocRaster(Width : LongWord; Height : LongWord) : PChar; -type - TLocalCall = function(Width : LongWord; Height : LongWord; Base: Pointer): PChar; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 82)); - Result := Call(Width, Height, GfxBase); -end; - -function AllocSpriteDataA(const Bm : PBitMap;const tags : PTagItem) : PExtSprite; -type - TLocalCall = function(const Bm : PBitMap;const tags : PTagItem; Base: Pointer): PExtSprite; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 170)); - Result := Call(Bm, tags, GfxBase); -end; - -procedure AndRectRegion(region : PRegion;const rectangle : pRectangle); -type - TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 84)); - Call(region, rectangle, GfxBase); -end; - -function AndRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 104)); - Result := Call(srcRegion, destRegion, GfxBase); -end; - -procedure AndRectRegionND(region : PRegion;const rectangle : pRectangle); -type - TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 107)); - Call(region, rectangle, GfxBase); -end; - -function AndRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 108)); - Result := Call(srcRegion, destRegion, GfxBase); -end; - -procedure Animate(AnKey : PPAnimOb; Rp : PRastPort); -type - TLocalCall = procedure(AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 27)); - Call(AnKey, Rp, GfxBase); -end; - -function AreaDraw(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; -type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 43)); - Result := Call(Rp, x, y, GfxBase); -end; - -function AreaEllipse(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word) : LongInt; -type - TLocalCall = function(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 31)); - Result := Call(Rp, xCenter, yCenter, a, b, GfxBase); -end; - -function AreaEnd(Rp : PRastPort) : LongInt; -type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 44)); - Result := Call(Rp, GfxBase); -end; - -function AreaMove(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; -type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 42)); - Result := Call(Rp, x, y, GfxBase); -end; - -procedure AskFont(Rp : PRastPort; textAttr : pTextAttr); -type - TLocalCall = procedure(Rp : PRastPort; textAttr : pTextAttr; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 79)); - Call(Rp, textAttr, GfxBase); -end; - -function AskSoftStyle(Rp : PRastPort) : LongWord; -type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 14)); - Result := Call(Rp, GfxBase); -end; - -function AttachPalExtra(cm : pColorMap; Vp : PViewPort) : LongInt; -type - TLocalCall = function(cm : pColorMap; Vp : PViewPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 139)); - Result := Call(cm, Vp, GfxBase); -end; - -function AttemptLockLayerRom(layer : pLayer) : BOOLEAN; -type - TLocalCall = function(layer : pLayer; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 109)); - Result := Call(layer, GfxBase); -end; - -function BestModeIDA(const tags : PTagItem) : LongWord; -type - TLocalCall = function(const tags : PTagItem; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 175)); - Result := Call(tags, GfxBase); -end; - -procedure BitMapScale(bitScaleArgs : pBitScaleArgs); -type - TLocalCall = procedure(bitScaleArgs : pBitScaleArgs; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 113)); - Call(bitScaleArgs, GfxBase); -end; - -function BltBitMap(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar) : LongInt; -type - TLocalCall = function(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar; Base: Pointer): LongInt ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 5)); - Result := Call(srcBitMap, xSrc, ySrc, destBitMap, xDest, yDest, xSize, ySize, minterm, mask, tempA, GfxBase); -end; - -procedure BltBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); -type - TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 101)); - Call(srcBitMap, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, GfxBase); -end; - -procedure BltClear(memBlock : PChar; byteCount : LongWord; Flags : LongWord); -type - TLocalCall = procedure(memBlock : PChar; byteCount : LongWord; Flags : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 50)); - Call(memBlock, byteCount, Flags, GfxBase); -end; - -procedure BltMaskBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar); -type - TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 106)); - Call(srcBitMap, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, bltMask, GfxBase); -end; - -procedure BltPattern(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord); -type - TLocalCall = procedure(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 52)); - Call(Rp, mask, xMin, yMin, xMax, yMax, maskBPR, GfxBase); -end; - -procedure BltTemplate(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt); -type - TLocalCall = procedure(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 6)); - Call(source, xSrc, srcMod, destRP, xDest, yDest, xSize, ySize, GfxBase); -end; - -function CalcIVG(v : pView; Vp : PViewPort) : WORD; -type - TLocalCall = function(v : pView; Vp : PViewPort; Base: Pointer): WORD; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 138)); - Result := Call(v, Vp, GfxBase); -end; - -procedure CBump(copList : pUCopList); -type - TLocalCall = procedure(copList : pUCopList; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 62)); - Call(copList, GfxBase); -end; - -function ChangeExtSpriteA(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem) : LongInt; -type - TLocalCall = function(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 171)); - Result := Call(Vp, oldsprite, newsprite, tags, GfxBase); -end; - -procedure ChangeSprite(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD); -type - TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 70)); - Call(Vp, sprite, newData, GfxBase); -end; - -procedure ChangeVPBitMap(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo); -type - TLocalCall = procedure(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 157)); - Call(Vp, Bm, db, GfxBase); -end; - -procedure ClearEOL(Rp : PRastPort); -type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 7)); - Call(Rp, GfxBase); -end; - -function ClearRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 87)); - Result := Call(region, rectangle, GfxBase); -end; - -function ClearRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 124)); - Result := Call(region, rectangle, GfxBase); -end; - -procedure ClearRegionRegionND(region1 : PRegion; region2 : PRegion); -type - TLocalCall = procedure(region1 : PRegion; region2 : PRegion; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 141)); - Call(region1,region2, GfxBase); -end; - -procedure ClearRegion(region : PRegion); -type - TLocalCall = procedure(region : PRegion; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 88)); - Call(region, GfxBase); -end; - -procedure ClearScreen(Rp : PRastPort); -type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 8)); - Call(Rp, GfxBase); -end; - -procedure ClipBlit(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); -type - TLocalCall = procedure(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 92)); - Call(srcRP, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, GfxBase); -end; - -procedure CloseFont(TextFont : PTextFont); -type - TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 13)); - Call(TextFont, GfxBase); -end; - -function CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN; -type - TLocalCall = function(monitorSpec : pMonitorSpec; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 120)); - Result := Call(monitorSpec, GfxBase); -end; - -procedure CMove(copList : pUCopList; destination : Pointer; data : LongInt); -type - TLocalCall = procedure(copList : pUCopList; destination : Pointer; data : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 63)); - Call(copList, destination, data, GfxBase); -end; - -function CoerceMode(Vp : PViewPort; monitorid : LongWord; Flags : LongWord) : LongWord; -type - TLocalCall = function(Vp : PViewPort; monitorid : LongWord; Flags : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 156)); - Result := Call(Vp, monitorid, Flags, GfxBase); -end; - -procedure CopySBitMap(layer : pLayer); -type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 75)); - Call(layer, GfxBase); -end; - -function CreateRastPort(): PRastPort; -type - TLocalCall = function(Base: Pointer): PRastPort; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 177)); - Result := Call(GfxBase); -end; - -function CloneRastPort(Rp: PRastPort): PRastPort; -type - TLocalCall = function(Rp: PRastPort; Base: Pointer): PRastPort; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 178)); - Result := Call(Rp, GfxBase); -end; - -procedure DeinitRastPort(Rp: PRastPort); -type - TLocalCall = procedure(Rp: PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 179)); - Call(Rp, GfxBase); -end; - -procedure FreeRastPort(Rp: PRastPort); -type - TLocalCall = procedure(Rp: PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 180)); - Call(Rp, GfxBase); -end; - -procedure CWait(copList : pUCopList; v : LongInt; h : LongInt); -type - TLocalCall = procedure(copList : pUCopList; v : LongInt; h : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 63)); - Call(copList, v, h, GfxBase); -end; - -procedure DisownBlitter; -type - TLocalCall = procedure(Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 77)); - Call(GfxBase); -end; - -procedure DisposeRegion(region : PRegion); -type - TLocalCall = procedure(region : PRegion; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 89)); - Call(region, GfxBase); -end; - -procedure DoCollision(Rp : PRastPort); -type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 18)); - Call(Rp, GfxBase); -end; - -procedure Draw(Rp : PRastPort; x : LongInt; y : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 41)); - Call(Rp, x, y, GfxBase); -end; - -procedure DrawEllipse(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 30)); - Call(Rp, xCenter, yCenter, a, b, GfxBase); -end; - -procedure DrawGList(Rp : PRastPort; Vp : PViewPort); -type - TLocalCall = procedure(Rp : PRastPort; Vp : PViewPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 19)); - Call(Rp, Vp, GfxBase); -end; - -procedure EraseRect(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 135)); - Call(Rp, xMin, yMin, xMax, yMax, GfxBase); -end; - -function ExtendFont(font : PTextFont;const fontTags : PTagItem) : LongWord; -type - TLocalCall = function(font : PTextFont;const fontTags : PTagItem; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 136)); - Result := Call(font, fontTags, GfxBase); -end; - -function FindColor(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt) : LongInt; -type - TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 168)); - Result := Call(cm, r, g, b, maxcolor, GfxBase); -end; - -function FindDisplayInfo(displayID : LongWord) : Pointer; -type - TLocalCall = function(displayID : LongWord; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 122)); - Result := Call(displayID, GfxBase); -end; - -function Flood(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt) : BOOLEAN; -type - TLocalCall = function(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 55)); - Result := Call(Rp, mode, x, y, GfxBase); -end; - -procedure FontExtent(const font : PTextFont; fontExtent : pTextExtent); -type - TLocalCall = procedure(const font : PTextFont; fontExtent : pTextExtent; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 127)); - Call(font, fontExtent, GfxBase); -end; - -procedure FreeBitMap(Bm : PBitMap); -type - TLocalCall = procedure(Bm : PBitMap; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 154)); - Call(Bm, GfxBase); -end; - -procedure FreeColorMap(colorMap : pColorMap); -type - TLocalCall = procedure(colorMap : pColorMap; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 96)); - Call(colorMap, GfxBase); -end; - -procedure FreeCopList(copList : pCopList); -type - TLocalCall = procedure(copList : pCopList; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 91)); - Call(copList, GfxBase); -end; - -procedure FreeCprList(cprList : pcprlist); -type - TLocalCall = procedure(cprList : pcprlist; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 94)); - Call(cprList, GfxBase); -end; - -procedure FreeDBufInfo(dbi : PDBufInfo); -type - TLocalCall = procedure(dbi : PDBufInfo; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 162)); - Call(dbi, GfxBase); -end; - -procedure FreeGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt); -type - TLocalCall = procedure(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 100)); - Call(AnOb, Rp, flag, GfxBase); -end; - -procedure FreeRaster(p : PChar; Width : LongWord; Height : LongWord); -type - TLocalCall = procedure(p : PChar; Width : LongWord; Height : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 83)); - Call(p, Width, Height, GfxBase); -end; - -procedure FreeSprite(num : LongInt); -type - TLocalCall = procedure(num : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 69)); - Call(num, GfxBase); -end; - -procedure FreeSpriteData(sp : PExtSprite); -type - TLocalCall = procedure(sp : PExtSprite; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 172)); - Call(sp, GfxBase); -end; - -procedure FreeVPortCopLists(Vp : PViewPort); -type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 91)); - Call(Vp, GfxBase); -end; - -function GetAPen(Rp : PRastPort) : LongWord; -type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 143)); - Result := Call(Rp, GfxBase); -end; - -function GetBitMapAttr(const Bm : PBitMap; attrnum : LongWord) : LongWord; -type - TLocalCall = function(const Bm : PBitMap; attrnum : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 160)); - Result := Call(Bm, attrnum, GfxBase); -end; - -function GetBPen(Rp : PRastPort) : LongWord; -type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 144)); - Result := Call(Rp, GfxBase); -end; - -function GetColorMap(entries : LongInt) : pColorMap; -type - TLocalCall = function(entries : LongInt; Base: Pointer): pColorMap; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 95)); - Result := Call(entries, GfxBase); -end; - -function GetDisplayInfoData(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord) : LongWord; -type - TLocalCall = function(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 126)); - Result := Call(handle, buf, size, tagID, displayID, GfxBase); -end; - -function GetDrMd(Rp : PRastPort) : LongWord; -type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 145)); - Result := Call(Rp, GfxBase); -end; - -function GetExtSpriteA(ss : PExtSprite;const tags : PTagItem) : LongInt; -type - TLocalCall = function(ss : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 155)); - Result := Call(ss, tags, GfxBase); -end; - -function GetGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt) : BOOLEAN; -type - TLocalCall = function(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 28)); - Result := Call(AnOb, Rp, flag, GfxBase); -end; - -function GetOutlinePen(Rp : PRastPort) : LongWord; -type - TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 146)); - Result := Call(Rp, GfxBase); -end; - -procedure GetRGB32(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong); -type - TLocalCall = procedure(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 150)); - Call(cm, firstcolor, ncolors, table, GfxBase); -end; - -function GetRGB4(colorMap : pColorMap; entry : LongInt) : LongWord; -type - TLocalCall = function(colorMap : pColorMap; entry : LongInt; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 97)); - Result := Call(colorMap, entry, GfxBase); -end; - -procedure GetRPAttrsA(const Rp : PRastPort;const tags : PTagItem); -type - TLocalCall = procedure(const Rp : PRastPort;const tags : PTagItem; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 174)); - Call(Rp, tags, GfxBase); -end; - -function GetSprite(sprite : pSimpleSprite; num : LongInt) : smallint; -type - TLocalCall = function(sprite : pSimpleSprite; num : LongInt; Base: Pointer): smallint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 68)); - Result := Call(sprite, num, GfxBase); -end; - -function GetVPModeID(const Vp : PViewPort) : LongInt; -type - TLocalCall = function(const Vp : PViewPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 132)); - Result := Call(Vp, GfxBase); -end; - -procedure GfxAssociate(const associateNode : Pointer; gfxNodePtr : Pointer); -type - TLocalCall = procedure(const associateNode : Pointer; gfxNodePtr : Pointer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 112)); - Call(associateNode, gfxNodePtr, GfxBase); -end; - -procedure GfxFree(gfxNodePtr : Pointer); -type - TLocalCall = procedure(gfxNodePtr : Pointer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 111)); - Call(gfxNodePtr, GfxBase); -end; - -function GfxLookUp(const associateNode : Pointer) : Pointer; -type - TLocalCall = function(const associateNode : Pointer; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 117)); - Result := Call(associateNode, GfxBase); -end; - -function GfxNew(gfxNodeType : LongWord) : Pointer; -type - TLocalCall = function(gfxNodeType : LongWord; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 110)); - Result := Call(gfxNodeType, GfxBase); -end; - -procedure InitArea(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt); -type - TLocalCall = procedure(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 47)); - Call(areaInfo, vectorBuffer, maxVectors, GfxBase); -end; - -procedure InitBitMap(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt); -type - TLocalCall = procedure(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 65)); - Call(bitMap, Depth, Width, Height, GfxBase); -end; - -procedure InitGels(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo); -type - TLocalCall = procedure(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 20)); - Call(head, tail, gelsInfo, GfxBase); -end; - -procedure InitGMasks(AnOb : PAnimOb); -type - TLocalCall = procedure(AnOb : PAnimOb; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 29)); - Call(AnOb, GfxBase); -end; - -procedure InitMasks(VSprite : PVSprite); -type - TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 22)); - Call(VSprite, GfxBase); -end; - -procedure InitRastPort(Rp : PRastPort); -type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 33)); - Call(Rp, GfxBase); -end; - -function InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt) : pTmpRas; -type - TLocalCall = function(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt; Base: Pointer): pTmpRas; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 78)); - Result := Call(tmpRas, buffer, size, GfxBase); -end; - -procedure InitView(view : pView); -type - TLocalCall = procedure(view : pView; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 60)); - Call(view, GfxBase); -end; - -procedure InitVPort(Vp : PViewPort); -type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 34)); - Call(Vp, GfxBase); -end; - -procedure LoadRGB32(Vp : PViewPort;const table : pULONG); -type - TLocalCall = procedure(Vp : PViewPort;const table : pULONG; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 147)); - Call(Vp, table, GfxBase); -end; - -procedure LoadRGB4(Vp : PViewPort;const colors : pWord; count : LongInt); -type - TLocalCall = procedure(Vp : PViewPort;const colors : pWord; count : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 32)); - Call(Vp, colors, count, GfxBase); -end; - -procedure LoadView(view : pView); -type - TLocalCall = procedure(view : pView; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 37)); - Call(view, GfxBase); -end; - -procedure LockLayerRom(layer : pLayer); -type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 72)); - Call(layer, GfxBase); -end; - -function MakeVPort(view : pView; Vp : PViewPort) : LongWord; -type - TLocalCall = function(view : pView; Vp : PViewPort; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 36)); - Result := Call(view, Vp, GfxBase); -end; - -function ModeNotAvailable(modeID : LongWord) : LongInt; -type - TLocalCall = function(modeID : LongWord; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 133)); - Result := Call(modeID, GfxBase); -end; - -procedure Move(Rp : PRastPort; x : LongInt; y : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 40)); - Call(Rp, x, y, GfxBase); -end; - -procedure MoveSprite(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt); -type - TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 71)); - Call(Vp, sprite, x, y, GfxBase); -end; - -function MrgCop(view : pView) : LongWord; -type - TLocalCall = function(view : pView; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 35)); - Result := Call(view, GfxBase); -end; - -function NewRegion : PRegion; -type - TLocalCall = function(Base: Pointer): PRegion; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 86)); - Result := Call(GfxBase); -end; - -function NextDisplayInfo(displayID : LongWord) : LongWord; -type - TLocalCall = function(displayID : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 122)); - Result := Call(displayID, GfxBase); -end; - -function ObtainBestPenA(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem) : LongInt; -type - TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 140)); - Result := Call(cm, r, g, b, tags, GfxBase); -end; - -function ObtainPen(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt) : LongWord; -type - TLocalCall = function(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 159)); - Result := Call(cm, n, r, g, b, f, GfxBase); -end; - -function OpenFont(textAttr : pTextAttr) : PTextFont; -type - TLocalCall = function(textAttr : pTextAttr; Base: Pointer): PTextFont; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 12)); - Result := Call(textAttr, GfxBase); -end; - -function OpenMonitor(const monitorName : PChar; displayID : LongWord) : pMonitorSpec; -type - TLocalCall = function(const monitorName : PChar; displayID : LongWord; Base: Pointer): pMonitorSpec; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 119)); - Result := Call(monitorName, displayID, GfxBase); -end; - -function OrRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 85)); - Result := Call(region, rectangle, GfxBase); -end; - -function OrRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 123)); - Result := Call(region, rectangle, GfxBase); -end; - -function OrRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 102)); - Result := Call(srcRegion, destRegion, GfxBase); -end; - -function OrRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 125)); - Result := Call(srcRegion, destRegion, GfxBase); -end; - -procedure OwnBlitter; -type - TLocalCall = procedure(Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 76)); - Call(GfxBase); -end; - -procedure PolyDraw(Rp : PRastPort; count : LongInt;const polyTable : pLongint); -type - TLocalCall = procedure(Rp : PRastPort; count : LongInt;const polyTable : pLongint; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 56)); - Call(Rp, count, polyTable, GfxBase); -end; - -procedure QBlit(blit : pbltnode); -type - TLocalCall = procedure(blit : pbltnode; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 46)); - Call(blit, GfxBase); -end; - -procedure QBSBlit(blit : pbltnode); -type - TLocalCall = procedure(blit : pbltnode; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 49)); - Call(blit, GfxBase); -end; - -function ReadPixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongWord; -type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 53)); - Result := Call(Rp, x, y, GfxBase); -end; - -function ReadPixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; -type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 131)); - Result := Call(Rp, xstart, ystart, xstop, ystop, array_, temprp, GfxBase); -end; - -function ReadPixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; -type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 128)); - Result := Call(Rp, xstart, ystart, Width, array_, tempRP, GfxBase); -end; - -procedure RectFill(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 51)); - Call(Rp, xMin, yMin, xMax, yMax, GfxBase); -end; - -procedure ReleasePen(cm : pColorMap; n : LongWord); -type - TLocalCall = procedure(cm : pColorMap; n : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 158)); - Call(cm, n, GfxBase); -end; - -procedure RemFont(TextFont : PTextFont); -type - TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 81)); - Call(TextFont, GfxBase); -end; - -procedure RemIBob(bob : PBob; Rp : PRastPort; Vp : PViewPort); -type - TLocalCall = procedure(bob : PBob; Rp : PRastPort; Vp : PViewPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 22)); - Call(bob, Rp, Vp, GfxBase); -end; - -procedure RemVSprite(VSprite : PVSprite); -type - TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 23)); - Call(VSprite, GfxBase); -end; - -function ScalerDiv(factor : LongWord; numerator : LongWord; denominator : LongWord) : WORD; -type - TLocalCall = function(factor : LongWord; numerator : LongWord; denominator : LongWord; Base: Pointer): WORD; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 114)); - Result := Call(factor, numerator, denominator, GfxBase); -end; - -procedure ScrollRaster(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 66)); - Call(Rp, dx, dy, xMin, yMin, xMax, yMax, GfxBase); -end; - -procedure ScrollRasterBF(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 167)); - Call(Rp, dx, dy, xMin, yMin, xMax, yMax, GfxBase); -end; - -procedure ScrollVPort(Vp : PViewPort); -type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 98)); - Call(Vp, GfxBase); -end; - -procedure SetABPenDrMd(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord); -type - TLocalCall = procedure(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 149)); - Call(Rp, apen, bpen, drawmode, GfxBase); -end; - -procedure SetAPen(Rp : PRastPort; pen : LongWord); -type - TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 57)); - Call(Rp, pen, GfxBase); -end; - -procedure SetBPen(Rp : PRastPort; pen : LongWord); -type - TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 58)); - Call(Rp, pen, GfxBase); -end; - -function SetChipRev(want : LongWord) : LongWord; -type - TLocalCall = function(want : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 148)); - Result := Call(want, GfxBase); -end; - -procedure SetCollision(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo); -type - TLocalCall = procedure(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 24)); - Call(num, routine, gelsInfo, GfxBase); -end; - -procedure SetDrMd(Rp : PRastPort; drawMode : LongWord); -type - TLocalCall = procedure(Rp : PRastPort; drawMode : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 59)); - Call(Rp, drawMode, GfxBase); -end; - -function SetFont(Rp : PRastPort;const TextFont : PTextFont) : LongInt; -type - TLocalCall = function(Rp : PRastPort;const TextFont : PTextFont; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 11)); - Result := Call(Rp, TextFont, GfxBase); -end; - -procedure SetMaxPen(Rp : PRastPort; maxpen : LongWord); -type - TLocalCall = procedure(Rp : PRastPort; maxpen : LongWord; Base: Pointer) ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 165)); - Call(Rp, maxpen, GfxBase); -end; - -function SetOutlinePen(Rp : PRastPort; pen : LongWord) : LongWord; -type - TLocalCall = function(Rp : PRastPort; pen : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 163)); - Result := Call(Rp, pen, GfxBase); -end; - -procedure SetRast(Rp : PRastPort; pen : LongWord); -type - TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 39)); - Call(Rp, pen, GfxBase); -end; - -procedure SetRGB32(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord); -type - TLocalCall = procedure(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 142)); - Call(Vp, n, r, g, b, GfxBase); -end; - -procedure SetRGB32CM(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord); -type - TLocalCall = procedure(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 166)); - Call(cm, n, r, g, b, GfxBase); -end; - -procedure SetRGB4(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); -type - TLocalCall = procedure(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 48)); - Call(Vp, index, red, green, blue, GfxBase); -end; - -procedure SetRGB4CM(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); -type - TLocalCall = procedure(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 106)); - Call(colorMap, index, red, green, blue, GfxBase); -end; - -procedure SetRPAttrsA(Rp : PRastPort;const tags : PTagItem); -type - TLocalCall = procedure(Rp : PRastPort;const tags : PTagItem; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 173)); - Call(Rp, tags, GfxBase); -end; - -function SetSoftStyle(Rp : PRastPort; style : LongWord; enable : LongWord) : LongWord; -type - TLocalCall = function(Rp : PRastPort; style : LongWord; enable : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 15)); - Result := Call(Rp, style, enable, GfxBase); -end; - -function SetWriteMask(Rp : PRastPort; msk : LongWord) : LongWord; -type - TLocalCall = function(Rp : PRastPort; msk : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 164)); - Result := Call(Rp, msk, GfxBase); -end; - -procedure SortGList(Rp : PRastPort); -type - TLocalCall = procedure(Rp : PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 25)); - Call(Rp, GfxBase); -end; - -procedure StripFont(font : PTextFont); -type - TLocalCall = procedure(font : PTextFont; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 137)); - Call(font, GfxBase); -end; - -procedure SyncSBitMap(layer : pLayer); -type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 74)); - Call(layer, GfxBase); -end; - -function GText(Rp : PRastPort;const string_ : PChar; count : LongWord) : LongInt; -type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 10)); - Result := Call(Rp, string_, count, GfxBase); -end; - -function TextExtent(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent) : smallint; -type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent; Base: Pointer): smallint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 115)); - Result := Call(Rp, string_, count, _textExtent, GfxBase); -end; - -function TextFit(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord) : LongWord; -type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 116)); - Result := Call(Rp, string_, strLen, textExtent, constrainingExtent, strDirection, constrainingBitWidth, constrainingBitHeight, GfxBase); -end; - -function TextLength(Rp : PRastPort;const string_ : PChar; count : LongWord) : smallint; -type - TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): smallint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 9)); - Result := Call(Rp, string_, count, GfxBase); -end; - -function UCopperListInit(uCopList : pUCopList; n : LongInt) : pCopList; -type - TLocalCall = function(uCopList : pUCopList; n : LongInt; Base: Pointer): pCopList; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 99)); - Result := Call(uCopList, n, GfxBase); -end; - -procedure UnlockLayerRom(layer : pLayer); -type - TLocalCall = procedure(layer : pLayer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 73)); - Call(layer, GfxBase); -end; - -function VBeamPos : LongInt; -type - TLocalCall = function(Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 64)); - Result := Call(GfxBase); -end; - -function VideoControl(colorMap : pColorMap; tagarray : PTagItem) : BOOLEAN; -type - TLocalCall = function(colorMap : pColorMap; tagarray : PTagItem; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 118)); - Result := Call(colorMap, tagarray, GfxBase); -end; - -procedure WaitBlit; -type - TLocalCall = procedure(Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 38)); - Call(GfxBase); -end; - -procedure WaitBOVP(Vp : PViewPort); -type - TLocalCall = procedure(Vp : PViewPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 67)); - Call(Vp, GfxBase); -end; - -procedure WaitTOF; -type - TLocalCall = procedure(Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 45)); - Call(GfxBase); -end; - -function WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem) : smallint; -type - TLocalCall = function(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem; Base: Pointer): smallint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 134)); - Result := Call(reqTextAttr, targetTextAttr, targetTags, GfxBase); -end; - -procedure WriteChunkyPixels(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt); -type - TLocalCall = procedure(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 176)); - Call(Rp, xstart, ystart, xstop, ystop, array_, bytesperrow, GfxBase); -end; - -function WritePixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; -type - TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 54)); - Result := Call(Rp, x, y, GfxBase); -end; - -function WritePixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; -type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 131)); - Result := Call(Rp, xstart, ystart, xstop, ystop, array_, temprp, GfxBase); -end; - -function WritePixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; -type - TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 130)); - Result := Call(Rp, xstart, ystart, Width, array_, tempRP, GfxBase); -end; - -function XorRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 93)); - Result := Call(region, rectangle, GfxBase); -end; - -function XorRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; -type - TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 152)); - Result := Call(region, rectangle, GfxBase); -end; - - -function XorRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 103)); - Result := Call(srcRegion, destRegion, GfxBase); -end; - -function XorRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; -type - TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(GfxBase, 151)); - Result := Call(srcRegion, destRegion, GfxBase); -end; - - -initialization - GfxBase := OpenLibrary('graphics.library',36); -finalization - CloseLibrary(GfxBase); - -END. (* UNIT GRAPHICS *) - - - - - - diff --git a/packages/arosunits/src/amigados.pas b/packages/arosunits/src/amigados.pas deleted file mode 100644 index f34b7620ff..0000000000 --- a/packages/arosunits/src/amigados.pas +++ /dev/null @@ -1,4560 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - History: - Added overlay functions for Pchar->Strings, functions - and procedures. Now you can mix PChar and Strings e.g - OpenLibrary('whatis.library',37). No need to cast to - a PChar. - 14 Jul 2000. - - Changed ReadArgs, removed the var for the second arg. - Changed DOSRename from longint to a boolean. - Aug 04 2000. - - Added functions and procedures with array of const. - For use with fpc 1.0.7 - - You have to use systemvartags. Check out that unit. - 09 Nov 2002. - - Added the define use_amiga_smartlink. - 13 Jan 2003. - - Update for AmigaOS 3.9. - Added some const. - 26 Jan 2003. - - Changed integer > smallint. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se -} - -unit amigados; - -INTERFACE - -uses exec, utility, timer; - -Const - -{ Predefined Amiga DOS global constants } - - DOSTRUE = -1; - DOSFALSE = 0; - -{ Mode parameter to Open() } - - MODE_OLDFILE = 1005; { Open existing file read/write - positioned at beginning of file. } - MODE_NEWFILE = 1006; { Open freshly created file (delete - old file) read/write } - MODE_READWRITE = 1004; { Open old file w/exclusive lock } - -{ Relative position to Seek() } - - OFFSET_BEGINNING = -1; { relative to Begining Of File } - OFFSET_CURRENT = 0; { relative to Current file position } - OFFSET_END = 1; { relative to End Of File } - - BITSPERBYTE = 8; - BYTESPERLONG = 4; - BITSPERLONG = 32; - MAXINT = $7FFFFFFF; - MININT = $80000000; - -{ Passed as type to Lock() } - - SHARED_LOCK = -2; { File is readable by others } - ACCESS_READ = -2; { Synonym } - EXCLUSIVE_LOCK = -1; { No other access allowed } - ACCESS_WRITE = -1; { Synonym } - -Type - - FileHandle = BPTR; - FileLock = BPTR; - - pDateStamp = ^tDateStamp; - tDateStamp = record - ds_Days : Longint; { Number of days since Jan. 1, 1978 } - ds_Minute : Longint; { Number of minutes past midnight } - ds_Tick : Longint; { Number of ticks past minute } - end; - -Const - - TICKS_PER_SECOND = 50; { Number of ticks in one second } - -{$PACKRECORDS 4} -Type - -{ Returned by Examine() and ExInfo(), must be on a 4 byte boundary } - - pFileInfoBlock = ^tFileInfoBlock; - tFileInfoBlock = record - fib_DiskKey : Longint; - fib_DirEntryType : Longint; - { Type of Directory. If < 0, then a plain file. - If > 0 a directory } - fib_FileName : Array [0..107] of Char; - { Null terminated. Max 30 chars used for now } - fib_Protection : Longint; - { bit mask of protection, rwxd are 3-0. } - fib_EntryType : Longint; - fib_Size : Longint; { Number of bytes in file } - fib_NumBlocks : Longint; { Number of blocks in file } - fib_Date : tDateStamp; { Date file last changed } - fib_Comment : Array [0..79] of Char; - { Null terminated comment associated with file } - fib_OwnerUID : Word; - fib_OwnerGID : Word; - fib_Reserved : Array [0..31] of Char; - end; - -Const - -{ FIB stands for FileInfoBlock } - -{* FIBB are bit definitions, FIBF are field definitions *} -{* Regular RWED bits are 0 == allowed. *} -{* NOTE: GRP and OTR RWED permissions are 0 == not allowed! *} -{* Group and Other permissions are not directly handled by the filesystem *} - - FIBB_OTR_READ = 15; {* Other: file is readable *} - FIBB_OTR_WRITE = 14; {* Other: file is writable *} - FIBB_OTR_EXECUTE = 13; {* Other: file is executable *} - FIBB_OTR_DELETE = 12; {* Other: prevent file from being deleted *} - FIBB_GRP_READ = 11; {* Group: file is readable *} - FIBB_GRP_WRITE = 10; {* Group: file is writable *} - FIBB_GRP_EXECUTE = 9; {* Group: file is executable *} - FIBB_GRP_DELETE = 8; {* Group: prevent file from being deleted *} - - FIBB_SCRIPT = 6; { program is a script (execute) file } - FIBB_PURE = 5; { program is reentrant and rexecutable} - FIBB_ARCHIVE = 4; { cleared whenever file is changed } - FIBB_READ = 3; { ignored by old filesystem } - FIBB_WRITE = 2; { ignored by old filesystem } - FIBB_EXECUTE = 1; { ignored by system, used by Shell } - FIBB_DELETE = 0; { prevent file from being deleted } - - FIBF_OTR_READ = (1 shl FIBB_OTR_READ); - FIBF_OTR_WRITE = (1 shl FIBB_OTR_WRITE); - FIBF_OTR_EXECUTE = (1 shl FIBB_OTR_EXECUTE); - FIBF_OTR_DELETE = (1 shl FIBB_OTR_DELETE); - FIBF_GRP_READ = (1 shl FIBB_GRP_READ); - FIBF_GRP_WRITE = (1 shl FIBB_GRP_WRITE); - FIBF_GRP_EXECUTE = (1 shl FIBB_GRP_EXECUTE); - FIBF_GRP_DELETE = (1 shl FIBB_GRP_DELETE); - - FIBF_SCRIPT = 64; - FIBF_PURE = 32; - FIBF_ARCHIVE = 16; - FIBF_READ = 8; - FIBF_WRITE = 4; - FIBF_EXECUTE = 2; - FIBF_DELETE = 1; - -{* Standard maximum length for an error string from fault. However, most *} -{* error strings should be kept under 60 characters if possible. Don't *} -{* forget space for the header you pass in. *} - - FAULT_MAX = 82; - -{* All BCPL data must be long Integer aligned. BCPL pointers are the long Integer - * address (i.e byte address divided by 4 (>>2)) *} - -{* BCPL strings have a length in the first byte and then the characters. - * For example: s[0]=3 s[1]=S s[2]=Y s[3]=S *} - - -Type - -{ returned by Info(), must be on a 4 byte boundary } - - pInfoData = ^tInfoData; - tInfoData = record - id_NumSoftErrors : Longint; { number of soft errors on disk } - id_UnitNumber : Longint; { Which unit disk is (was) mounted on } - id_DiskState : Longint; { See defines below } - id_NumBlocks : Longint; { Number of blocks on disk } - id_NumBlocksUsed : Longint; { Number of block in use } - id_BytesPerBlock : Longint; - id_DiskType : Longint; { Disk Type code } - id_VolumeNode : BPTR; { BCPL pointer to volume node } - id_InUse : Longint; { Flag, zero if not in use } - end; - -{$PACKRECORDS NORMAL} - -Const - -{ ID stands for InfoData } - - { Disk states } - - ID_WRITE_PROTECTED = 80; { Disk is write protected } - ID_VALIDATING = 81; { Disk is currently being validated } - ID_VALIDATED = 82; { Disk is consistent and writeable } - -CONST - ID_NO_DISK_PRESENT = -1; - ID_UNREADABLE_DISK = $42414400; { 'BAD\0' } - ID_DOS_DISK = $444F5300; { 'DOS\0' } - ID_FFS_DISK = $444F5301; { 'DOS\1' } - ID_NOT_REALLY_DOS = $4E444F53; { 'NDOS' } - ID_KICKSTART_DISK = $4B49434B; { 'KICK' } - ID_MSDOS_DISK = $4d534400; { 'MSD\0' } - -{ Errors from IoErr(), etc. } - ERROR_NO_FREE_STORE = 103; - ERROR_TASK_TABLE_FULL = 105; - ERROR_BAD_TEMPLATE = 114; - ERROR_BAD_NUMBER = 115; - ERROR_REQUIRED_ARG_MISSING = 116; - ERROR_KEY_NEEDS_ARG = 117; - ERROR_TOO_MANY_ARGS = 118; - ERROR_UNMATCHED_QUOTES = 119; - ERROR_LINE_TOO_LONG = 120; - ERROR_FILE_NOT_OBJECT = 121; - ERROR_INVALID_RESIDENT_LIBRARY = 122; - ERROR_NO_DEFAULT_DIR = 201; - ERROR_OBJECT_IN_USE = 202; - ERROR_OBJECT_EXISTS = 203; - ERROR_DIR_NOT_FOUND = 204; - ERROR_OBJECT_NOT_FOUND = 205; - ERROR_BAD_STREAM_NAME = 206; - ERROR_OBJECT_TOO_LARGE = 207; - ERROR_ACTION_NOT_KNOWN = 209; - ERROR_INVALID_COMPONENT_NAME = 210; - ERROR_INVALID_LOCK = 211; - ERROR_OBJECT_WRONG_TYPE = 212; - ERROR_DISK_NOT_VALIDATED = 213; - ERROR_DISK_WRITE_PROTECTED = 214; - ERROR_RENAME_ACROSS_DEVICES = 215; - ERROR_DIRECTORY_NOT_EMPTY = 216; - ERROR_TOO_MANY_LEVELS = 217; - ERROR_DEVICE_NOT_MOUNTED = 218; - ERROR_SEEK_ERROR = 219; - ERROR_COMMENT_TOO_BIG = 220; - ERROR_DISK_FULL = 221; - ERROR_DELETE_PROTECTED = 222; - ERROR_WRITE_PROTECTED = 223; - ERROR_READ_PROTECTED = 224; - ERROR_NOT_A_DOS_DISK = 225; - ERROR_NO_DISK = 226; - ERROR_NO_MORE_ENTRIES = 232; -{ added for 1.4 } - ERROR_IS_SOFT_LINK = 233; - ERROR_OBJECT_LINKED = 234; - ERROR_BAD_HUNK = 235; - ERROR_NOT_IMPLEMENTED = 236; - ERROR_RECORD_NOT_LOCKED = 240; - ERROR_LOCK_COLLISION = 241; - ERROR_LOCK_TIMEOUT = 242; - ERROR_UNLOCK_ERROR = 243; - -{ error codes 303-305 are defined in dosasl.h } - -{ These are the return codes used by convention by AmigaDOS commands } -{ See FAILAT and IF for relvance to EXECUTE files } - RETURN_OK = 0; { No problems, success } - RETURN_WARN = 5; { A warning only } - RETURN_ERROR = 10; { Something wrong } - RETURN_FAIL = 20; { Complete or severe failure} - -{ Bit numbers that signal you that a user has issued a break } - SIGBREAKB_CTRL_C = 12; - SIGBREAKB_CTRL_D = 13; - SIGBREAKB_CTRL_E = 14; - SIGBREAKB_CTRL_F = 15; - -{ Bit fields that signal you that a user has issued a break } -{ for example: if (SetSignal(0,0) & SIGBREAKF_CTRL_C) cleanup_and_exit(); } - SIGBREAKF_CTRL_C = 4096; - SIGBREAKF_CTRL_D = 8192; - SIGBREAKF_CTRL_E = 16384; - SIGBREAKF_CTRL_F = 32768; - -{ Values returned by SameLock() } - LOCK_SAME = 0; - LOCK_SAME_HANDLER = 1; { actually same volume } - LOCK_DIFFERENT = -1; - -{ types for ChangeMode() } - CHANGE_LOCK = 0; - CHANGE_FH = 1; - -{ Values for MakeLink() } - LINK_HARD = 0; - LINK_SOFT = 1; { softlinks are not fully supported yet } - -{ values returned by } - ITEM_EQUAL = -2; { "=" Symbol } - ITEM_ERROR = -1; { error } - ITEM_NOTHING = 0; { *N, ;, endstreamch } - ITEM_UNQUOTED = 1; { unquoted item } - ITEM_QUOTED = 2; { quoted item } - -{ types for AllocDosObject/FreeDosObject } - DOS_FILEHANDLE = 0; { few people should use this } - DOS_EXALLCONTROL = 1; { Must be used to allocate this! } - DOS_FIB = 2; { useful } - DOS_STDPKT = 3; { for doing packet-level I/O } - DOS_CLI = 4; { for shell-writers, etc } - DOS_RDARGS = 5; { for ReadArgs if you pass it in } - - -{ - * Data structures and equates used by the V1.4 DOS functions - * StrtoDate() and DatetoStr() - } - -{--------- String/Date structures etc } -Type - pDateTime = ^tDateTime; - tDateTime = record - dat_Stamp : tDateStamp; { DOS DateStamp } - dat_Format, { controls appearance of dat_StrDate } - dat_Flags : Byte; { see BITDEF's below } - dat_StrDay, { day of the week string } - dat_StrDate, { date string } - dat_StrTime : STRPTR; { time string } - END; - -{ You need this much room for each of the DateTime strings: } -CONST - LEN_DATSTRING = 16; - -{ flags for dat_Flags } - - DTB_SUBST = 0; { substitute Today, Tomorrow, etc. } - DTF_SUBST = 1; - DTB_FUTURE = 1; { day of the week is in future } - DTF_FUTURE = 2; - -{ - * date format values - } - - FORMAT_DOS = 0; { dd-mmm-yy } - FORMAT_INT = 1; { yy-mm-dd } - FORMAT_USA = 2; { mm-dd-yy } - FORMAT_CDN = 3; { dd-mm-yy } - FORMAT_MAX = FORMAT_CDN; - FORMAT_DEF = 4; { use default format, as defined - by locale; if locale not - available, use FORMAT_DOS - instead } - -{********************************************************************** -************************ PATTERN MATCHING ****************************** -************************************************************************ - -* structure expected by MatchFirst, MatchNext. -* Allocate this structure and initialize it as follows: -* -* Set ap_BreakBits to the signal bits (CDEF) that you want to take a -* break on, or NULL, if you don't want to convenience the user. -* -* If you want to have the FULL PATH NAME of the files you found, -* allocate a buffer at the END of this structure, and put the size of -* it into ap_Strlen. If you don't want the full path name, make sure -* you set ap_Strlen to zero. In this case, the name of the file, and stats -* are available in the ap_Info, as per usual. -* -* Then call MatchFirst() and then afterwards, MatchNext() with this structure. -* You should check the return value each time (see below) and take the -* appropriate action, ultimately calling MatchEnd() when there are -* no more files and you are done. You can tell when you are done by -* checking for the normal AmigaDOS return code ERROR_NO_MORE_ENTRIES. -* -} - -Type - pAChain = ^tAChain; - tAChain = record - an_Child, - an_Parent : pAChain; - an_Lock : BPTR; - an_Info : tFileInfoBlock; - an_Flags : Shortint; - an_String : Array[0..0] of Char; { FIX!! } - END; - - pAnchorPath = ^tAnchorPath; - tAnchorPath = record - case smallint of - 0 : ( - ap_First : pAChain; - ap_Last : pAChain; - ); - 1 : ( - ap_Base, { pointer to first anchor } - ap_Current : pAChain; { pointer to last anchor } - ap_BreakBits, { Bits we want to break on } - ap_FoundBreak : Longint; { Bits we broke on. Also returns ERROR_BREAK } - ap_Flags : Shortint; { New use for extra Integer. } - ap_Reserved : Shortint; - ap_Strlen : smallint; { This is what ap_Length used to be } - ap_Info : tFileInfoBlock; - ap_Buf : Array[0..0] of Char; { Buffer for path name, allocated by user !! } - { FIX! } - ); - END; - - -CONST - APB_DOWILD = 0; { User option ALL } - APF_DOWILD = 1; - - APB_ITSWILD = 1; { Set by MatchFirst, used by MatchNext } - APF_ITSWILD = 2; { Application can test APB_ITSWILD, too } - { (means that there's a wildcard } - { in the pattern after calling } - { MatchFirst). } - - APB_DODIR = 2; { Bit is SET IF a DIR node should be } - APF_DODIR = 4; { entered. Application can RESET this } - { bit after MatchFirst/MatchNext to AVOID } - { entering a dir. } - - APB_DIDDIR = 3; { Bit is SET for an "expired" dir node. } - APF_DIDDIR = 8; - - APB_NOMEMERR = 4; { Set on memory error } - APF_NOMEMERR = 16; - - APB_DODOT = 5; { IF set, allow conversion of '.' to } - APF_DODOT = 32; { CurrentDir } - - APB_DirChanged = 6; { ap_Current->an_Lock changed } - APF_DirChanged = 64; { since last MatchNext call } - - - DDB_PatternBit = 0; - DDF_PatternBit = 1; - DDB_ExaminedBit = 1; - DDF_ExaminedBit = 2; - DDB_Completed = 2; - DDF_Completed = 4; - DDB_AllBit = 3; - DDF_AllBit = 8; - DDB_Single = 4; - DDF_Single = 16; - -{ - * Constants used by wildcard routines, these are the pre-parsed tokens - * referred to by pattern match. It is not necessary for you to do - * anything about these, MatchFirst() MatchNext() handle all these for you. - } - - P_ANY = $80; { Token for '*' or '#? } - P_SINGLE = $81; { Token for '?' } - P_ORSTART = $82; { Token for '(' } - P_ORNEXT = $83; { Token for '|' } - P_OREND = $84; { Token for ')' } - P_NOT = $85; { Token for '~' } - P_NOTEND = $86; { Token for } - P_NOTCLASS = $87; { Token for '^' } - P_CLASS = $88; { Token for '[]' } - P_REPBEG = $89; { Token for '[' } - P_REPEND = $8A; { Token for ']' } - P_STOP = $8B; { token to force end of evaluation } - -{ Values for an_Status, NOTE: These are the actual bit numbers } - - COMPLEX_BIT = 1; { Parsing complex pattern } - EXAMINE_BIT = 2; { Searching directory } - -{ - * Returns from MatchFirst(), MatchNext() - * You can also get dos error returns, such as ERROR_NO_MORE_ENTRIES, - * these are in the dos.h file. - } - - ERROR_BUFFER_OVERFLOW = 303; { User OR internal buffer overflow } - ERROR_BREAK = 304; { A break character was received } - ERROR_NOT_EXECUTABLE = 305; { A file has E bit cleared } - -{ hunk types } - HUNK_UNIT = 999 ; - HUNK_NAME = 1000; - HUNK_CODE = 1001; - HUNK_DATA = 1002; - HUNK_BSS = 1003; - HUNK_RELOC32 = 1004; - HUNK_RELOC16 = 1005; - HUNK_RELOC8 = 1006; - HUNK_EXT = 1007; - HUNK_SYMBOL = 1008; - HUNK_DEBUG = 1009; - HUNK_END = 1010; - HUNK_HEADER = 1011; - - HUNK_OVERLAY = 1013; - HUNK_BREAK = 1014; - - HUNK_DREL32 = 1015; - HUNK_DREL16 = 1016; - HUNK_DREL8 = 1017; - - HUNK_LIB = 1018; - HUNK_INDEX = 1019; - -{ hunk_ext sub-types } - EXT_SYMB = 0 ; { symbol table } - EXT_DEF = 1 ; { relocatable definition } - EXT_ABS = 2 ; { Absolute definition } - EXT_RES = 3 ; { no longer supported } - EXT_REF32 = 129; { 32 bit reference to symbol } - EXT_COMMON = 130; { 32 bit reference to COMMON block } - EXT_REF16 = 131; { 16 bit reference to symbol } - EXT_REF8 = 132; { 8 bit reference to symbol } - EXT_DEXT32 = 133; { 32 bit data releative reference } - EXT_DEXT16 = 134; { 16 bit data releative reference } - EXT_DEXT8 = 135; { 8 bit data releative reference } - - -Type - -{ All DOS processes have this structure } -{ Create and Device Proc returns pointer to the MsgPort in this structure } -{ dev_proc = Address(smallint(DeviceProc()) - SizeOf(Task)) } - - pProcess = ^tProcess; - tProcess = record - pr_Task : tTask; - pr_MsgPort : tMsgPort; { This is BPTR address from DOS functions } - pr_Pad : smallint; { Remaining variables on 4 byte boundaries } - pr_SegList : BPTR; { Array of seg lists used by this process } - pr_StackSize : Longint; { Size of process stack in bytes } - pr_GlobVec : Pointer; { Global vector for this process (BCPL) } - pr_TaskNum : Longint; { CLI task number of zero if not a CLI } - pr_StackBase : BPTR; { Ptr to high memory end of process stack } - pr_Result2 : Longint; { Value of secondary result from last call } - pr_CurrentDir : BPTR; { Lock associated with current directory } - pr_CIS : BPTR; { Current CLI Input Stream } - pr_COS : BPTR; { Current CLI Output Stream } - pr_ConsoleTask : Pointer; { Console handler process for current window} - pr_FileSystemTask : Pointer; { File handler process for current drive } - pr_CLI : BPTR; { pointer to ConsoleLineInterpreter } - pr_ReturnAddr : Pointer; { pointer to previous stack frame } - pr_PktWait : Pointer; { Function to be called when awaiting msg } - pr_WindowPtr : Pointer; { Window for error printing } - { following definitions are new with 2.0 } - pr_HomeDir : BPTR; { Home directory of executing program } - pr_Flags : Longint; { flags telling dos about process } - pr_ExitCode : Pointer; { code to call on exit of program OR NULL } - pr_ExitData : Longint; { Passed as an argument to pr_ExitCode. } - pr_Arguments : STRPTR; { Arguments passed to the process at start } - pr_LocalVars : tMinList; { Local environment variables } - pr_ShellPrivate : ULONG; { for the use of the current shell } - pr_CES : BPTR; { Error stream - IF NULL, use pr_COS } - end; - -{ - * Flags for pr_Flags - } -CONST - PRB_FREESEGLIST = 0 ; - PRF_FREESEGLIST = 1 ; - PRB_FREECURRDIR = 1 ; - PRF_FREECURRDIR = 2 ; - PRB_FREECLI = 2 ; - PRF_FREECLI = 4 ; - PRB_CLOSEINPUT = 3 ; - PRF_CLOSEINPUT = 8 ; - PRB_CLOSEOUTPUT = 4 ; - PRF_CLOSEOUTPUT = 16; - PRB_FREEARGS = 5 ; - PRF_FREEARGS = 32; - - -{ The long smallint address (BPTR) of this structure is returned by - * Open() and other routines that return a file. You need only worry - * about this struct to do async io's via PutMsg() instead of - * standard file system calls } - -Type - - pFileHandle = ^tFileHandle; - tFileHandle = record - fh_Link : pMessage; { EXEC message } - fh_Port : pMsgPort; { Reply port for the packet } - fh_Type : pMsgPort; { Port to do PutMsg() to - Address is negative if a plain file } - fh_Buf : Longint; - fh_Pos : Longint; - fh_End : Longint; - fh_Func1 : Longint; - fh_Func2 : Longint; - fh_Func3 : Longint; - fh_Arg1 : Longint; - fh_Arg2 : Longint; - end; - -{ This is the extension to EXEC Messages used by DOS } - - pDosPacket = ^tDosPacket; - tDosPacket = record - dp_Link : pMessage; { EXEC message } - dp_Port : pMsgPort; { Reply port for the packet } - { Must be filled in each send. } - case smallint of - 0 : ( - dp_Action : Longint; - dp_Status : Longint; - dp_Status2 : Longint; - dp_BufAddr : Longint; - ); - 1 : ( - dp_Type : Longint; { See ACTION_... below and - * 'R' means Read, 'W' means Write to the - * file system } - dp_Res1 : Longint; { For file system calls this is the result - * that would have been returned by the - * function, e.g. Write ('W') returns actual - * length written } - dp_Res2 : Longint; { For file system calls this is what would - * have been returned by IoErr() } - dp_Arg1 : Longint; - dp_Arg2 : Longint; - dp_Arg3 : Longint; - dp_Arg4 : Longint; - dp_Arg5 : Longint; - dp_Arg6 : Longint; - dp_Arg7 : Longint; - ); - end; - - -{ A Packet does not require the Message to be before it in memory, but - * for convenience it is useful to associate the two. - * Also see the function init_std_pkt for initializing this structure } - - pStandardPacket = ^tStandardPacket; - tStandardPacket = record - sp_Msg : tMessage; - sp_Pkt : tDosPacket; - end; - - -Const - -{ Packet types } - ACTION_NIL = 0; - ACTION_GET_BLOCK = 2; { OBSOLETE } - ACTION_SET_MAP = 4; - ACTION_DIE = 5; - ACTION_EVENT = 6; - ACTION_CURRENT_VOLUME = 7; - ACTION_LOCATE_OBJECT = 8; - ACTION_RENAME_DISK = 9; - ACTION_WRITE = $57; { 'W' } - ACTION_READ = $52; { 'R' } - ACTION_FREE_LOCK = 15; - ACTION_DELETE_OBJECT = 16; - ACTION_RENAME_OBJECT = 17; - ACTION_MORE_CACHE = 18; - ACTION_COPY_DIR = 19; - ACTION_WAIT_CHAR = 20; - ACTION_SET_PROTECT = 21; - ACTION_CREATE_DIR = 22; - ACTION_EXAMINE_OBJECT = 23; - ACTION_EXAMINE_NEXT = 24; - ACTION_DISK_INFO = 25; - ACTION_INFO = 26; - ACTION_FLUSH = 27; - ACTION_SET_COMMENT = 28; - ACTION_PARENT = 29; - ACTION_TIMER = 30; - ACTION_INHIBIT = 31; - ACTION_DISK_TYPE = 32; - ACTION_DISK_CHANGE = 33; - ACTION_SET_DATE = 34; - - ACTION_SCREEN_MODE = 994; - - ACTION_READ_RETURN = 1001; - ACTION_WRITE_RETURN = 1002; - ACTION_SEEK = 1008; - ACTION_FINDUPDATE = 1004; - ACTION_FINDINPUT = 1005; - ACTION_FINDOUTPUT = 1006; - ACTION_END = 1007; - ACTION_TRUNCATE = 1022; { fast file system only } - ACTION_WRITE_PROTECT = 1023; { fast file system only } - -{ new 2.0 packets } - ACTION_SAME_LOCK = 40; - ACTION_CHANGE_SIGNAL = 995; - ACTION_FORMAT = 1020; - ACTION_MAKE_LINK = 1021; -{} -{} - ACTION_READ_LINK = 1024; - ACTION_FH_FROM_LOCK = 1026; - ACTION_IS_FILESYSTEM = 1027; - ACTION_CHANGE_MODE = 1028; -{} - ACTION_COPY_DIR_FH = 1030; - ACTION_PARENT_FH = 1031; - ACTION_EXAMINE_ALL = 1033; - ACTION_EXAMINE_FH = 1034; - - ACTION_LOCK_RECORD = 2008; - ACTION_FREE_RECORD = 2009; - - ACTION_ADD_NOTIFY = 4097; - ACTION_REMOVE_NOTIFY = 4098; - - {* Added in V39: *} - ACTION_EXAMINE_ALL_END = 1035; - ACTION_SET_OWNER = 1036; - -{* Tell a file system to serialize the current volume. This is typically - * done by changing the creation date of the disk. This packet does not take - * any arguments. NOTE: be prepared to handle failure of this packet for - * V37 ROM filesystems. - *} - - ACTION_SERIALIZE_DISK = 4200; - -{ - * A structure for holding error messages - stored as array with error == 0 - * for the last entry. - } -Type - pErrorString = ^tErrorString; - tErrorString = record - estr_Nums : Pointer; - estr_Strings : Pointer; - END; - - -{ DOS library node structure. - * This is the data at positive offsets from the library node. - * Negative offsets from the node is the jump table to DOS functions - * node = (struct DosLibrary *) OpenLibrary( "dos.library" .. ) } - -Type - - pDosLibrary = ^tDosLibrary; - tDosLibrary = record - dl_lib : tLibrary; - dl_Root : Pointer; { Pointer to RootNode, described below } - (* BINCOMPAT? - dl_GV : Pointer; { Pointer to BCPL global vector } - dl_A2 : Longint; { Private register dump of DOS } - dl_A5 : Longint; - dl_A6 : Longint; - *) - dl_Errors : pErrorString; { pointer to array of error msgs } - dl_TimeReq : pTimeRequest; { private pointer to timer request } - dl_UtilityBase : pLibrary; { private ptr to utility library } - dl_IntuitionBase : pLibrary; - // there are much more fields but all flagged with "do not use" or private - end; - - pRootNode = ^tRootNode; - tRootNode = record - rn_TaskArray : BPTR; { [0] is max number of CLI's - [1] is APTR to process id of CLI 1 - [n] is APTR to process id of CLI n } - rn_ConsoleSegment : BPTR; { SegList for the CLI } - rn_Time : tDateStamp; { Current time } - rn_RestartSeg : Longint; { SegList for the disk validator process } - rn_Info : BPTR; { Pointer ot the Info structure } - rn_FileHandlerSegment : BPTR; { segment for a file handler } - rn_CliList : tMinList; { new list of all CLI processes } - { the first cpl_Array is also rn_TaskArray } - rn_BootProc : pMsgPort; { private ptr to msgport of boot fs } - rn_ShellSegment : BPTR; { seglist for Shell (for NewShell) } - rn_Flags : Longint; { dos flags } - end; - -CONST - RNB_WILDSTAR = 24; - RNF_WILDSTAR = 16777216; - RNB_PRIVATE1 = 1; { private for dos } - RNF_PRIVATE1 = 2; - -Type - pDosInfo = ^tDosInfo; - tDosInfo = record - case smallint of - 0 : ( - di_ResList : BPTR; - ); - 1 : ( - di_McName : BPTR; { Network name of this machine; currently 0 } - di_DevInfo : BPTR; { Device List } - di_Devices : BPTR; { Currently zero } - di_Handlers : BPTR; { Currently zero } - di_NetHand : Pointer; { Network handler processid; currently zero } - di_DevLock, { do NOT access directly! } - di_EntryLock, { do NOT access directly! } - di_DeleteLock : tSignalSemaphore; { do NOT access directly! } - ); - end; - -{ ONLY to be allocated by DOS! } - - pCliProcList = ^tCliProcList; - tCliProcList = record - cpl_Node : tMinNode; - cpl_First : Longint; { number of first entry in array } - cpl_Array : Array[0..0] of pMsgPort; - { [0] is max number of CLI's in this entry (n) - * [1] is CPTR to process id of CLI cpl_First - * [n] is CPTR to process id of CLI cpl_First+n-1 - } - END; - -{ structure for the Dos resident list. Do NOT allocate these, use } -{ AddSegment(), and heed the warnings in the autodocs! } - -Type - pSegment = ^tSegment; - tSegment = record - seg_Next : BPTR; - seg_UC : Longint; - seg_Seg : BPTR; - seg_Name : Array[0..3] of Char; { actually the first 4 chars of BSTR name } - END; - -CONST - CMD_SYSTEM = -1; - CMD_INTERNAL = -2; - CMD_DISABLED = -999; - - -{ DOS Processes started from the CLI via RUN or NEWCLI have this additional - * set to data associated with them } -Type - pCommandLineInterface = ^tCommandLineInterface; - tCommandLineInterface = record - cli_Result2 : Longint; { Value of IoErr from last command } - cli_SetName : BSTR; { Name of current directory } - cli_CommandDir : BPTR; { Lock associated with command directory } - cli_ReturnCode : Longint; { Return code from last command } - cli_CommandName : BSTR; { Name of current command } - cli_FailLevel : Longint; { Fail level (set by FAILAT) } - cli_Prompt : BSTR; { Current prompt (set by PROMPT) } - cli_StandardInput : BPTR; { Default (terminal) CLI input } - cli_CurrentInput : BPTR; { Current CLI input } - cli_CommandFile : BSTR; { Name of EXECUTE command file } - cli_Interactive : Longint; { Boolean; True if prompts required } - cli_Background : Longint; { Boolean; True if CLI created by RUN } - cli_CurrentOutput : BPTR; { Current CLI output } - cli_DefaultStack : Longint; { Stack size to be obtained in long words } - cli_StandardOutput : BPTR; { Default (terminal) CLI output } - cli_Module : BPTR; { SegList of currently loaded command } - end; - -{ This structure can take on different values depending on whether it is - * a device, an assigned directory, or a volume. Below is the structure - * reflecting volumes only. Following that is the structure representing - * only devices. - } - -{ structure representing a volume } - - pDeviceList = ^tDeviceList; - tDeviceList = record - dl_Next : BPTR; { bptr to next device list } - dl_Type : Longint; { see DLT below } - dl_Task : pMsgPort; { ptr to handler task } - dl_Lock : BPTR; { not for volumes } - dl_VolumeDate : tDateStamp; { creation date } - dl_LockList : BPTR; { outstanding locks } - dl_DiskType : Longint; { 'DOS', etc } - dl_unused : Longint; - dl_Name : BSTR; { bptr to bcpl name } - end; - -{ device structure (same as the DeviceNode structure in filehandler.h) } - - pDevInfo = ^tDevInfo; - tDevInfo = record - dvi_Next : BPTR; - dvi_Type : Longint; - dvi_Task : Pointer; - dvi_Lock : BPTR; - dvi_Handler : BSTR; - dvi_StackSize : Longint; - dvi_Priority : Longint; - dvi_Startup : Longint; - dvi_SegList : BPTR; - dvi_GlobVec : BSTR; - dvi_Name : BSTR; - end; - -{ structure used for multi-directory assigns. AllocVec()ed. } - - pAssignList = ^tAssignList; - tAssignList = record - al_Next : pAssignList; - al_Lock : BPTR; - END; - - -{ combined structure for devices, assigned directories, volumes } - - pDosList = ^tDosList; - tDosList = record - dol_Next : BPTR; { bptr to next device on list } - dol_Type : Longint; { see DLT below } - dol_Task : pMsgPort; { ptr to handler task } - dol_Lock : BPTR; - case smallint of - 0 : ( - dol_Handler : record - dol_Handler : BSTR; { file name to load IF seglist is null } - dol_StackSize, { stacksize to use when starting process } - dol_Priority, { task priority when starting process } - dol_Startup : Longint; { startup msg: FileSysStartupMsg for disks } - dol_SegList, { already loaded code for new task } - dol_GlobVec : BPTR; { BCPL global vector to use when starting - * a process. -1 indicates a C/Assembler - * program. } - end; - ); - 1 : ( - dol_Volume : record - dol_VolumeDate : tDateStamp; { creation date } - dol_LockList : BPTR; { outstanding locks } - dol_DiskType : Longint; { 'DOS', etc } - END; - ); - 2 : ( - dol_assign : record - dol_AssignName : STRPTR; { name for non-OR-late-binding assign } - dol_List : pAssignList; { for multi-directory assigns (regular) } - END; - dol_Name : BSTR; { bptr to bcpl name } - ); - END; - -Const - -{ definitions for dl_Type } - - DLT_DEVICE = 0; - DLT_DIRECTORY = 1; - DLT_VOLUME = 2; - DLT_LATE = 3; { late-binding assign } - DLT_NONBINDING = 4; { non-binding assign } - DLT_PRIVATE = -1; { for internal use only } - -{ structure return by GetDeviceProc() } -Type - - pDevProc = ^tDevProc; - tDevProc = record - dvp_Port : pMsgPort; - dvp_Lock : BPTR; - dvp_Flags : Longint; - dvp_DevNode : pDosList; { DON'T TOUCH OR USE! } - END; - -CONST -{ definitions for dvp_Flags } - DVPB_UNLOCK = 0; - DVPF_UNLOCK = 1; - DVPB_ASSIGN = 1; - DVPF_ASSIGN = 2; - -{ Flags to be passed to LockDosList(), etc } - LDB_DEVICES = 2; - LDF_DEVICES = 4; - LDB_VOLUMES = 3; - LDF_VOLUMES = 8; - LDB_ASSIGNS = 4; - LDF_ASSIGNS = 16; - LDB_ENTRY = 5; - LDF_ENTRY = 32; - LDB_DELETE = 6; - LDF_DELETE = 64; - -{ you MUST specify one of LDF_READ or LDF_WRITE } - LDB_READ = 0; - LDF_READ = 1; - LDB_WRITE = 1; - LDF_WRITE = 2; - -{ actually all but LDF_ENTRY (which is used for internal locking) } - LDF_ALL = (LDF_DEVICES+LDF_VOLUMES+LDF_ASSIGNS); - -{ error report types for ErrorReport() } - REPORT_STREAM = 0; { a stream } - REPORT_TASK = 1; { a process - unused } - REPORT_LOCK = 2; { a lock } - REPORT_VOLUME = 3; { a volume node } - REPORT_INSERT = 4; { please insert volume } - -{ Special error codes for ErrorReport() } - ABORT_DISK_ERROR = 296; { Read/write error } - ABORT_BUSY = 288; { You MUST replace... } - -{ types for initial packets to shells from run/newcli/execute/system. } -{ For shell-writers only } - RUN_EXECUTE = -1; - RUN_SYSTEM = -2; - RUN_SYSTEM_ASYNCH = -3; - -{ Types for fib_DirEntryType. NOTE that both USERDIR and ROOT are } -{ directories, and that directory/file checks should use <0 and >=0. } -{ This is not necessarily exhaustive! Some handlers may use other } -{ values as needed, though <0 and >=0 should remain as supported as } -{ possible. } - ST_ROOT = 1 ; - ST_USERDIR = 2 ; - ST_SOFTLINK = 3 ; { looks like dir, but may point to a file! } - ST_LINKDIR = 4 ; { hard link to dir } - ST_FILE = -3; { must be negative for FIB! } - ST_LINKFILE = -4; { hard link to file } - ST_PIPEFILE = -5; { for pipes that support ExamineFH } - -Type - -{ a lock structure, as returned by Lock() or DupLock() } - - pFileLock = ^tFileLock; - tFileLock = record - fl_Link : BPTR; { bcpl pointer to next lock } - fl_Key : Longint; { disk block number } - fl_Access : Longint; { exclusive or shared } - fl_Task : pMsgPort; { handler task's port } - fl_Volume : BPTR; { bptr to a DeviceList } - end; - - -{ NOTE: V37 dos.library, when doing ExAll() emulation, and V37 filesystems } -{ will return an error if passed ED_OWNER. If you get ERROR_BAD_NUMBER, } -{ retry with ED_COMMENT to get everything but owner info. All filesystems } -{ supporting ExAll() must support through ED_COMMENT, and must check Type } -{ and return ERROR_BAD_NUMBER if they don't support the type. } - -{ values that can be passed for what data you want from ExAll() } -{ each higher value includes those below it (numerically) } -{ you MUST chose one of these values } -CONST - ED_NAME = 1; - ED_TYPE = 2; - ED_SIZE = 3; - ED_PROTECTION = 4; - ED_DATE = 5; - ED_COMMENT = 6; - ED_OWNER = 7; -{ - * Structure in which exall results are returned in. Note that only the - * fields asked for will exist! - } -Type - pExAllData = ^tExAllData; - tExAllData = record - ed_Next : pExAllData; - ed_Name : STRPTR; - ed_Type, - ed_Size, - ed_Prot, - ed_Days, - ed_Mins, - ed_Ticks : ULONG; - ed_Comment : STRPTR; { strings will be after last used field } - ed_OwnerUID, { new for V39 } - ed_OwnerGID : Word; - END; - -{ - * Control structure passed to ExAll. Unused fields MUST be initialized to - * 0, expecially eac_LastKey. - * - * eac_MatchFunc is a hook (see utility.library documentation for usage) - * It should return true if the entry is to returned, false if it is to be - * ignored. - * - * This structure MUST be allocated by AllocDosObject()! - } - - pExAllControl = ^tExAllControl; - tExAllControl = record - eac_Entries, { number of entries returned in buffer } - eac_LastKey : ULONG; { Don't touch inbetween linked ExAll calls! } - eac_MatchString : STRPTR; { wildcard string for pattern match OR NULL } - eac_MatchFunc : pHook; { optional private wildcard FUNCTION } - END; - - - -{ The disk "environment" is a longword array that describes the - * disk geometry. It is variable sized, with the length at the beginning. - * Here are the constants for a standard geometry. -} - -Type - - pDosEnvec = ^tDosEnvec; - tDosEnvec = record - de_TableSize : ULONG; { Size of Environment vector } - de_SizeBlock : ULONG; { in longwords: standard value is 128 } - de_SecOrg : ULONG; { not used; must be 0 } - de_Surfaces : ULONG; { # of heads (surfaces). drive specific } - de_SectorPerBlock : ULONG; { not used; must be 1 } - de_BlocksPerTrack : ULONG; { blocks per track. drive specific } - de_Reserved : ULONG; { DOS reserved blocks at start of partition. } - de_PreAlloc : ULONG; { DOS reserved blocks at end of partition } - de_Interleave : ULONG; { usually 0 } - de_LowCyl : ULONG; { starting cylinder. typically 0 } - de_HighCyl : ULONG; { max cylinder. drive specific } - de_NumBuffers : ULONG; { Initial # DOS of buffers. } - de_BufMemType : ULONG; { type of mem to allocate for buffers } - de_MaxTransfer : ULONG; { Max number of bytes to transfer at a time } - de_Mask : ULONG; { Address Mask to block out certain memory } - de_BootPri : Longint; { Boot priority for autoboot } - de_DosType : ULONG; { ASCII (HEX) string showing filesystem type; - * 0X444F5300 is old filesystem, - * 0X444F5301 is fast file system } - de_Baud : ULONG; { Baud rate for serial handler } - de_Control : ULONG; { Control smallint for handler/filesystem } - de_BootBlocks : ULONG; { Number of blocks containing boot code } - end; - -Const - -{ these are the offsets into the array } - - DE_TABLESIZE = 0; { standard value is 11 } - DE_SIZEBLOCK = 1; { in longwords: standard value is 128 } - DE_SECORG = 2; { not used; must be 0 } - DE_NUMHEADS = 3; { # of heads (surfaces). drive specific } - DE_SECSPERBLK = 4; { not used; must be 1 } - DE_BLKSPERTRACK = 5; { blocks per track. drive specific } - DE_RESERVEDBLKS = 6; { unavailable blocks at start. usually 2 } - DE_PREFAC = 7; { not used; must be 0 } - DE_INTERLEAVE = 8; { usually 0 } - DE_LOWCYL = 9; { starting cylinder. typically 0 } - DE_UPPERCYL = 10; { max cylinder. drive specific } - DE_NUMBUFFERS = 11; { starting # of buffers. typically 5 } - DE_MEMBUFTYPE = 12; { type of mem to allocate for buffers. } - DE_BUFMEMTYPE = 12; { same as above, better name - * 1 is public, 3 is chip, 5 is fast } - DE_MAXTRANSFER = 13; { Max number bytes to transfer at a time } - DE_MASK = 14; { Address Mask to block out certain memory } - DE_BOOTPRI = 15; { Boot priority for autoboot } - DE_DOSTYPE = 16; { ASCII (HEX) string showing filesystem type; - * 0X444F5300 is old filesystem, - * 0X444F5301 is fast file system } - DE_BAUD = 17; { Baud rate for serial handler } - DE_CONTROL = 18; { Control smallint for handler/filesystem } - DE_BOOTBLOCKS = 19; { Number of blocks containing boot code } - - -{ The file system startup message is linked into a device node's startup -** field. It contains a pointer to the above environment, plus the -** information needed to do an exec OpenDevice(). -} - -Type - - pFileSysStartupMsg = ^tFileSysStartupMsg; - tFileSysStartupMsg = record - fssm_Unit : ULONG; { exec unit number for this device } - fssm_Device : BSTR; { null terminated bstring to the device name } - fssm_Environ : BPTR; { ptr to environment table (see above) } - fssm_Flags : ULONG; { flags for OpenDevice() } - end; - - -{ The include file "libraries/dosextens.h" has a DeviceList structure. - * The "device list" can have one of three different things linked onto - * it. Dosextens defines the structure for a volume. DLT_DIRECTORY - * is for an assigned directory. The following structure is for - * a dos "device" (DLT_DEVICE). -} - - pDeviceNode = ^tDeviceNode; - tDeviceNode = record - dn_Next : BPTR; { singly linked list } - dn_Type : ULONG; { always 0 for dos "devices" } - dn_Task : pMsgPort; { standard dos "task" field. If this is - * null when the node is accesses, a task - * will be started up } - dn_Lock : BPTR; { not used for devices -- leave null } - dn_Handler : BSTR; { filename to loadseg (if seglist is null) } - dn_StackSize : ULONG; { stacksize to use when starting task } - dn_Priority : Longint; { task priority when starting task } - dn_Startup : BPTR; { startup msg: FileSysStartupMsg for disks } - dn_SegList : BPTR; { code to run to start new task (if necessary). - * if null then dn_Handler will be loaded. } - dn_GlobalVec : BPTR; { BCPL global vector to use when starting - * a task. -1 means that dn_SegList is not - * for a bcpl program, so the dos won't - * try and construct one. 0 tell the - * dos that you obey BCPL linkage rules, - * and that it should construct a global - * vector for you. - } - dn_Name : BSTR; { the node name, e.g. '\3','D','F','3' } - end; - -CONST -{ use of Class and code is discouraged for the time being - we might want to - change things } -{ --- NotifyMessage Class ------------------------------------------------ } - NOTIFY_CLASS = $40000000; - -{ --- NotifyMessage Codes ------------------------------------------------ } - NOTIFY_CODE = $1234; - - -{ Sent to the application if SEND_MESSAGE is specified. } - -Type -{ Do not modify or reuse the notifyrequest while active. } -{ note: the first LONG of nr_Data has the length transfered } - - - pNotifyRequest = ^tNotifyRequest; - tNotifyRequest = record - nr_Name : pchar; - nr_FullName : pchar; - nr_UserData : ULONG; - nr_Flags : ULONG; - nr_stuff : record - case smallint of - 0 : ( nr_Msg : record - nr_Port : pMsgPort; - end ); - 1 : ( nr_Signal : record - nr_Task : pTask; - nr_SignalNum : BYTE; - nr_pad : array[0..2] of BYTE; - end ); - end; - nr_Reserved : array[0..3] of ULONG; - nr_MsgCount : ULONG; - nr_Handler : pMsgPort; - end; - - pNotifyMessage = ^tNotifyMessage; - tNotifyMessage = record - nm_ExecMessage : tMessage; - nm_Class : ULONG; - nm_Code : Word; - nm_NReq : pNotifyRequest; { don't modify the request! } - nm_DoNotTouch, { like it says! For use by handlers } - nm_DoNotTouch2 : ULONG; { ditto } - END; - - -CONST -{ --- NotifyRequest Flags ------------------------------------------------ } - NRF_SEND_MESSAGE = 1 ; - NRF_SEND_SIGNAL = 2 ; - NRF_WAIT_REPLY = 8 ; - NRF_NOTIFY_INITIAL = 16; - -{ do NOT set or remove NRF_MAGIC! Only for use by handlers! } - NRF_MAGIC = $80000000; - -{ bit numbers } - NRB_SEND_MESSAGE = 0; - NRB_SEND_SIGNAL = 1; - NRB_WAIT_REPLY = 3; - NRB_NOTIFY_INITIAL = 4; - - NRB_MAGIC = 31; - -{ Flags reserved for private use by the handler: } - NR_HANDLER_FLAGS = $ffff0000; - -{ ********************************************************************* - * - * The CSource data structure defines the input source for "ReadItem()" - * as well as the ReadArgs call. It is a publicly defined structure - * which may be used by applications which use code that follows the - * conventions defined for access. - * - * When passed to the dos.library functions, the value passed as - * struct *CSource is defined as follows: - * if ( CSource == 0) Use buffered IO "ReadChar()" as data source - * else Use CSource for input character stream - * - * The following two pseudo-code routines define how the CSource structure - * is used: - * - * long CS_ReadChar( struct CSource *CSource ) - * - * if ( CSource == 0 ) return ReadChar(); - * if ( CSource->CurChr >= CSource->Length ) return ENDSTREAMCHAR; - * return CSource->Buffer[ CSource->CurChr++ ]; - * - * - * BOOL CS_UnReadChar( struct CSource *CSource ) - * - * if ( CSource == 0 ) return UnReadChar(); - * if ( CSource->CurChr <= 0 ) return FALSE; - * CSource->CurChr--; - * return TRUE; - * - * - * To initialize a struct CSource, you set CSource->CS_Buffer to - * a string which is used as the data source, and set CS_Length to - * the number of characters in the string. Normally CS_CurChr should - * be initialized to ZERO, or left as it was from prior use as - * a CSource. - * - *********************************************************************} - -Type - pCSource = ^tCSource; - tCSource = record - CS_Buffer : STRPTR; - CS_Length, - CS_CurChr : Longint; - END; - -{ ********************************************************************* - * - * The RDArgs data structure is the input parameter passed to the DOS - * ReadArgs() function call. - * - * The RDA_Source structure is a CSource as defined above; - * if RDA_Source.CS_Buffer is non-null, RDA_Source is used as the input - * character stream to parse, else the input comes from the buffered STDIN - * calls ReadChar/UnReadChar. - * - * RDA_DAList is a private address which is used internally to track - * allocations which are freed by FreeArgs(). This MUST be initialized - * to NULL prior to the first call to ReadArgs(). - * - * The RDA_Buffer and RDA_BufSiz fields allow the application to supply - * a fixed-size buffer in which to store the parsed data. This allows - * the application to pre-allocate a buffer rather than requiring buffer - * space to be allocated. If either RDA_Buffer or RDA_BufSiz is NULL, - * the application has not supplied a buffer. - * - * RDA_ExtHelp is a text string which will be displayed instead of the - * template string, if the user is prompted for input. - * - * RDA_Flags bits control how ReadArgs() works. The flag bits are - * defined below. Defaults are initialized to ZERO. - * - *********************************************************************} - - pRDArgs = ^tRDArgs; - tRDArgs = record - RDA_Source : tCSource; { Select input source } - RDA_DAList : Longint; { PRIVATE. } - RDA_Buffer : STRPTR; { Optional string parsing space. } - RDA_BufSiz : Longint; { Size of RDA_Buffer (0..n) } - RDA_ExtHelp : STRPTR; { Optional extended help } - RDA_Flags : Longint; { Flags for any required control } - END; - -CONST - RDAB_STDIN = 0; { Use "STDIN" rather than "COMMAND LINE" } - RDAF_STDIN = 1; - RDAB_NOALLOC = 1; { If set, do not allocate extra string space.} - RDAF_NOALLOC = 2; - RDAB_NOPROMPT = 2; { Disable reprompting for string input. } - RDAF_NOPROMPT = 4; - -{ ********************************************************************* - * Maximum number of template keywords which can be in a template passed - * to ReadArgs(). IMPLEMENTOR NOTE - must be a multiple of 4. - *********************************************************************} - MAX_TEMPLATE_ITEMS = 100; - -{ ********************************************************************* - * Maximum number of MULTIARG items returned by ReadArgs(), before - * an ERROR_LINE_TOO_LONG. These two limitations are due to stack - * usage. Applications should allow "a lot" of stack to use ReadArgs(). - *********************************************************************} - MAX_MULTIARGS = 128; - -CONST -{ Modes for LockRecord/LockRecords() } - REC_EXCLUSIVE = 0; - REC_EXCLUSIVE_IMMED = 1; - REC_SHARED = 2; - REC_SHARED_IMMED = 3; - -{ struct to be passed to LockRecords()/UnLockRecords() } - -Type - pRecordLock = ^tRecordLock; - tRecordLock = record - rec_FH : BPTR; { filehandle } - rec_Offset, { offset in file } - rec_Length, { length of file to be locked } - rec_Mode : ULONG; { Type of lock } - END; - - -{ the structure in the pr_LocalVars list } -{ Do NOT allocate yourself, use SetVar()!!! This structure may grow in } -{ future releases! The list should be left in alphabetical order, and } -{ may have multiple entries with the same name but different types. } -Type - pLocalVar = ^tLocalVar; - tLocalVar = record - lv_Node : tNode; - lv_Flags : Word; - lv_Value : STRPTR; - lv_Len : ULONG; - END; - -{ - * The lv_Flags bits are available to the application. The unused - * lv_Node.ln_Pri bits are reserved for system use. - } - -CONST -{ bit definitions for lv_Node.ln_Type: } - LV_VAR = 0; { an variable } - LV_ALIAS = 1; { an alias } -{ to be or'ed into type: } - LVB_IGNORE = 7; { ignore this entry on GetVar, etc } - LVF_IGNORE = $80; - -{ definitions of flags passed to GetVar()/SetVar()/DeleteVar() } -{ bit defs to be OR'ed with the type: } -{ item will be treated as a single line of text unless BINARY_VAR is used } - GVB_GLOBAL_ONLY = 8 ; - GVF_GLOBAL_ONLY = $100; - GVB_LOCAL_ONLY = 9 ; - GVF_LOCAL_ONLY = $200; - GVB_BINARY_VAR = 10 ; { treat variable as binary } - GVF_BINARY_VAR = $400; - GVB_DONT_NULL_TERM = 11; { only with GVF_BINARY_VAR } - GVF_DONT_NULL_TERM = $800; - -{ this is only supported in >= V39 dos. V37 dos ignores this. } -{ this causes SetVar to affect ENVARC: as well as ENV:. } - GVB_SAVE_VAR = 12 ; { only with GVF_GLOBAL_VAR } - GVF_SAVE_VAR = $1000 ; - - -CONST -{ ***************************************************************************} -{ definitions for the System() call } - - SYS_Dummy = (TAG_USER + 32); - SYS_Input = (SYS_Dummy + 1); - { specifies the input filehandle } - SYS_Output = (SYS_Dummy + 2); - { specifies the output filehandle } - SYS_Asynch = (SYS_Dummy + 3); - { run asynch, close input/output on exit(!) } - SYS_UserShell = (SYS_Dummy + 4); - { send to user shell instead of boot shell } - SYS_CustomShell= (SYS_Dummy + 5); - { send to a specific shell (data is name) } -{ SYS_Error, } - - -{ ***************************************************************************} -{ definitions for the CreateNewProc() call } -{ you MUST specify one of NP_Seglist or NP_Entry. All else is optional. } - - NP_Dummy = (TAG_USER + 1000); - NP_Seglist = (NP_Dummy + 1); - { seglist of code to run for the process } - NP_FreeSeglist = (NP_Dummy + 2); - { free seglist on exit - only valid for } - { for NP_Seglist. Default is TRUE. } - NP_Entry = (NP_Dummy + 3); - { entry point to run - mutually exclusive } - { with NP_Seglist! } - NP_Input = (NP_Dummy + 4); - { filehandle - default is Open("NIL:"...) } - NP_Output = (NP_Dummy + 5); - { filehandle - default is Open("NIL:"...) } - NP_CloseInput = (NP_Dummy + 6); - { close input filehandle on exit } - { default TRUE } - NP_CloseOutput = (NP_Dummy + 7); - { close output filehandle on exit } - { default TRUE } - NP_Error = (NP_Dummy + 8); - { filehandle - default is Open("NIL:"...) } - NP_CloseError = (NP_Dummy + 9); - { close error filehandle on exit } - { default TRUE } - NP_CurrentDir = (NP_Dummy + 10); - { lock - default is parent's current dir } - NP_StackSize = (NP_Dummy + 11); - { stacksize for process - default 4000 } - NP_Name = (NP_Dummy + 12); - { name for process - default "New Process"} - NP_Priority = (NP_Dummy + 13); - { priority - default same as parent } - NP_ConsoleTask = (NP_Dummy + 14); - { consoletask - default same as parent } - NP_WindowPtr = (NP_Dummy + 15); - { window ptr - default is same as parent } - NP_HomeDir = (NP_Dummy + 16); - { home directory - default curr home dir } - NP_CopyVars = (NP_Dummy + 17); - { boolean to copy local vars-default TRUE } - NP_Cli = (NP_Dummy + 18); - { create cli structure - default FALSE } - NP_Path = (NP_Dummy + 19); - { path - default is copy of parents path } - { only valid if a cli process! } - NP_CommandName = (NP_Dummy + 20); - { commandname - valid only for CLI } - NP_Arguments = (NP_Dummy + 21); - { cstring of arguments - passed with str } - { in a0, length in d0. (copied and freed } - { on exit. Default is empty string. } - { NOTE: not operational until 2.04 - see } - { BIX/TechNotes for more info/workarounds } - { NOTE: in 2.0, it DIDN'T pass "" - the } - { registers were random. } -{ FIX! should this be only for cli's? } - NP_NotifyOnDeath = (NP_Dummy + 22); - { notify parent on death - default FALSE } - { Not functional yet. } - NP_Synchronous = (NP_Dummy + 23); - { don't return until process finishes - } - { default FALSE. } - { Not functional yet. } - NP_ExitCode = (NP_Dummy + 24); - { code to be called on process exit } - NP_ExitData = (NP_Dummy + 25); - { optional argument for NP_EndCode rtn - } - { default NULL } - - -{ ***************************************************************************} -{ tags for AllocDosObject } - - ADO_Dummy = (TAG_USER + 2000); - ADO_FH_Mode = (ADO_Dummy + 1); - { for type DOS_FILEHANDLE only } - { sets up FH for mode specified. - This can make a big difference for buffered - files. } - { The following are for DOS_CLI } - { If you do not specify these, dos will use it's preferred values } - { which may change from release to release. The BPTRs to these } - { will be set up correctly for you. Everything will be zero, } - { except cli_FailLevel (10) and cli_Background (DOSTRUE). } - { NOTE: you may also use these 4 tags with CreateNewProc. } - - ADO_DirLen = (ADO_Dummy + 2); - { size in bytes for current dir buffer } - ADO_CommNameLen= (ADO_Dummy + 3); - { size in bytes for command name buffer } - ADO_CommFileLen= (ADO_Dummy + 4); - { size in bytes for command file buffer } - ADO_PromptLen = (ADO_Dummy + 5); - { size in bytes for the prompt buffer } - -{ ***************************************************************************} -{ tags for NewLoadSeg } -{ no tags are defined yet for NewLoadSeg } - - -//PROCEDURE AbortPkt(port : pMsgPort; pkt : pDosPacket); -//FUNCTION AddBuffers(const name : pCHAR; number : LONGINT) : BOOLEAN; -//FUNCTION AddDosEntry(dlist : pDosList) : BOOLEAN; -//FUNCTION AddPart(dirname : pCHAR;const filename : pCHAR; size : ULONG) : BOOLEAN; -//FUNCTION AddSegment(const name : pCHAR; seg : LONGINT; system : LONGINT) : BOOLEAN; -//FUNCTION AllocDosObject(type_ : ULONG;const tags : pTagItem) : POINTER; -//FUNCTION AllocDosObjectTagList(type_ : ULONG;const tags : pTagItem) : POINTER; -//FUNCTION AssignAdd(const name : pCHAR; lock : LONGINT) : BOOLEAN; -//FUNCTION AssignLate(const name : pCHAR;const path : pCHAR) : BOOLEAN; -//FUNCTION AssignLock(const name : pCHAR; lock : LONGINT) : BOOLEAN; -//FUNCTION AssignPath(const name : pCHAR;const path : pCHAR) : BOOLEAN; -//FUNCTION AttemptLockDosList(flags : ULONG) : pDosList; -//FUNCTION ChangeMode(type_ : LONGINT; fh : LONGINT; newmode : LONGINT) : BOOLEAN; -//FUNCTION CheckSignal(mask : LONGINT) : LONGINT; -FUNCTION Cli : pCommandLineInterface; -//FUNCTION CliInitNewcli(dp : pDosPacket) : LONGINT; -//FUNCTION CliInitRun(dp : pDosPacket) : LONGINT; -//FUNCTION CompareDates(const date1 : pDateStamp;const date2 : pDateStamp) : LONGINT; -//FUNCTION CreateDir(const name : pCHAR) : LONGINT; -//FUNCTION CreateNewProc(const tags : pTagItem) : pProcess; -//FUNCTION CreateNewProcTagList(const tags : pTagItem) : pProcess; -//FUNCTION CreateProc(const name : pCHAR; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -//FUNCTION CurrentDir(lock : LONGINT) : LONGINT; -//PROCEDURE DateStamp(date : pDateStamp); -//FUNCTION DateToStr(datetime : pDateTime) : BOOLEAN; -//FUNCTION DeleteFile(const name : pCHAR) : BOOLEAN; -//FUNCTION DeleteVar(const name : pCHAR; flags : ULONG) : BOOLEAN; -//FUNCTION DeviceProc(const name : pCHAR) : pMsgPort; -//FUNCTION DoPkt(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT; arg5 : LONGINT) : LONGINT; -//FUNCTION DoPkt0(port : pMsgPort; action : LONGINT) : LONGINT; -//FUNCTION DoPkt1(port : pMsgPort; action : LONGINT; arg1 : LONGINT) : LONGINT; -//FUNCTION DoPkt2(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT) : LONGINT; -//FUNCTION DoPkt3(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT) : LONGINT; -//FUNCTION DoPkt4(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT) : LONGINT; -//PROCEDURE DOSClose(file_ : LONGINT); -PROCEDURE DOSDelay(timeout : LONGINT); -//PROCEDURE DOSExit(returnCode : LONGINT); -//FUNCTION DOSFlush(fh : LONGINT) : BOOLEAN; -//FUNCTION DOSInput : LONGINT; -//FUNCTION DOSOpen(const name : pCHAR; accessMode : LONGINT) : LONGINT; -//FUNCTION DOSOutput : LONGINT; -//FUNCTION DOSRead(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -//FUNCTION DOSRename(const oldName : pCHAR;const newName : pCHAR) : Boolean; -//FUNCTION DOSSeek(file_ : LONGINT; position : LONGINT; offset : LONGINT) : LONGINT; -//FUNCTION DOSWrite(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -//FUNCTION DupLock(lock : LONGINT) : LONGINT; -//FUNCTION DupLockFromFH(fh : LONGINT) : LONGINT; -//PROCEDURE EndNotify(notify : pNotifyRequest); -//FUNCTION ErrorReport(code : LONGINT; type_ : LONGINT; arg1 : ULONG; device : pMsgPort) : BOOLEAN; -//FUNCTION ExAll(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl) : BOOLEAN; -//PROCEDURE ExAllEnd(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl); -//FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -//FUNCTION ExamineFH(fh : LONGINT; fib : pFileInfoBlock) : BOOLEAN; -//FUNCTION Execute(const string_ : pCHAR; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -//FUNCTION ExNext(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -//FUNCTION Fault(code : LONGINT; header : pCHAR; buffer : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION FGetC(fh : LONGINT) : LONGINT; -//FUNCTION FGets(fh : LONGINT; buf : pCHAR; buflen : ULONG) : pCHAR; -//FUNCTION FilePart(const path : pCHAR) : pCHAR; -//FUNCTION FindArg(const keyword : pCHAR;const arg_template : pCHAR) : LONGINT; -//FUNCTION FindCliProc(num : ULONG) : pProcess; -//FUNCTION FindDosEntry(const dlist : pDosList;const name : pCHAR; flags : ULONG) : pDosList; -//FUNCTION FindSegment(const name : pCHAR;const seg : pSegment; system : LONGINT) : pSegment; -//FUNCTION FindVar(const name : pCHAR; type_ : ULONG) : pLocalVar; -//FUNCTION Format(const filesystem : pCHAR;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -//FUNCTION FPutC(fh : LONGINT; ch : LONGINT) : LONGINT; -//FUNCTION FPuts(fh : LONGINT;const str : pCHAR) : BOOLEAN; -//FUNCTION FRead(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -//PROCEDURE FreeArgs(args : pRDArgs); -//PROCEDURE FreeDeviceProc(dp : pDevProc); -//PROCEDURE FreeDosEntry(dlist : pDosList); -//PROCEDURE FreeDosObject(type_ : ULONG; ptr : POINTER); -//FUNCTION FWrite(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -//FUNCTION GetArgStr : pCHAR; -//FUNCTION GetConsoleTask : pMsgPort; -//FUNCTION GetCurrentDirName(buf : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION GetDeviceProc(const name : pCHAR; dp : pDevProc) : pDevProc; -//FUNCTION GetFileSysTask : pMsgPort; -//FUNCTION GetProgramDir : LONGINT; -//FUNCTION GetProgramName(buf : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION GetPrompt(buf : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION GetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -//FUNCTION Info(lock : LONGINT; parameterBlock : pInfoData) : BOOLEAN; -//FUNCTION Inhibit(const name : pCHAR; onoff : LONGINT) : BOOLEAN; -//FUNCTION InternalLoadSeg(fh : LONGINT; table : LONGINT;const funcarray : pLONGINT; VAR stack : LONGINT) : LONGINT; -//FUNCTION InternalUnLoadSeg(seglist : LONGINT; freefunc : tPROCEDURE) : BOOLEAN; -//FUNCTION IoErr : LONGINT; -//FUNCTION IsFileSystem(const name : pCHAR) : BOOLEAN; -//FUNCTION IsInteractive(file_ : LONGINT) : BOOLEAN; -//FUNCTION LoadSeg(const name : pCHAR) : LONGINT; -//FUNCTION Lock(const name : pCHAR; type_ : LONGINT) : LONGINT; -//FUNCTION LockDosList(flags : ULONG) : pDosList; -//FUNCTION LockRecord(fh : LONGINT; offset : ULONG; length : ULONG; mode : ULONG; timeout : ULONG) : BOOLEAN; -//FUNCTION LockRecords(recArray : pRecordLock; timeout : ULONG) : BOOLEAN; -//FUNCTION MakeDosEntry(const name : pCHAR; type_ : LONGINT) : pDosList; -//FUNCTION MakeLink(const name : pCHAR; dest : LONGINT; soft : LONGINT) : BOOLEAN; -//PROCEDURE MatchEnd(anchor : pAnchorPath); -//FUNCTION MatchFirst(const pat : pCHAR; anchor : pAnchorPath) : LONGINT; -//FUNCTION MatchNext(anchor : pAnchorPath) : LONGINT; -//FUNCTION MatchPattern(const pat : pCHAR; str : pCHAR) : BOOLEAN; -//FUNCTION MatchPatternNoCase(const pat : pCHAR; str : pCHAR) : BOOLEAN; -//FUNCTION MaxCli : ULONG; -//FUNCTION NameFromFH(fh : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -//FUNCTION NewLoadSeg(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION NewLoadSegTagList(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION NextDosEntry(const dlist : pDosList; flags : ULONG) : pDosList; -//FUNCTION OpenFromLock(lock : LONGINT) : LONGINT; -//FUNCTION ParentDir(lock : LONGINT) : LONGINT; -//FUNCTION ParentOfFH(fh : LONGINT) : LONGINT; -//FUNCTION ParsePattern(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -//FUNCTION ParsePatternNoCase(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -//FUNCTION PathPart(const path : pCHAR) : pCHAR; -//FUNCTION PrintFault(code : LONGINT;const header : pCHAR) : BOOLEAN; -//FUNCTION PutStr(const str : pCHAR) : BOOLEAN; -//FUNCTION ReadArgs(const arg_template : pCHAR; arra : pLONGINT; args : pRDArgs) : pRDArgs; -//FUNCTION ReadItem(const name : pCHAR; maxchars : LONGINT; cSource : pCSource) : LONGINT; -//FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : pCHAR; buffer : pCHAR; size : ULONG) : BOOLEAN; -//FUNCTION Relabel(const drive : pCHAR;const newname : pCHAR) : BOOLEAN; -//FUNCTION RemAssignList(const name : pCHAR; lock : LONGINT) : BOOLEAN; -//FUNCTION RemDosEntry(dlist : pDosList) : BOOLEAN; -//FUNCTION RemSegment(seg : pSegment) : BOOLEAN; -//PROCEDURE ReplyPkt(dp : pDosPacket; res1 : LONGINT; res2 : LONGINT); -//FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : pCHAR; paramlen : LONGINT) : LONGINT; -//FUNCTION SameDevice(lock1 : LONGINT; lock2 : LONGINT) : BOOLEAN; -//FUNCTION SameLock(lock1 : LONGINT; lock2 : LONGINT) : LONGINT; -//FUNCTION SelectInput(fh : LONGINT) : LONGINT; -//FUNCTION SelectOutput(fh : LONGINT) : LONGINT; -//PROCEDURE SendPkt(dp : pDosPacket; port : pMsgPort; replyport : pMsgPort); -//FUNCTION SetArgStr(const string_ : pCHAR) : BOOLEAN; -//FUNCTION SetComment(const name : pCHAR;const comment : pCHAR) : BOOLEAN; -//FUNCTION SetConsoleTask(const task : pMsgPort) : pMsgPort; -//FUNCTION SetCurrentDirName(const name : pCHAR) : BOOLEAN; -//FUNCTION SetFileDate(const name : pCHAR; date : pDateStamp) : BOOLEAN; -//FUNCTION SetFileSize(fh : LONGINT; pos : LONGINT; mode : LONGINT) : BOOLEAN; -//FUNCTION SetFileSysTask(const task : pMsgPort) : pMsgPort; -//FUNCTION SetIoErr(result : LONGINT) : LONGINT; -//FUNCTION SetMode(fh : LONGINT; mode : LONGINT) : BOOLEAN; -//FUNCTION SetOwner(const name : pCHAR; owner_info : LONGINT) : BOOLEAN; -//FUNCTION SetProgramDir(lock : LONGINT) : LONGINT; -//FUNCTION SetProgramName(const name : pCHAR) : BOOLEAN; -//FUNCTION SetPrompt(const name : pCHAR) : BOOLEAN; -//FUNCTION SetProtection(const name : pCHAR; protect : LONGINT) : BOOLEAN; -//FUNCTION SetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -//FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN; -//FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -//FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN; -//FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN; -//FUNCTION StrToLong(const string_ : pCHAR; VAR value : LONGINT) : LONGINT; -//FUNCTION SystemTagList(const command : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION DOSSystem(const command : pCHAR;const tags : pTagItem) : LONGINT; -//FUNCTION UnGetC(fh : LONGINT; character : LONGINT) : LONGINT; -//PROCEDURE UnLoadSeg(seglist : LONGINT); -PROCEDURE UnLock(lock : LONGINT); -//PROCEDURE UnLockDosList(flags : ULONG); -//FUNCTION UnLockRecord(fh : LONGINT; offset : ULONG; length : ULONG) : BOOLEAN; -//FUNCTION UnLockRecords(recArray : pRecordLock) : BOOLEAN; -//FUNCTION VFPrintf(fh : LONGINT;const format : pCHAR;const argarray : POINTER) : LONGINT; -//PROCEDURE VFWritef(fh : LONGINT;const format : pCHAR;const argarray : pLONGINT); -//FUNCTION VPrintf(const format : pCHAR; const argarray : POINTER) : LONGINT; -//FUNCTION WaitForChar(file_ : LONGINT; timeout : LONGINT) : BOOLEAN; -//FUNCTION WaitPkt : pDosPacket; -//FUNCTION WriteChars(const buf : pCHAR; buflen : ULONG) : LONGINT; - -//FUNCTION BADDR(bval :BPTR): POINTER; -//FUNCTION MKBADDR(adr: Pointer): BPTR; - -{ overlay function and procedures} -{ -FUNCTION AddBuffers(const name : string; number : LONGINT) : BOOLEAN; -FUNCTION AddPart(dirname : string;const filename : pCHAR; size : ULONG) : BOOLEAN; -FUNCTION AddPart(dirname : pCHAR;const filename : string; size : ULONG) : BOOLEAN; -FUNCTION AddPart(dirname : string;const filename : string; size : ULONG) : BOOLEAN; -FUNCTION AssignAdd(const name : string; lock : LONGINT) : BOOLEAN; -FUNCTION AssignLate(const name : string;const path : pCHAR) : BOOLEAN; -FUNCTION AssignLate(const name : pChar;const path : string) : BOOLEAN; -FUNCTION AssignLate(const name : string;const path : string) : BOOLEAN; -FUNCTION AssignLock(const name : string; lock : LONGINT) : BOOLEAN; -FUNCTION AssignPath(const name : string; const path : pCHAR) : BOOLEAN; -FUNCTION AssignPath(const name : pCHAR;const path : string) : BOOLEAN; -FUNCTION AssignPath(const name : string;const path : string) : BOOLEAN; -FUNCTION CreateDir(const name : string) : LONGINT; -FUNCTION CreateProc(const name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -FUNCTION DeleteFile(const name : string) : BOOLEAN; -FUNCTION DeleteVar(const name : string; flags : ULONG) : BOOLEAN; -FUNCTION DeviceProc(const name : string) : pMsgPort; -FUNCTION DOSOpen(const name : string; accessMode : LONGINT) : LONGINT; -FUNCTION DOSRename(const oldName : string;const newName : pChar) : boolean; -FUNCTION DOSRename(const oldName : pCHAR;const newName : string) : Boolean; -FUNCTION DOSRename(const oldName : string;const newName : string) : Boolean; -FUNCTION Execute(const string_ : string; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -FUNCTION Fault(code : LONGINT; header : string; buffer : pCHAR; len : LONGINT) : BOOLEAN; -FUNCTION FilePart(const path : string) : pCHAR; -FUNCTION FindArg(const keyword : string;const arg_template : pCHAR) : LONGINT; -FUNCTION FindArg(const keyword : pCHAR;const arg_template : string) : LONGINT; -FUNCTION FindArg(const keyword : string;const arg_template : string) : LONGINT; -FUNCTION FindDosEntry(const dlist : pDosList;const name : string; flags : ULONG) : pDosList; -FUNCTION FindSegment(const name : string;const seg : pSegment; system : LONGINT) : pSegment; -FUNCTION FindVar(const name : string; type_ : ULONG) : pLocalVar; -FUNCTION Format(const filesystem : string;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -FUNCTION Format(const filesystem : pCHAR;const volumename : string; dostype : ULONG) : BOOLEAN; -FUNCTION Format(const filesystem : string;const volumename : string; dostype : ULONG) : BOOLEAN; -FUNCTION FPuts(fh : LONGINT;const str : string) : BOOLEAN; -FUNCTION GetDeviceProc(const name : string; dp : pDevProc) : pDevProc; -FUNCTION GetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -FUNCTION Inhibit(const name : string; onoff : LONGINT) : BOOLEAN; -FUNCTION IsFileSystem(const name : string) : BOOLEAN; -FUNCTION LoadSeg(const name : string) : LONGINT; -FUNCTION Lock(const name : string; type_ : LONGINT) : LONGINT; -FUNCTION MakeDosEntry(const name : string; type_ : LONGINT) : pDosList; -FUNCTION MakeLink(const name : string; dest : LONGINT; soft : LONGINT) : BOOLEAN; -FUNCTION MatchFirst(const pat : string; anchor : pAnchorPath) : LONGINT; -FUNCTION MatchPattern(const pat : string; str : pCHAR) : BOOLEAN; -FUNCTION MatchPattern(const pat : pCHAR; str : string) : BOOLEAN; -FUNCTION MatchPattern(const pat : string; str : string) : BOOLEAN; -FUNCTION MatchPatternNoCase(const pat : string; str : pCHAR) : BOOLEAN; -FUNCTION MatchPatternNoCase(const pat : pCHAR; str : string) : BOOLEAN; -FUNCTION MatchPatternNoCase(const pat : string; str : string) : BOOLEAN; -FUNCTION NewLoadSeg(const file_ : string;const tags : pTagItem) : LONGINT; -FUNCTION NewLoadSegTagList(const file_ : string;const tags : pTagItem) : LONGINT; -FUNCTION PathPart(const path : string) : pCHAR; -FUNCTION PrintFault(code : LONGINT;const header : string) : BOOLEAN; -FUNCTION PutStr(const str : string) : BOOLEAN; -FUNCTION ReadArgs(const arg_template : string; arra : pLONGINT; args : pRDArgs) : pRDArgs; -FUNCTION ReadItem(const name : string; maxchars : LONGINT; cSource : pCSource) : LONGINT; -FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : string; buffer : pCHAR; size : ULONG) : BOOLEAN; -FUNCTION Relabel(const drive : string;const newname : pCHAR) : BOOLEAN; -FUNCTION Relabel(const drive : pCHAR;const newname : string) : BOOLEAN; -FUNCTION Relabel(const drive : string;const newname : string) : BOOLEAN; -FUNCTION RemAssignList(const name : string; lock : LONGINT) : BOOLEAN; -FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : string; paramlen : LONGINT) : LONGINT; -FUNCTION SetArgStr(const string_ : string) : BOOLEAN; -FUNCTION SetComment(const name : string;const comment : pCHAR) : BOOLEAN; -FUNCTION SetComment(const name : pCHAR;const comment : string) : BOOLEAN; -FUNCTION SetComment(const name : string;const comment : string) : BOOLEAN; -FUNCTION SetCurrentDirName(const name : string) : BOOLEAN; -FUNCTION SetFileDate(const name : string; date : pDateStamp) : BOOLEAN; -FUNCTION SetOwner(const name : string; owner_info : LONGINT) : BOOLEAN; -FUNCTION SetProgramName(const name : string) : BOOLEAN; -FUNCTION SetPrompt(const name : string) : BOOLEAN; -FUNCTION SetProtection(const name : string; protect : LONGINT) : BOOLEAN; -FUNCTION SetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -FUNCTION StrToLong(const string_ : string; VAR value : LONGINT) : LONGINT; -FUNCTION SystemTagList(const command : string;const tags : pTagItem) : LONGINT; -FUNCTION DOSSystem(const command : string;const tags : pTagItem) : LONGINT; -} -IMPLEMENTATION - -uses pastoc; - - -{ -FUNCTION BADDR(bval : BPTR): POINTER; -BEGIN - BADDR := POINTER( bval shl 2); -END; - -FUNCTION MKBADDR(adr : POINTER): BPTR; -BEGIN - MKBADDR := BPTR( LONGINT(adr) shr 2); -END; - -PROCEDURE AbortPkt(port : pMsgPort; pkt : pDosPacket); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L pkt,D2 - MOVEA.L _DOSBase,A6 - JSR -264(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION AddBuffers(const name : pCHAR; number : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L number,D2 - MOVEA.L _DOSBase,A6 - JSR -732(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AddDosEntry(dlist : pDosList) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVEA.L _DOSBase,A6 - JSR -678(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AddPart(dirname : pCHAR;const filename : pCHAR; size : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dirname,D1 - MOVE.L filename,D2 - MOVE.L size,D3 - MOVEA.L _DOSBase,A6 - JSR -882(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AddSegment(const name : pCHAR; seg : LONGINT; system : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L seg,D2 - MOVE.L system,D3 - MOVEA.L _DOSBase,A6 - JSR -774(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AllocDosObject(type_ : ULONG;const tags : pTagItem) : POINTER; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -228(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION AllocDosObjectTagList(type_ : ULONG;const tags : pTagItem) : POINTER; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -228(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION AssignAdd(const name : pCHAR; lock : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L lock,D2 - MOVEA.L _DOSBase,A6 - JSR -630(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AssignLate(const name : pCHAR;const path : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L path,D2 - MOVEA.L _DOSBase,A6 - JSR -618(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AssignLock(const name : pCHAR; lock : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L lock,D2 - MOVEA.L _DOSBase,A6 - JSR -612(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AssignPath(const name : pCHAR;const path : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L path,D2 - MOVEA.L _DOSBase,A6 - JSR -624(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION AttemptLockDosList(flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L flags,D1 - MOVEA.L _DOSBase,A6 - JSR -666(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ChangeMode(type_ : LONGINT; fh : LONGINT; newmode : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L fh,D2 - MOVE.L newmode,D3 - MOVEA.L _DOSBase,A6 - JSR -450(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION CheckSignal(mask : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L mask,D1 - MOVEA.L _DOSBase,A6 - JSR -792(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Cli : pCommandLineInterface; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -492(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CliInitNewcli(dp : pDosPacket) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dp,A0 - MOVEA.L _DOSBase,A6 - JSR -930(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CliInitRun(dp : pDosPacket) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dp,A0 - MOVEA.L _DOSBase,A6 - JSR -936(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CompareDates(const date1 : pDateStamp;const date2 : pDateStamp) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L date1,D1 - MOVE.L date2,D2 - MOVEA.L _DOSBase,A6 - JSR -738(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateDir(const name : pCHAR) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -120(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateNewProc(const tags : pTagItem) : pProcess; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L tags,D1 - MOVEA.L _DOSBase,A6 - JSR -498(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateNewProcTagList(const tags : pTagItem) : pProcess; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L tags,D1 - MOVEA.L _DOSBase,A6 - JSR -498(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateProc(const name : pCHAR; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L pri,D2 - MOVE.L segList,D3 - MOVE.L stackSize,D4 - MOVEA.L _DOSBase,A6 - JSR -138(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CurrentDir(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -126(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE DateStamp(date : pDateStamp); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L date,D1 - MOVEA.L _DOSBase,A6 - JSR -192(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION DateToStr(datetime : pDateTime) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L datetime,D1 - MOVEA.L _DOSBase,A6 - JSR -744(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DeleteFile(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -072(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DeleteVar(const name : pCHAR; flags : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L flags,D2 - MOVEA.L _DOSBase,A6 - JSR -912(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DeviceProc(const name : pCHAR) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -174(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT; arg5 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVE.L arg3,D5 - MOVE.L arg4,D6 - MOVE.L arg5,D7 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt0(port : pMsgPort; action : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt1(port : pMsgPort; action : LONGINT; arg1 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt2(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt3(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVE.L arg3,D5 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DoPkt4(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L action,D2 - MOVE.L arg1,D3 - MOVE.L arg2,D4 - MOVE.L arg3,D5 - MOVE.L arg4,D6 - MOVEA.L _DOSBase,A6 - JSR -240(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE DOSClose(file_ : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVEA.L _DOSBase,A6 - JSR -036(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE DOSDelay(timeout : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L timeout,D1 - MOVEA.L _DOSBase,A6 - JSR -198(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE DOSExit(returnCode : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L returnCode,D1 - MOVEA.L _DOSBase,A6 - JSR -144(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION DOSFlush(fh : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -360(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DOSInput : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -054(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSOpen(const name : pCHAR; accessMode : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L accessMode,D2 - MOVEA.L _DOSBase,A6 - JSR -030(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSOutput : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -060(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSRead(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L buffer,D2 - MOVE.L length,D3 - MOVEA.L _DOSBase,A6 - JSR -042(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSRename(const oldName : pCHAR;const newName : pCHAR) : Boolean; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L oldName,D1 - MOVE.L newName,D2 - MOVEA.L _DOSBase,A6 - JSR -078(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION DOSSeek(file_ : LONGINT; position : LONGINT; offset : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L position,D2 - MOVE.L offset,D3 - MOVEA.L _DOSBase,A6 - JSR -066(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSWrite(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L buffer,D2 - MOVE.L length,D3 - MOVEA.L _DOSBase,A6 - JSR -048(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DupLock(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -096(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DupLockFromFH(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -372(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE EndNotify(notify : pNotifyRequest); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L notify,D1 - MOVEA.L _DOSBase,A6 - JSR -894(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION ErrorReport(code : LONGINT; type_ : LONGINT; arg1 : ULONG; device : pMsgPort) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L code,D1 - MOVE.L type_,D2 - MOVE.L arg1,D3 - MOVE.L device,D4 - MOVEA.L _DOSBase,A6 - JSR -480(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ExAll(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L data,D4 - MOVE.L control,D5 - MOVEA.L _DOSBase,A6 - JSR -432(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -PROCEDURE ExAllEnd(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L data,D4 - MOVE.L control,D5 - MOVEA.L _DOSBase,A6 - JSR -990(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L fileInfoBlock,D2 - MOVEA.L _DOSBase,A6 - JSR -102(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ExamineFH(fh : LONGINT; fib : pFileInfoBlock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L fib,D2 - MOVEA.L _DOSBase,A6 - JSR -390(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Execute(const string_ : pCHAR; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L string_,D1 - MOVE.L file_,D2 - MOVE.L file2,D3 - MOVEA.L _DOSBase,A6 - JSR -222(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ExNext(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L fileInfoBlock,D2 - MOVEA.L _DOSBase,A6 - JSR -108(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Fault(code : LONGINT; header : pCHAR; buffer : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L code,D1 - MOVE.L header,D2 - MOVE.L buffer,D3 - MOVE.L len,D4 - MOVEA.L _DOSBase,A6 - JSR -468(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION FGetC(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -306(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FGets(fh : LONGINT; buf : pCHAR; buflen : ULONG) : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L buf,D2 - MOVE.L buflen,D3 - MOVEA.L _DOSBase,A6 - JSR -336(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FilePart(const path : pCHAR) : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L path,D1 - MOVEA.L _DOSBase,A6 - JSR -870(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindArg(const keyword : pCHAR;const arg_template : pCHAR) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L keyword,D1 - MOVE.L arg_template,D2 - MOVEA.L _DOSBase,A6 - JSR -804(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindCliProc(num : ULONG) : pProcess; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L num,D1 - MOVEA.L _DOSBase,A6 - JSR -546(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindDosEntry(const dlist : pDosList;const name : pCHAR; flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVE.L name,D2 - MOVE.L flags,D3 - MOVEA.L _DOSBase,A6 - JSR -684(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindSegment(const name : pCHAR;const seg : pSegment; system : LONGINT) : pSegment; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L seg,D2 - MOVE.L system,D3 - MOVEA.L _DOSBase,A6 - JSR -780(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FindVar(const name : pCHAR; type_ : ULONG) : pLocalVar; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L type_,D2 - MOVEA.L _DOSBase,A6 - JSR -918(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Format(const filesystem : pCHAR;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L filesystem,D1 - MOVE.L volumename,D2 - MOVE.L dostype,D3 - MOVEA.L _DOSBase,A6 - JSR -714(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION FPutC(fh : LONGINT; ch : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L ch,D2 - MOVEA.L _DOSBase,A6 - JSR -312(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION FPuts(fh : LONGINT;const str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L str,D2 - MOVEA.L _DOSBase,A6 - JSR -342(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION FRead(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L block,D2 - MOVE.L blocklen,D3 - MOVE.L number,D4 - MOVEA.L _DOSBase,A6 - JSR -324(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE FreeArgs(args : pRDArgs); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L args,D1 - MOVEA.L _DOSBase,A6 - JSR -858(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE FreeDeviceProc(dp : pDevProc); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dp,D1 - MOVEA.L _DOSBase,A6 - JSR -648(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE FreeDosEntry(dlist : pDosList); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVEA.L _DOSBase,A6 - JSR -702(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE FreeDosObject(type_ : ULONG; ptr : POINTER); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L type_,D1 - MOVE.L ptr,D2 - MOVEA.L _DOSBase,A6 - JSR -234(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION FWrite(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L block,D2 - MOVE.L blocklen,D3 - MOVE.L number,D4 - MOVEA.L _DOSBase,A6 - JSR -330(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetArgStr : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -534(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetConsoleTask : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -510(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetCurrentDirName(buf : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L len,D2 - MOVEA.L _DOSBase,A6 - JSR -564(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION GetDeviceProc(const name : pCHAR; dp : pDevProc) : pDevProc; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L dp,D2 - MOVEA.L _DOSBase,A6 - JSR -642(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetFileSysTask : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -522(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetProgramDir : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -600(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION GetProgramName(buf : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L len,D2 - MOVEA.L _DOSBase,A6 - JSR -576(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION GetPrompt(buf : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L len,D2 - MOVEA.L _DOSBase,A6 - JSR -588(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION GetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L flags,D4 - MOVEA.L _DOSBase,A6 - JSR -906(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Info(lock : LONGINT; parameterBlock : pInfoData) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L parameterBlock,D2 - MOVEA.L _DOSBase,A6 - JSR -114(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Inhibit(const name : pCHAR; onoff : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L onoff,D2 - MOVEA.L _DOSBase,A6 - JSR -726(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION InternalLoadSeg(fh : LONGINT; table : LONGINT;const funcarray : pLONGINT; VAR stack : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D0 - MOVEA.L table,A0 - MOVEA.L funcarray,A1 - MOVEA.L stack,A2 - MOVEA.L _DOSBase,A6 - JSR -756(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION InternalUnLoadSeg(seglist : LONGINT; freefunc : tPROCEDURE) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seglist,D1 - MOVEA.L freefunc,A1 - MOVEA.L _DOSBase,A6 - JSR -762(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION IoErr : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -132(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION IsFileSystem(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -708(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION IsInteractive(file_ : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVEA.L _DOSBase,A6 - JSR -216(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION LoadSeg(const name : pCHAR) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -150(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION Lock(const name : pCHAR; type_ : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L type_,D2 - MOVEA.L _DOSBase,A6 - JSR -084(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION LockDosList(flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L flags,D1 - MOVEA.L _DOSBase,A6 - JSR -654(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION LockRecord(fh : LONGINT; offset : ULONG; length : ULONG; mode : ULONG; timeout : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L offset,D2 - MOVE.L length,D3 - MOVE.L mode,D4 - MOVE.L timeout,D5 - MOVEA.L _DOSBase,A6 - JSR -270(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION LockRecords(recArray : pRecordLock; timeout : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L recArray,D1 - MOVE.L timeout,D2 - MOVEA.L _DOSBase,A6 - JSR -276(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION MakeDosEntry(const name : pCHAR; type_ : LONGINT) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L type_,D2 - MOVEA.L _DOSBase,A6 - JSR -696(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MakeLink(const name : pCHAR; dest : LONGINT; soft : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L dest,D2 - MOVE.L soft,D3 - MOVEA.L _DOSBase,A6 - JSR -444(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -PROCEDURE MatchEnd(anchor : pAnchorPath); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L anchor,D1 - MOVEA.L _DOSBase,A6 - JSR -834(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION MatchFirst(const pat : pCHAR; anchor : pAnchorPath) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L anchor,D2 - MOVEA.L _DOSBase,A6 - JSR -822(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MatchNext(anchor : pAnchorPath) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L anchor,D1 - MOVEA.L _DOSBase,A6 - JSR -828(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MatchPattern(const pat : pCHAR; str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L str,D2 - MOVEA.L _DOSBase,A6 - JSR -846(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION MatchPatternNoCase(const pat : pCHAR; str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L str,D2 - MOVEA.L _DOSBase,A6 - JSR -972(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION MaxCli : ULONG; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -552(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NameFromFH(fh : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L buffer,D2 - MOVE.L len,D3 - MOVEA.L _DOSBase,A6 - JSR -408(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVE.L buffer,D2 - MOVE.L len,D3 - MOVEA.L _DOSBase,A6 - JSR -402(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION NewLoadSeg(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -768(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NewLoadSegTagList(const file_ : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -768(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NextDosEntry(const dlist : pDosList; flags : ULONG) : pDosList; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVE.L flags,D2 - MOVEA.L _DOSBase,A6 - JSR -690(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION OpenFromLock(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -378(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParentDir(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -210(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParentOfFH(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -384(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParsePattern(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L buf,D2 - MOVE.L buflen,D3 - MOVEA.L _DOSBase,A6 - JSR -840(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ParsePatternNoCase(const pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L pat,D1 - MOVE.L buf,D2 - MOVE.L buflen,D3 - MOVEA.L _DOSBase,A6 - JSR -966(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION PathPart(const path : pCHAR) : pCHAR; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L path,D1 - MOVEA.L _DOSBase,A6 - JSR -876(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION PrintFault(code : LONGINT;const header : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L code,D1 - MOVE.L header,D2 - MOVEA.L _DOSBase,A6 - JSR -474(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION PutStr(const str : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L str,D1 - MOVEA.L _DOSBase,A6 - JSR -948(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION ReadArgs(const arg_template : pCHAR; arra : pLONGINT; args : pRDArgs) : pRDArgs; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L arg_template,D1 - MOVE.L arra,D2 - MOVE.L args,D3 - MOVEA.L _DOSBase,A6 - JSR -798(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ReadItem(const name : pCHAR; maxchars : LONGINT; cSource : pCSource) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L maxchars,D2 - MOVE.L cSource,D3 - MOVEA.L _DOSBase,A6 - JSR -810(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : pCHAR; buffer : pCHAR; size : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L port,D1 - MOVE.L lock,D2 - MOVE.L path,D3 - MOVE.L buffer,D4 - MOVE.L size,D5 - MOVEA.L _DOSBase,A6 - JSR -438(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION Relabel(const drive : pCHAR;const newname : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L drive,D1 - MOVE.L newname,D2 - MOVEA.L _DOSBase,A6 - JSR -720(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION RemAssignList(const name : pCHAR; lock : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L lock,D2 - MOVEA.L _DOSBase,A6 - JSR -636(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION RemDosEntry(dlist : pDosList) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dlist,D1 - MOVEA.L _DOSBase,A6 - JSR -672(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION RemSegment(seg : pSegment) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seg,D1 - MOVEA.L _DOSBase,A6 - JSR -786(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -PROCEDURE ReplyPkt(dp : pDosPacket; res1 : LONGINT; res2 : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dp,D1 - MOVE.L res1,D2 - MOVE.L res2,D3 - MOVEA.L _DOSBase,A6 - JSR -258(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : pCHAR; paramlen : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seg,D1 - MOVE.L stack,D2 - MOVE.L paramptr,D3 - MOVE.L paramlen,D4 - MOVEA.L _DOSBase,A6 - JSR -504(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SameDevice(lock1 : LONGINT; lock2 : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock1,D1 - MOVE.L lock2,D2 - MOVEA.L _DOSBase,A6 - JSR -984(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SameLock(lock1 : LONGINT; lock2 : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock1,D1 - MOVE.L lock2,D2 - MOVEA.L _DOSBase,A6 - JSR -420(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SelectInput(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -294(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SelectOutput(fh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVEA.L _DOSBase,A6 - JSR -300(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE SendPkt(dp : pDosPacket; port : pMsgPort; replyport : pMsgPort); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L dp,D1 - MOVE.L port,D2 - MOVE.L replyport,D3 - MOVEA.L _DOSBase,A6 - JSR -246(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION SetArgStr(const string_ : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L string_,D1 - MOVEA.L _DOSBase,A6 - JSR -540(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetComment(const name : pCHAR;const comment : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L comment,D2 - MOVEA.L _DOSBase,A6 - JSR -180(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetConsoleTask(const task : pMsgPort) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L task,D1 - MOVEA.L _DOSBase,A6 - JSR -516(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetCurrentDirName(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -558(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetFileDate(const name : pCHAR; date : pDateStamp) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L date,D2 - MOVEA.L _DOSBase,A6 - JSR -396(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetFileSize(fh : LONGINT; pos : LONGINT; mode : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L pos,D2 - MOVE.L mode,D3 - MOVEA.L _DOSBase,A6 - JSR -456(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetFileSysTask(const task : pMsgPort) : pMsgPort; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L task,D1 - MOVEA.L _DOSBase,A6 - JSR -528(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetIoErr(result : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L result,D1 - MOVEA.L _DOSBase,A6 - JSR -462(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetMode(fh : LONGINT; mode : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L mode,D2 - MOVEA.L _DOSBase,A6 - JSR -426(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetOwner(const name : pCHAR; owner_info : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L owner_info,D2 - MOVEA.L _DOSBase,A6 - JSR -996(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetProgramDir(lock : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -594(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SetProgramName(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -570(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetPrompt(const name : pCHAR) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVEA.L _DOSBase,A6 - JSR -582(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetProtection(const name : pCHAR; protect : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L protect,D2 - MOVEA.L _DOSBase,A6 - JSR -186(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L buffer,D2 - MOVE.L size,D3 - MOVE.L flags,D4 - MOVEA.L _DOSBase,A6 - JSR -900(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L buff,D2 - MOVE.L type_,D3 - MOVE.L size,D4 - MOVEA.L _DOSBase,A6 - JSR -366(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L name,D1 - MOVE.L seperator,D2 - MOVE.L buf,D3 - MOVE.L oldpos,D4 - MOVE.L size,D5 - MOVEA.L _DOSBase,A6 - JSR -414(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L notify,D1 - MOVEA.L _DOSBase,A6 - JSR -888(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L datetime,D1 - MOVEA.L _DOSBase,A6 - JSR -750(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION StrToLong(const string_ : pCHAR; VAR value : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L string_,D1 - MOVE.L value,D2 - MOVEA.L _DOSBase,A6 - JSR -816(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION SystemTagList(const command : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L command,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -606(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DOSSystem(const command : pCHAR;const tags : pTagItem) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L command,D1 - MOVE.L tags,D2 - MOVEA.L _DOSBase,A6 - JSR -606(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION UnGetC(fh : LONGINT; character : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L character,D2 - MOVEA.L _DOSBase,A6 - JSR -318(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE UnLoadSeg(seglist : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L seglist,D1 - MOVEA.L _DOSBase,A6 - JSR -156(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnLock(lock : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L lock,D1 - MOVEA.L _DOSBase,A6 - JSR -090(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnLockDosList(flags : ULONG); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L flags,D1 - MOVEA.L _DOSBase,A6 - JSR -660(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION UnLockRecord(fh : LONGINT; offset : ULONG; length : ULONG) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L offset,D2 - MOVE.L length,D3 - MOVEA.L _DOSBase,A6 - JSR -282(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION UnLockRecords(recArray : pRecordLock) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L recArray,D1 - MOVEA.L _DOSBase,A6 - JSR -288(A6) - MOVEA.L (A7)+,A6 - TST.W D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION VFPrintf(fh : LONGINT;const format : pCHAR;const argarray : POINTER) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L format,D2 - MOVE.L argarray,D3 - MOVEA.L _DOSBase,A6 - JSR -354(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE VFWritef(fh : LONGINT;const format : pCHAR;const argarray : pLONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L fh,D1 - MOVE.L format,D2 - MOVE.L argarray,D3 - MOVEA.L _DOSBase,A6 - JSR -348(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION VPrintf(const format : pCHAR; const argarray : POINTER) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L format,D1 - MOVE.L argarray,D2 - MOVEA.L _DOSBase,A6 - JSR -954(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION WaitForChar(file_ : LONGINT; timeout : LONGINT) : BOOLEAN; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L file_,D1 - MOVE.L timeout,D2 - MOVEA.L _DOSBase,A6 - JSR -204(A6) - MOVEA.L (A7)+,A6 - TST.L D0 - BEQ.B @end - MOVEQ #1,D0 - @end: MOVE.B D0,@RESULT - END; -END; - -FUNCTION WaitPkt : pDosPacket; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L _DOSBase,A6 - JSR -252(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION WriteChars(const buf : pCHAR; buflen : ULONG) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVE.L buf,D1 - MOVE.L buflen,D2 - MOVEA.L _DOSBase,A6 - JSR -942(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - - -FUNCTION AddBuffers(const name : string; number : LONGINT) : BOOLEAN; -begin - AddBuffers := AddBuffers(pas2c(name), number); -end; - -FUNCTION AddPart(dirname : string;const filename : pCHAR; size : ULONG) : BOOLEAN; -begin - AddPart := AddPart(pas2c(dirname),filename,size); -end; - -FUNCTION AddPart(dirname : pCHAR;const filename : string; size : ULONG) : BOOLEAN; -begin - AddPart := AddPart(dirname,pas2c(filename),size); -end; - -FUNCTION AddPart(dirname : string;const filename : string; size : ULONG) : BOOLEAN; -begin - AddPart := AddPart(pas2c(dirname),pas2c(filename),size); -end; - -FUNCTION AssignAdd(const name : string; lock : LONGINT) : BOOLEAN; -begin - AssignAdd := AssignAdd(pas2c(name),lock); -end; - -FUNCTION AssignLate(const name : string;const path : pCHAR) : BOOLEAN; -begin - AssignLate := AssignLate(pas2c(name),path); -end; - -FUNCTION AssignLate(const name : pChar;const path : string) : BOOLEAN; -begin - AssignLate := AssignLate(name,pas2c(path)); -end; - -FUNCTION AssignLate(const name : string;const path : string) : BOOLEAN; -begin - AssignLate := AssignLate(pas2c(name),pas2c(path)); -end; - -FUNCTION AssignLock(const name : string; lock : LONGINT) : BOOLEAN; -begin - AssignLock := AssignLock(pas2c(name),lock); -end; - -FUNCTION AssignPath(const name : string;const path : pCHAR) : BOOLEAN; -begin - AssignPath := AssignPath(pas2c(name),path); -end; - -FUNCTION AssignPath(const name : pCHAR;const path : string) : BOOLEAN; -begin - AssignPath := AssignPath(name,pas2c(path)); -end; - -FUNCTION AssignPath(const name : string;const path : string) : BOOLEAN; -begin - AssignPath := AssignPath(pas2c(name),pas2c(path)); -end; - -FUNCTION CreateDir(const name : string) : LONGINT; -begin - CreateDir := CreateDir(pas2c(name)); -end; - -FUNCTION CreateProc(const name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort; -begin - CreateProc := CreateProc(pas2c(name),pri,segList,stackSize); -end; - -FUNCTION DeleteFile(const name : string) : BOOLEAN; -begin - DeleteFile := DeleteFile(pas2c(name)); -end; - -FUNCTION DeleteVar(const name : string; flags : ULONG) : BOOLEAN; -begin - DeleteVar := DeleteVar(pas2c(name),flags); -end; - -FUNCTION DeviceProc(const name : string) : pMsgPort; -begin - Deviceproc := DeviceProc(pas2c(name)); -end; - -FUNCTION DOSOpen(const name : string; accessMode : LONGINT) : LONGINT; -begin - DOSOpen := DOSOpen(pas2c(name),accessMode); -end; - -FUNCTION DOSRename(const oldName : string;const newName : pCHAR) : Boolean; -begin - DOSRename := DOSRename(pas2c(oldName),newName); -end; - -FUNCTION DOSRename(const oldName : pCHAR;const newName : string) : Boolean; -begin - DOSRename := DOSRename(oldName,pas2c(newName)); -end; - -FUNCTION DOSRename(const oldName : string;const newName : string) : Boolean; -begin - DOSRename := DOSRename(pas2c(oldName),pas2c(newName)); -end; - -FUNCTION Execute(const string_ : string; file_ : LONGINT; file2 : LONGINT) : BOOLEAN; -begin - Execute := Execute(pas2c(string_),file_ ,file2); -end; - -FUNCTION Fault(code : LONGINT; header : string; buffer : pCHAR; len : LONGINT) : BOOLEAN; -begin - Fault := Fault(code,pas2c(header),buffer,len); -end; - -FUNCTION FilePart(const path : string) : pCHAR; -begin - FilePart := FilePart(pas2c(path)); -end; - -FUNCTION FindArg(const keyword : string;const arg_template : pCHAR) : LONGINT; -begin - FindArg := FindArg(pas2c(keyword),arg_template); -end; - -FUNCTION FindArg(const keyword : pCHAR;const arg_template : string) : LONGINT; -begin - FindArg := FindArg(keyword,pas2c(arg_template)); -end; - -FUNCTION FindArg(const keyword : string;const arg_template : string) : LONGINT; -begin - FindArg := FindArg(pas2c(keyword),pas2c(arg_template)); -end; - -FUNCTION FindDosEntry(const dlist : pDosList;const name : string; flags : ULONG) : pDosList; -begin - FindDosEntry := FindDosEntry(dlist,pas2c(name),flags); -end; - -FUNCTION FindSegment(const name : string;const seg : pSegment; system : LONGINT) : pSegment; -begin - FindSegment := FindSegment(pas2c(name),seg,system); -end; - -FUNCTION FindVar(const name : string; type_ : ULONG) : pLocalVar; -begin - FindVar := FindVar(pas2c(name),type_); -end; - -FUNCTION Format(const filesystem : string;const volumename : pCHAR; dostype : ULONG) : BOOLEAN; -begin - Format := Format(pas2c(filesystem),volumename,dostype); -end; - -FUNCTION Format(const filesystem : pCHAR;const volumename : string; dostype : ULONG) : BOOLEAN; -begin - Format := Format(filesystem,pas2c(volumename),dostype); -end; - -FUNCTION Format(const filesystem : string;const volumename : string; dostype : ULONG) : BOOLEAN; -begin - Format := Format(pas2c(filesystem),pas2c(volumename),dostype); -end; - -FUNCTION FPuts(fh : LONGINT;const str : string) : BOOLEAN; -begin - FPuts := FPuts(fh,pas2c(str)); -end; - -FUNCTION GetDeviceProc(const name : string; dp : pDevProc) : pDevProc; -begin - GetDeviceProc := GetDeviceProc(pas2c(name),dp); -end; - -FUNCTION GetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT; -begin - GetVar := GetVar(pas2c(name),buffer,size,flags); -end; - -FUNCTION Inhibit(const name : string; onoff : LONGINT) : BOOLEAN; -begin - Inhibit := Inhibit(pas2c(name),onoff); -end; - -FUNCTION IsFileSystem(const name : string) : BOOLEAN; -begin - IsFileSystem := IsFileSystem(pas2c(name)); -end; - -FUNCTION LoadSeg(const name : string) : LONGINT; -begin - LoadSeg := LoadSeg(pas2c(name)); -end; - -FUNCTION Lock(const name : string; type_ : LONGINT) : LONGINT; -begin - Lock := Lock(pas2c(name),type_); -end; - -FUNCTION MakeDosEntry(const name : string; type_ : LONGINT) : pDosList; -begin - MakeDosEntry := MakeDosEntry(pas2c(name),type_); -end; - -FUNCTION MakeLink(const name : string; dest : LONGINT; soft : LONGINT) : BOOLEAN; -begin - MakeLink := MakeLink(pas2c(name),dest,soft); -end; - -FUNCTION MatchFirst(const pat : string; anchor : pAnchorPath) : LONGINT; -begin - MatchFirst := MatchFirst(pas2c(pat),anchor); -end; - -FUNCTION MatchPattern(const pat : string; str : pCHAR) : BOOLEAN; -begin - MatchPattern := MatchPattern(pas2c(pat),str); -end; - -FUNCTION MatchPattern(const pat : pCHAR; str : string) : BOOLEAN; -begin - MatchPattern := MatchPattern(pat,pas2c(str)); -end; - -FUNCTION MatchPattern(const pat : string; str : string) : BOOLEAN; -begin - MatchPattern := MatchPattern(pas2c(pat),pas2c(str)); -end; - -FUNCTION MatchPatternNoCase(const pat : string; str : pCHAR) : BOOLEAN; -begin - MatchPatternNoCase := MatchPatternNoCase(pas2c(pat),str); -end; - -FUNCTION MatchPatternNoCase(const pat : pCHAR; str : string) : BOOLEAN; -begin - MatchPatternNoCase := MatchPatternNoCase(pat,pas2c(str)); -end; - -FUNCTION MatchPatternNoCase(const pat : string; str : string) : BOOLEAN; -begin - MatchPatternNoCase := MatchPatternNoCase(pas2c(pat),pas2c(str)); -end; - -FUNCTION NewLoadSeg(const file_ : string;const tags : pTagItem) : LONGINT; -begin - NewLoadSeg := NewLoadSeg(pas2c(file_),tags); -end; - -FUNCTION NewLoadSegTagList(const file_ : string;const tags : pTagItem) : LONGINT; -begin - NewLoadSegTagList := NewLoadSegTagList(pas2c(file_),tags); -end; - -FUNCTION PathPart(const path : string) : pCHAR; -begin - PathPart := PathPart(pas2c(path)); -end; - -FUNCTION PrintFault(code : LONGINT;const header : string) : BOOLEAN; -begin - PrintFault := PrintFault(code,pas2c(header)); -end; - -FUNCTION PutStr(const str : string) : BOOLEAN; -begin - PutStr := PutStr(pas2c(str)); -end; - -FUNCTION ReadArgs(const arg_template : string; arra : pLONGINT; args : pRDArgs) : pRDArgs; -begin - ReadArgs := ReadArgs(pas2c(arg_template),arra,args); -end; - -FUNCTION ReadItem(const name : string; maxchars : LONGINT; cSource : pCSource) : LONGINT; -begin - ReadItem := ReadItem(pas2c(name),maxchars,cSource); -end; - -FUNCTION ReadLink(port : pMsgPort; lock : LONGINT;const path : string; buffer : pCHAR; size : ULONG) : BOOLEAN; -begin - ReadLink := ReadLink(port,lock,pas2c(path),buffer,size); -end; - -FUNCTION Relabel(const drive : string;const newname : pCHAR) : BOOLEAN; -begin - Relabel := Relabel(pas2c(drive),newname); -end; - -FUNCTION Relabel(const drive : pCHAR;const newname : string) : BOOLEAN; -begin - Relabel := Relabel(drive,pas2c(newname)); -end; - -FUNCTION Relabel(const drive : string;const newname : string) : BOOLEAN; -begin - Relabel := Relabel(pas2c(drive),pas2c(newname)); -end; - -FUNCTION RemAssignList(const name : string; lock : LONGINT) : BOOLEAN; -begin - RemAssignList := RemAssignList(pas2c(name),lock); -end; - -FUNCTION RunCommand(seg : LONGINT; stack : LONGINT;const paramptr : string; paramlen : LONGINT) : LONGINT; -begin - RunCommand := RunCommand(seg,stack,pas2c(paramptr),paramlen); -end; - -FUNCTION SetArgStr(const string_ : string) : BOOLEAN; -begin - SetArgStr := SetArgStr(pas2c(string_)); -end; - -FUNCTION SetComment(const name : string;const comment : pCHAR) : BOOLEAN; -begin - SetComment := SetComment(pas2c(name),comment); -end; - -FUNCTION SetComment(const name : pCHAR;const comment : string) : BOOLEAN; -begin - SetComment := SetComment(name,pas2c(comment)); -end; - -FUNCTION SetComment(const name : string;const comment : string) : BOOLEAN; -begin - SetComment := SetComment(pas2c(name),pas2c(comment)); -end; - -FUNCTION SetCurrentDirName(const name : string) : BOOLEAN; -begin - SetCurrentDirName := SetCurrentDirName(pas2c(name)); -end; - -FUNCTION SetFileDate(const name : string; date : pDateStamp) : BOOLEAN; -begin - SetFileDate := SetFileDate(pas2c(name),date); -end; - -FUNCTION SetOwner(const name : string; owner_info : LONGINT) : BOOLEAN; -begin - SetOwner := SetOwner(pas2c(name),owner_info); -end; - -FUNCTION SetProgramName(const name : string) : BOOLEAN; -begin - SetProgramName := SetProgramName(pas2c(name)); -end; - -FUNCTION SetPrompt(const name : string) : BOOLEAN; -begin - SetPrompt := SetPrompt(pas2c(name)); -end; - -FUNCTION SetProtection(const name : string; protect : LONGINT) : BOOLEAN; -begin - SetProtection := SetProtection(pas2c(name),protect); -end; - -FUNCTION SetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN; -begin - SetVar := SetVar(pas2c(name),buffer,size,flags); -end; - -FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint; -begin - SplitName := SplitName(pas2c(name), seperator,buf,oldpos,size); -end; - -FUNCTION StrToLong(const string_ : string; VAR value : LONGINT) : LONGINT; -begin - StrToLong := StrToLong(pas2c(string_),value); -end; - -FUNCTION SystemTagList(const command : string;const tags : pTagItem) : LONGINT; -begin - SystemTagList := SystemTagList(pas2c(command),tags); -end; - -FUNCTION DOSSystem(const command : string;const tags : pTagItem) : LONGINT; -begin - DOSSystem := DOSSystem(pas2c(command),tags); -end; -} - -FUNCTION Cli : pCommandLineInterface; -type - TLocalCall = function(LibBase: Pointer): pCommandLineInterface; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 82)); - Cli := Call(AOS_DOSBase); -end; - -PROCEDURE UnLock(lock : LONGINT); -type - TLocalCall = procedure(lock : LONGINT; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 15)); - Call(lock, AOS_DOSBase); -end; - -FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN; -type - TLocalCall = function(lock : LONGINT; buffer : pCHAR; len : LONGINT; LibBase: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 67)); - NameFromLock := Call(lock, buffer, len, AOS_DOSBase); -end; - -PROCEDURE DOSDelay(timeout : LONGINT); -type - TLocalCall = procedure(timeout : LONGINT; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_DOSBase, 33)); - Call(timeout, AOS_DOSBase); -end; - - -END. (* UNIT DOS *) - - diff --git a/packages/arosunits/src/asl.pas b/packages/arosunits/src/asl.pas index 6d7756819a..51508f57d1 100644 --- a/packages/arosunits/src/asl.pas +++ b/packages/arosunits/src/asl.pas @@ -572,7 +572,7 @@ IMPLEMENTATION FUNCTION AllocAslRequestA(reqType : ULONG; tagList : pTagItem) : POINTER; type - TLocalCall = function(reqType : ULONG; tagList : pTagItem; Base: Pointer): POINTER; stdcall; + TLocalCall = function(reqType : ULONG; tagList : pTagItem; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -582,7 +582,7 @@ end; FUNCTION AllocFileRequest : pFileRequester; type - TLocalCall = function(Base: Pointer): pFileRequester; stdcall; + TLocalCall = function(Base: Pointer): pFileRequester; cdecl; var Call: TLocalCall; begin @@ -592,7 +592,7 @@ end; FUNCTION AslRequestA(requester : POINTER; tagList : pTagItem) : BOOLEAN; type - TLocalCall = function(requester : POINTER; tagList : pTagItem; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(requester : POINTER; tagList : pTagItem; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -602,7 +602,7 @@ end; PROCEDURE FreeAslRequest(requester : POINTER); type - TLocalCall = procedure(requester : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(requester : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -612,7 +612,7 @@ end; PROCEDURE FreeFileRequest(fileReq : pFileRequester); type - TLocalCall = procedure(fileReq : pFileRequester; Base: Pointer); stdcall; + TLocalCall = procedure(fileReq : pFileRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -622,7 +622,7 @@ end; FUNCTION RequestFile(fileReq : pFileRequester) : BOOLEAN; type - TLocalCall = function(fileReq : pFileRequester; Base: Pointer) : BOOLEAN; stdcall; + TLocalCall = function(fileReq : pFileRequester; Base: Pointer) : BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -632,7 +632,7 @@ end; PROCEDURE AbortAslRequest(requester : POINTER); type - TLocalCall = procedure(requester : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(requester : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -642,7 +642,7 @@ end; PROCEDURE ActivateAslRequest(requester : POINTER); type - TLocalCall = procedure(requester : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(requester : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/diskfont.pas b/packages/arosunits/src/diskfont.pas index 2ccbf33908..f685048a8c 100644 --- a/packages/arosunits/src/diskfont.pas +++ b/packages/arosunits/src/diskfont.pas @@ -152,7 +152,7 @@ IMPLEMENTATION function AvailFonts(buffer : pCHAR; bufBytes : LONGINT; flags : LONGINT) : LONGINT; type - TLocalCall = function(buffer : pCHAR; bufBytes : LONGINT; flags : LONGINT; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(buffer : pCHAR; bufBytes : LONGINT; flags : LONGINT; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -163,7 +163,7 @@ end; procedure DisposeFontContents(fontContentsHeader : pFontContentsHeader); type - TLocalCall = procedure(fontContentsHeader : pFontContentsHeader; Base: Pointer); stdcall; + TLocalCall = procedure(fontContentsHeader : pFontContentsHeader; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -173,7 +173,7 @@ end; function NewFontContents(fontsLock : BPTR; fontName : pCHAR) : pFontContentsHeader; type - TLocalCall = function(fontsLock : BPTR; fontName : pCHAR; Base: Pointer): pFontContentsHeader; stdcall; + TLocalCall = function(fontsLock : BPTR; fontName : pCHAR; Base: Pointer): pFontContentsHeader; cdecl; var Call: TLocalCall; begin @@ -183,7 +183,7 @@ end; function NewScaledDiskFont(sourceFont : pTextFont; destTextAttr : pTextAttr) : pDiskFontHeader; type - TLocalCall = function(sourceFont : pTextFont; destTextAttr : pTextAttr; Base: Pointer): pDiskFontHeader; stdcall; + TLocalCall = function(sourceFont : pTextFont; destTextAttr : pTextAttr; Base: Pointer): pDiskFontHeader; cdecl; var Call: TLocalCall; begin @@ -193,7 +193,7 @@ end; function OpenDiskFont(textAttr : pTextAttr) : pTextFont; type - TLocalCall = function(textAttr : pTextAttr; Base: Pointer): pTextFont; stdcall; + TLocalCall = function(textAttr : pTextAttr; Base: Pointer): pTextFont; cdecl; var Call: TLocalCall; begin @@ -203,7 +203,7 @@ end; { function GetDiskFontCtrl(tagid : LONGINT) : LONGINT; type - TLocalCall = function(tagid : LONGINT; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(tagid : LONGINT; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -213,7 +213,7 @@ end; procedure SetDiskFontCtrlA(taglist : pTagItem); type - TLocalCall = procedure(taglist : pTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(taglist : pTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/exec.pas b/packages/arosunits/src/exec.pas deleted file mode 100644 index 7b8c83b18b..0000000000 --- a/packages/arosunits/src/exec.pas +++ /dev/null @@ -1,2699 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2000 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{ - History: - Added overlay functions for Pchar->Strings, functions - and procedures. Now you can mix PChar and Strings e.g - OpenLibrary('whatis.library',37). No need to cast to - a PChar. - 12 Oct 1998. - - More missing functions added. - Added BitMask, - IsListEmpty and - IsMsgPortEmpty. - 22 Aug 2000. - - Bug found in - AllocSignal, - OpenDevice, - SetTaskPri, - WaitIO - and DoIO. - The stubs for this functions push a long for result, - the result was defined as a shortint. If you tried - to use any of those functions you get a big crash. - Just changed the result to a longint. - 06 Sep 2000. - - 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. - - Changed integer > smallint. - Retyped ULONG to longword - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se -} - - -UNIT EXEC; - - -INTERFACE - -{ - History: - - Added BOOL = smallint, some libraries need that define - (read triton, wizard) - 25 Oct 1998 - - Added UWORD, WORDBITS, LONGBITS, PLONGBITS, - UBYTE, PULONG, PAPTR, PLONG. - For use with MUI. - 17 Jul 2000. - - nils.sjoholm@mailbox.swipnet.se -} - -TYPE - - STRPTR = PChar; - ULONG = Longword; - LONG = longint; - APTR = Pointer; - BPTR = Longint; - BSTR = Longint; - BOOL = smallint; - UWORD = Word; - WORDBITS = Word; - LONGBITS = longword; - PLONGBITS = ^LONGBITS; - UBYTE = Byte; - PULONG = ^longword; - PAPTR = ^APTR; - PLONG = ^LONG; - psmallint = ^smallint; - -const - {There is a problem with boolean - vaules in taglists, just use this - for now instead} - ltrue : longint = 1; - lfalse : longint = 0; - -TYPE - -{ * List Node Structure. Each member in a list starts with a Node * } - - pNode = ^tNode; - tNode = Record - ln_Succ, { * Pointer to next (successor) * } - ln_Pred : pNode; { * Pointer to previous (predecessor) * } - ln_Name : STRPTR; { * ID string, null terminated * } - ln_Type : Byte; - ln_Pri : Shortint; { * Priority, for sorting * } - End; { * Note: smallint aligned * } - -(* BinCompat Mode? - tNode = Record - ln_Succ, { * Pointer to next (successor) * } - ln_Pred : pNode; { * Pointer to previous (predecessor) * } - ln_Type : Byte; - ln_Pri : Shortint; { * Priority, for sorting * } - ln_Name : STRPTR; { * ID string, null terminated * } - End; { * Note: smallint aligned * } -*) - -{ * minimal node -- no type checking possible * } - - pMinNode = ^tMinNode; - tMinNode = Record - mln_Succ, - mln_Pred : pMinNode; - End; - - - -{ * -** Note: Newly initialized IORequests, and software interrupt structures -** used with Cause(), should have type NT_UNKNOWN. The OS will assign a type -** when they are first used. -* } - -{ *----- Node Types for LN_TYPE -----* } - -Const - - NT_UNKNOWN = 0; - NT_TASK = 1; { * Exec task * } - NT_INTERRUPT = 2; - NT_DEVICE = 3; - NT_MSGPORT = 4; - NT_MESSAGE = 5; { * Indicates message currently pending * } - NT_FREEMSG = 6; - NT_REPLYMSG = 7; { * Message has been replied * } - NT_RESOURCE = 8; - NT_LIBRARY = 9; - NT_MEMORY = 10; - NT_SOFTINT = 11; { * Internal flag used by SoftInits * } - NT_FONT = 12; - NT_PROCESS = 13; { * AmigaDOS Process * } - NT_SEMAPHORE = 14; - NT_SIGNALSEM = 15; { * signal semaphores * } - NT_BOOTNODE = 16; - NT_KICKMEM = 17; - NT_GRAPHICS = 18; - NT_DEATHMESSAGE = 19; - - NT_USER = 254; { * User node types work down from here * } - NT_EXTENDED = 255; - -{ - This file defines Exec system lists, which are used to link - various things. Exec provides several routines to handle list - processing (defined at the bottom of this file), so you can - use these routines to save yourself the trouble of writing a list - package. -} - - -Type - -{ normal, full featured list } - - pList = ^tList; - tList = record - lh_Head : pNode; - lh_Tail : pNode; - lh_TailPred : pNode; - lh_Type : Byte; - l_pad : Byte; - end; - -{ minimum list -- no type checking possible } - - pMinList = ^tMinList; - tMinList = record - mlh_Head : pMinNode; - mlh_Tail : pMinNode; - mlh_TailPred : pMinNode; - end; - - - -{ ******************************************************************** -* -* Format of the alert error number: -* -* +-+-------------+----------------+--------------------------------+ -* |D| SubSysId | General Error | SubSystem Specific Error | -* +-+-------------+----------------+--------------------------------+ -* 1 7 bits 8 bits 16 bits -* -* D: DeadEnd alert -* SubSysId: indicates ROM subsystem number. -* General Error: roughly indicates what the error was -* Specific Error: indicates more detail -*********************************************************************} - -const -{********************************************************************* -* -* Hardware/CPU specific alerts: They may show without the 8 at the -* front of the number. These are CPU/68000 specific. See 68$0 -* programmer's manuals for more details. -* -*********************************************************************} - ACPU_BusErr = $80000002; { Hardware bus fault/access error } - ACPU_AddressErr = $80000003; { Illegal address access (ie: odd) } - ACPU_InstErr = $80000004; { Illegal instruction } - ACPU_DivZero = $80000005; { Divide by zero } - ACPU_CHK = $80000006; { Check instruction error } - ACPU_TRAPV = $80000007; { TrapV instruction error } - ACPU_PrivErr = $80000008; { Privilege violation error } - ACPU_Trace = $80000009; { Trace error } - ACPU_LineA = $8000000A; { Line 1010 Emulator error } - ACPU_LineF = $8000000B; { Line 1111 Emulator error } - ACPU_Format = $8000000E; { Stack frame format error } - ACPU_Spurious = $80000018; { Spurious interrupt error } - ACPU_AutoVec1 = $80000019; { AutoVector Level 1 interrupt error } - ACPU_AutoVec2 = $8000001A; { AutoVector Level 2 interrupt error } - ACPU_AutoVec3 = $8000001B; { AutoVector Level 3 interrupt error } - ACPU_AutoVec4 = $8000001C; { AutoVector Level 4 interrupt error } - ACPU_AutoVec5 = $8000001D; { AutoVector Level 5 interrupt error } - ACPU_AutoVec6 = $8000001E; { AutoVector Level 6 interrupt error } - ACPU_AutoVec7 = $8000001F; { AutoVector Level 7 interrupt error } - - -{ ******************************************************************** -* -* General Alerts -* -* For example: timer.device cannot open math.library would be $05038015 -* -* Alert(AN_TimerDev|AG_OpenLib|AO_MathLib); -* -********************************************************************} - - -CONST - -{ ------ alert types } - AT_DeadEnd = $80000000; - AT_Recovery = $00000000; - - -{ ------ general purpose alert codes } - AG_NoMemory = $00010000; - AG_MakeLib = $00020000; - AG_OpenLib = $00030000; - AG_OpenDev = $00040000; - AG_OpenRes = $00050000; - AG_IOError = $00060000; - AG_NoSignal = $00070000; - AG_BadParm = $00080000; - AG_CloseLib = $00090000; { usually too many closes } - AG_CloseDev = $000A0000; { or a mismatched close } - AG_ProcCreate = $000B0000; { Process creation failed } - - -{ ------ alert objects: } - AO_ExecLib = $00008001; - AO_GraphicsLib = $00008002; - AO_LayersLib = $00008003; - AO_Intuition = $00008004; - AO_MathLib = $00008005; - AO_DOSLib = $00008007; - AO_RAMLib = $00008008; - AO_IconLib = $00008009; - AO_ExpansionLib = $0000800A; - AO_DiskfontLib = $0000800B; - AO_UtilityLib = $0000800C; - AO_KeyMapLib = $0000800D; - - AO_AudioDev = $00008010; - AO_ConsoleDev = $00008011; - AO_GamePortDev = $00008012; - AO_KeyboardDev = $00008013; - AO_TrackDiskDev = $00008014; - AO_TimerDev = $00008015; - - AO_CIARsrc = $00008020; - AO_DiskRsrc = $00008021; - AO_MiscRsrc = $00008022; - - AO_BootStrap = $00008030; - AO_Workbench = $00008031; - AO_DiskCopy = $00008032; - AO_GadTools = $00008033; - AO_Unknown = $00008035; - - - -{ ******************************************************************** -* -* Specific Alerts: -* -********************************************************************} - -{ ------ exec.library } - - AN_ExecLib = $01000000; - AN_ExcptVect = $01000001; { 68000 exception vector checksum (obs.) } - AN_BaseChkSum = $01000002; { Execbase checksum (obs.) } - AN_LibChkSum = $01000003; { Library checksum failure } - - AN_MemCorrupt = $81000005; { Corrupt memory list detected in FreeMem } - AN_IntrMem = $81000006; { No memory for interrupt servers } - AN_InitAPtr = $01000007; { InitStruct() of an APTR source (obs.) } - AN_SemCorrupt = $01000008; { A semaphore is in an illegal state - at ReleaseSempahore() } - AN_FreeTwice = $01000009; { Freeing memory already freed } - AN_BogusExcpt = $8100000A; { illegal 68k exception taken (obs.) } - AN_IOUsedTwice = $0100000B; { Attempt to reuse active IORequest } - AN_MemoryInsane = $0100000C; { Sanity check on memory list failed - during AvailMem(MEMF_LARGEST) } - AN_IOAfterClose = $0100000D; { IO attempted on closed IORequest } - AN_StackProbe = $0100000E; { Stack appears to extend out of range } - AN_BadFreeAddr = $0100000F; { Memory header not located. [ Usually an - invalid address passed to FreeMem() ] } - AN_BadSemaphore = $01000010; { An attempt was made to use the old - message semaphores. } - -{ ------ graphics.library } - - AN_GraphicsLib = $02000000; - AN_GfxNoMem = $82010000; { graphics out of memory } - AN_GfxNoMemMspc = $82010001; { MonitorSpec alloc, no memory } - AN_LongFrame = $82010006; { long frame, no memory } - AN_ShortFrame = $82010007; { short frame, no memory } - AN_TextTmpRas = $02010009; { text, no memory for TmpRas } - AN_BltBitMap = $8201000A; { BltBitMap, no memory } - AN_RegionMemory = $8201000B; { regions, memory not available } - AN_MakeVPort = $82010030; { MakeVPort, no memory } - AN_GfxNewError = $0200000C; - AN_GfxFreeError = $0200000D; - - AN_GfxNoLCM = $82011234; { emergency memory not available } - - AN_ObsoleteFont = $02000401; { unsupported font description used } - -{ ------ layers.library } - - AN_LayersLib = $03000000; - AN_LayersNoMem = $83010000; { layers out of memory } - -{ ------ intuition.library } - AN_Intuition = $04000000; - AN_GadgetType = $84000001; { unknown gadget type } - AN_BadGadget = $04000001; { Recovery form of AN_GadgetType } - AN_CreatePort = $84010002; { create port, no memory } - AN_ItemAlloc = $04010003; { item plane alloc, no memory } - AN_SubAlloc = $04010004; { sub alloc, no memory } - AN_PlaneAlloc = $84010005; { plane alloc, no memory } - AN_ItemBoxTop = $84000006; { item box top < RelZero } - AN_OpenScreen = $84010007; { open screen, no memory } - AN_OpenScrnRast = $84010008; { open screen, raster alloc, no memory } - AN_SysScrnType = $84000009; { open sys screen, unknown type } - AN_AddSWGadget = $8401000A; { add SW gadgets, no memory } - AN_OpenWindow = $8401000B; { open window, no memory } - AN_BadState = $8400000C; { Bad State Return entering Intuition } - AN_BadMessage = $8400000D; { Bad Message received by IDCMP } - AN_WeirdEcho = $8400000E; { Weird echo causing incomprehension } - AN_NoConsole = $8400000F; { couldn't open the Console Device } - AN_NoISem = $04000010; { Intuition skipped obtaining a sem } - AN_ISemOrder = $04000011; { Intuition obtained a sem in bad order } - -{ ------ math.library } - - AN_MathLib = $05000000; - -{ ------ dos.library } - - AN_DOSLib = $07000000; - AN_StartMem = $07010001; { no memory at startup } - AN_EndTask = $07000002; { EndTask didn't } - AN_QPktFail = $07000003; { Qpkt failure } - AN_AsyncPkt = $07000004; { Unexpected packet received } - AN_FreeVec = $07000005; { Freevec failed } - AN_DiskBlkSeq = $07000006; { Disk block sequence error } - AN_BitMap = $07000007; { Bitmap corrupt } - AN_KeyFree = $07000008; { Key already free } - AN_BadChkSum = $07000009; { Invalid checksum } - AN_DiskError = $0700000A; { Disk Error } - AN_KeyRange = $0700000B; { Key out of range } - AN_BadOverlay = $0700000C; { Bad overlay } - AN_BadInitFunc = $0700000D; { Invalid init packet for cli/shell } - AN_FileReclosed = $0700000E; { A filehandle was closed more than once } - -{ ------ ramlib.library } - - AN_RAMLib = $08000000; - AN_BadSegList = $08000001; { no overlays in library seglists } - -{ ------ icon.library } - - AN_IconLib = $09000000; - -{ ------ expansion.library } - - AN_ExpansionLib = $0A000000; - AN_BadExpansionFree = $0A000001; { freeed free region } - -{ ------ diskfont.library } - - AN_DiskfontLib = $0B000000; - -{ ------ audio.device } - - AN_AudioDev = $10000000; - -{ ------ console.device } - - AN_ConsoleDev = $11000000; - AN_NoWindow = $11000001; { Console can't open initial window } - -{ ------ gameport.device } - - AN_GamePortDev = $12000000; - -{ ------ keyboard.device } - - AN_KeyboardDev = $13000000; - -{ ------ trackdisk.device } - - AN_TrackDiskDev = $14000000; - AN_TDCalibSeek = $14000001; { calibrate: seek error } - AN_TDDelay = $14000002; { delay: error on timer wait } - -{ ------ timer.device } - - AN_TimerDev = $15000000; - AN_TMBadReq = $15000001; { bad request } - AN_TMBadSupply = $15000002; { power supply -- no 50/60Hz ticks } - -{ ------ cia.resource } - - AN_CIARsrc = $20000000; - -{ ------ disk.resource } - - AN_DiskRsrc = $21000000; - AN_DRHasDisk = $21000001; { get unit: already has disk } - AN_DRIntNoAct = $21000002; { interrupt: no active unit } - -{ ------ misc.resource } - - AN_MiscRsrc = $22000000; - -{ ------ bootstrap } - - AN_BootStrap = $30000000; - AN_BootError = $30000001; { boot code returned an error } - -{ ------ Workbench } - - AN_Workbench = $31000000; - AN_NoFonts = $B1000001; - AN_WBBadStartupMsg1 = $31000001; - AN_WBBadStartupMsg2 = $31000002; - AN_WBBadIOMsg = $31000003; - - AN_WBReLayoutToolMenu = $B1010009; - -{ ------ DiskCopy } - - AN_DiskCopy = $32000000; - -{ ------ toolkit for Intuition } - - AN_GadTools = $33000000; - -{ ------ System utility library } - - AN_UtilityLib = $34000000; - -{ ------ For use by any application that needs it } - - AN_Unknown = $35000000; - - - -CONST - - IOERR_OPENFAIL = -1; { device/unit failed to open } - IOERR_ABORTED = -2; { request terminated early [after AbortIO()] } - IOERR_NOCMD = -3; { command not supported by device } - IOERR_BADLENGTH = -4; { not a valid length (usually IO_LENGTH) } - IOERR_BADADDRESS = -5; { invalid address (misaligned or bad range) } - IOERR_UNITBUSY = -6; { device opens ok, but requested unit is busy } - IOERR_SELFTEST = -7; { hardware failed self-test } - - - -type - pResident = ^tResident; - tResident = record - rt_MatchWord : Word; { smallint to match on (ILLEGAL) } - rt_MatchTag : pResident; { pointer to the above } - rt_EndSkip : Pointer; { address to continue scan } - rt_Flags : Byte; { various tag flags } - rt_Version : Byte; { release version number } - rt_Type : Byte; { type of module (NT_mumble) } - rt_Pri : Shortint; { initialization priority } - rt_Name : STRPTR; { pointer to node name } - rt_IdString : STRPTR; { pointer to ident string } - rt_Init : Pointer; { pointer to init code } - end; - -const - - - RTC_MATCHWORD = $4AFC; - - RTF_AUTOINIT = $80; - RTF_AFTERDOS = $04; - RTF_SINGLETASK = $02; - RTF_COLDSTART = $01; - - -{ Compatibility: } - - RTM_WHEN = $03; - RTW_COLDSTART = $01; - RTW_NEVER = $00; - - - -TYPE - -{ ****** MemChunk **************************************************** } - - pMemChunk = ^tMemChunk; - tMemChunk = Record - mc_Next : pMemChunk; { * pointer to next chunk * } - mc_Bytes : ULONG; { * chunk byte size * } - End; - - -{ ****** MemHeader *************************************************** } - - pMemHeader = ^tMemHeader; - tMemHeader = Record - mh_Node : tNode; - mh_Attributes : Word; { * characteristics of this region * } - mh_First : pMemChunk; { * first free region * } - mh_Lower, { * lower memory bound * } - mh_Upper : Pointer; { * upper memory bound+1 * } - mh_Free : Ulong; { * total number of free bytes * } - End; - - -{ ****** MemEntry **************************************************** } - - pMemEntry = ^tMemEntry; - tMemEntry = record - me_Un : record - case longint of - 0 : ( meu_Reqs : ULONG ); - 1 : ( meu_Addr : APTR ); - end; - me_Length : ULONG; - end; - -{ ****** MemList ***************************************************** } - -{ * Note: sizeof(struct MemList) includes the size of the first MemEntry! * } - - pMemList = ^tMemList; - tMemList = Record - ml_Node : tNode; - ml_NumEntries : Word; { * number of entries in this struct * } - ml_ME : Array [0..0] of tMemEntry; { * the first entry * } - End; - -{ *----- Memory Requirement Types ---------------------------* } -{ *----- See the AllocMem() documentation for details--------* } - -Const - - MEMF_ANY = %000000000000000000000000; { * Any type of memory will do * } - MEMF_PUBLIC = %000000000000000000000001; - MEMF_CHIP = %000000000000000000000010; - MEMF_FAST = %000000000000000000000100; - MEMF_LOCAL = %000000000000000100000000; - MEMF_24BITDMA = %000000000000001000000000; { * DMAable memory within 24 bits of address * } - MEMF_KICK = %000000000000010000000000; { Memory that can be used for KickTags } - - MEMF_CLEAR = %000000010000000000000000; - MEMF_LARGEST = %000000100000000000000000; - MEMF_REVERSE = %000001000000000000000000; - MEMF_TOTAL = %000010000000000000000000; { * AvailMem: return total size of memory * } - MEMF_NO_EXPUNGE = $80000000; {AllocMem: Do not cause expunge on failure } - - MEM_BLOCKSIZE = 8; - MEM_BLOCKMASK = MEM_BLOCKSIZE-1; - -Type -{***** MemHandlerData *********************************************} -{ Note: This structure is *READ ONLY* and only EXEC can create it!} - - pMemHandlerData = ^tMemHandlerData; - tMemHandlerData = Record - memh_RequestSize, { Requested allocation size } - memh_RequestFlags, { Requested allocation flags } - memh_Flags : ULONG; { Flags (see below) } - end; - -const - MEMHF_RECYCLE = 1; { 0==First time, 1==recycle } - -{***** Low Memory handler return values **************************} - MEM_DID_NOTHING = 0; { Nothing we could do... } - MEM_ALL_DONE = -1; { We did all we could do } - MEM_TRY_AGAIN = 1; { We did some, try the allocation again } - - -type - pInterrupt = ^tInterrupt; - tInterrupt = record - is_Node : tNode; - is_Data : Pointer; { Server data segment } - is_Code : Pointer; { Server code entry } - end; - - pIntVector = ^tIntVector; - tIntVector = record { For EXEC use ONLY! } - iv_Data : Pointer; - iv_Code : Pointer; - iv_Node : pNode; - end; - - pSoftIntList = ^tSoftIntList; - tSoftIntList = record { For EXEC use ONLY! } - sh_List : tList; - sh_Pad : Word; - end; - -const - SIH_PRIMASK = $F0; - -{ this is a fake INT definition, used only for AddIntServer and the like } - - INTB_NMI = 15; - INTF_NMI = $0080; - -{ - Every Amiga Task has one of these Task structures associated with it. - To find yours, use FindTask(Nil). AmigaDOS processes tack a few more - values on to the end of this structure, which is the difference between - Tasks and Processes. -} - -type - - pTask = ^tTask; - tTask = record - tc_Node : tNode; - tc_Flags : Byte; - tc_State : Byte; - tc_IDNestCnt : Shortint; { intr disabled nesting } - tc_TDNestCnt : Shortint; { task disabled nesting } - tc_SigAlloc : ULONG; { sigs allocated } - tc_SigWait : ULONG; { sigs we are waiting for } - tc_SigRecvd : ULONG; { sigs we have received } - tc_SigExcept : ULONG; { sigs we will take excepts for } - tc_TrapAlloc : Word; { traps allocated } - tc_TrapAble : Word; { traps enabled } - tc_ExceptData : Pointer; { points to except data } - tc_ExceptCode : Pointer; { points to except code } - tc_TrapData : Pointer; { points to trap data } - tc_TrapCode : Pointer; { points to trap code } - tc_SPReg : Pointer; { stack pointer } - tc_SPLower : Pointer; { stack lower bound } - tc_SPUpper : Pointer; { stack upper bound + 2 } - tc_Switch : Pointer; { task losing CPU } - tc_Launch : Pointer; { task getting CPU } - tc_MemEntry : tList; { allocated memory } - tc_UserData : Pointer; { per task data } - end; - -{ - * Stack swap structure as passed to StackSwap() - } - pStackSwapStruct = ^tStackSwapStruct; - tStackSwapStruct = Record - stk_Lower : Pointer; { Lowest byte of stack } - stk_Upper : ULONG; { Upper end of stack (size + Lowest) } - stk_Pointer : Pointer; { Stack pointer at switch point } - end; - - - -{----- Flag Bits ------------------------------------------} - -const - - TB_PROCTIME = 0; - TB_ETASK = 3; - TB_STACKCHK = 4; - TB_EXCEPT = 5; - TB_SWITCH = 6; - TB_LAUNCH = 7; - - TF_PROCTIME = 1; - TF_ETASK = 8; - TF_STACKCHK = 16; - TF_EXCEPT = 32; - TF_SWITCH = 64; - TF_LAUNCH = 128; - -{----- Task States ----------------------------------------} - - TS_INVALID = 0; - TS_ADDED = 1; - TS_RUN = 2; - TS_READY = 3; - TS_WAIT = 4; - TS_EXCEPT = 5; - TS_REMOVED = 6; - -{----- Predefined Signals -------------------------------------} - - SIGB_ABORT = 0; - SIGB_CHILD = 1; - SIGB_BLIT = 4; - SIGB_SINGLE = 4; - SIGB_INTUITION = 5; - SIGB_DOS = 8; - - SIGF_ABORT = 1; - SIGF_CHILD = 2; - SIGF_BLIT = 16; - SIGF_SINGLE = 16; - SIGF_INTUITION = 32; - SIGF_DOS = 256; - - - -{ - This file defines ports and messages, which are used for inter- - task communications using the routines defined toward the - bottom of this file. -} - -type - -{****** MsgPort *****************************************************} - - pMsgPort = ^tMsgPort; - tMsgPort = record - mp_Node : tNode; - mp_Flags : Byte; - mp_SigBit : Byte; { signal bit number } - mp_SigTask : Pointer; { task to be signalled (TaskPtr) } - mp_MsgList : tList; { message linked list } - end; - -{****** Message *****************************************************} - - pMessage = ^tMessage; - tMessage = record - mn_Node : tNode; - mn_ReplyPort : pMsgPort; { message reply port } - mn_Length : Word; { message len in bytes } - end; - - - -{ mp_Flags: Port arrival actions (PutMsg) } - -CONST - - PF_ACTION = 3; { * Mask * } - PA_SIGNAL = 0; { * Signal task in mp_SigTask * } - PA_SOFTINT = 1; { * Signal SoftInt in mp_SoftInt/mp_SigTask * } - PA_IGNORE = 2; { * Ignore arrival * } - - - { Semaphore } -type - pSemaphore = ^tSemaphore; - tSemaphore = record - sm_MsgPort : tMsgPort; - sm_Bids : smallint; - end; - -{ This is the structure used to request a signal semaphore } - - pSemaphoreRequest = ^tSemaphoreRequest; - tSemaphoreRequest = record - sr_Link : tMinNode; - sr_Waiter : pTask; - end; - -{ The actual semaphore itself } - - pSignalSemaphore = ^tSignalSemaphore; - tSignalSemaphore = record - ss_Link : tNode; - ss_NestCount : smallint; - ss_WaitQueue : tMinList; - ss_MultipleLink : tSemaphoreRequest; - ss_Owner : pTask; - ss_QueueCount : smallint; - end; - - -{ ***** Semaphore procure message (for use in V39 Procure/Vacate *** } - - - pSemaphoreMessage = ^tSemaphoreMessage; - tSemaphoreMessage = Record - ssm_Message : tMessage; - ssm_Semaphore : pSignalSemaphore; - end; - -const - SM_SHARED = 1; - SM_EXCLUSIVE = 0; - - -CONST - -{ ------ Special Constants --------------------------------------- } - LIB_VECTSIZE = 6; { Each library entry takes 6 bytes } - LIB_RESERVED = 4; { Exec reserves the first 4 vectors } - LIB_BASE = (-LIB_VECTSIZE); - LIB_USERDEF = (LIB_BASE-(LIB_RESERVED*LIB_VECTSIZE)); - LIB_NONSTD = (LIB_USERDEF); - -{ ------ Standard Functions -------------------------------------- } - LIB_OPEN = -6; - LIB_CLOSE = -12; - LIB_EXPUNGE = -18; - LIB_EXTFUNC = -24; { for future expansion } - -TYPE - -{ ------ Library Base Structure ---------------------------------- } -{ Also used for Devices and some Resources } - - pLibrary = ^tLibrary; - tLibrary = record - lib_Node : tNode; - lib_Flags, - lib_pad : Byte; - lib_NegSize, { number of bytes before library } - lib_PosSize, { number of bytes after library } - lib_Version, { major } - lib_Revision : Word; { minor } - lib_IdString : STRPTR; { ASCII identification } - lib_Sum : ULONG; { the checksum itself } - lib_OpenCnt : Word; { number of current opens } - end; { * Warning: size is not a longword multiple ! * } - -CONST - -{ lib_Flags bit definitions (all others are system reserved) } - - LIBF_SUMMING = %00000001; { we are currently checksumming } - LIBF_CHANGED = %00000010; { we have just changed the lib } - LIBF_SUMUSED = %00000100; { set if we should bother to sum } - LIBF_DELEXP = %00001000; { delayed expunge } - -{ - This file defines the constants and types required to use - Amiga device IO routines, which are also defined here. -} - - -TYPE - -{***** Device *****************************************************} - pDevice = ^tDevice; - tDevice = record - dd_Library : tLibrary; - end; - -{***** Unit *******************************************************} - pUnit = ^tUnit; - tUnit = record - unit_MsgPort : tMsgPort; { queue for unprocessed messages } - { instance of msgport is recommended } - unit_flags, - unit_pad : Byte; - unit_OpenCnt : Word; { number of active opens } - end; - -Const - UNITF_ACTIVE = %00000001; - UNITF_INTASK = %00000010; - -type - - pIORequest = ^tIORequest; - tIORequest = record - io_Message : tMessage; - io_Device : pDevice; { device node pointer } - io_Unit : pUnit; { unit (driver private)} - io_Command : Word; { device command } - io_Flags : Byte; - io_Error : Shortint; { error or warning num } - end; - - pIOStdReq = ^tIOStdReq; - tIOStdReq = record - io_Message : tMessage; - io_Device : pDevice; { device node pointer } - io_Unit : pUnit; { unit (driver private)} - io_Command : Word; { device command } - io_Flags : Byte; - io_Error : Shortint; { error or warning num } - io_Actual : ULONG; { actual number of bytes transferred } - io_Length : ULONG; { requested number bytes transferred} - io_Data : Pointer; { points to data area } - io_Offset : ULONG; { offset for block structured devices } - end; - - -{ library vector offsets for device reserved vectors } - -const - DEV_BEGINIO = -30; - DEV_ABORTIO = -36; - -{ io_Flags defined bits } - - IOB_QUICK = 0; - IOF_QUICK = 1; - - CMD_INVALID = 0; - CMD_RESET = 1; - CMD_READ = 2; - CMD_WRITE = 3; - CMD_UPDATE = 4; - CMD_CLEAR = 5; - CMD_STOP = 6; - CMD_START = 7; - CMD_FLUSH = 8; - - CMD_NONSTD = 9; - - - - -{ Definition of the Exec library base structure (pointed to by location 4). -** Most fields are not to be viewed or modified by user programs. Use -** extreme caution. - } - -type - -pExecBase = ^tExecBase; -tExecBase = Record - LibNode : tLibrary; { Standard library node } - -{ ******* Static System Variables ******* } - - SoftVer : Word; { kickstart release number (obs.) } - LowMemChkSum : smallint; { checksum of 68000 trap vectors } - ChkBase : ULONG; { system base pointer complement } - ColdCapture, { coldstart soft capture vector } - CoolCapture, { coolstart soft capture vector } - WarmCapture, { warmstart soft capture vector } - SysStkUpper, { system stack base (upper bound) } - SysStkLower : Pointer; { top of system stack (lower bound) } - MaxLocMem : ULONG; { top of chip memory } - DebugEntry, { global debugger entry point } - DebugData, { global debugger data segment } - AlertData, { alert data segment } - MaxExtMem : Pointer; { top of extended mem, or null if none } - - ChkSum : Word; { for all of the above (minus 2) } - -{ ***** Interrupt Related ************************************** } - - IntVects : Array[0..15] of tIntVector; - -{ ***** Dynamic System Variables ************************************ } - - ThisTask : pTask; { pointer to current task (readable) } - - IdleCount, { idle counter } - DispCount : ULONG; { dispatch counter } - Quantum, { time slice quantum } - Elapsed, { current quantum ticks } - SysFlags : Word; { misc internal system flags } - IDNestCnt, { interrupt disable nesting count } - TDNestCnt : Shortint; { task disable nesting count } - - AttnFlags, { special attention flags (readable) } - AttnResched : Word; { rescheduling attention } - ResModules, { resident module array pointer } - TaskTrapCode, - TaskExceptCode, - TaskExitCode : Pointer; - TaskSigAlloc : ULONG; - TaskTrapAlloc: Word; - - -{ ***** System Lists (private!) ******************************* } - - MemList, - ResourceList, - DeviceList, - IntrList, - LibList, - PortList, - TaskReady, - TaskWait : tList; - - SoftInts : Array[0..4] of tSoftIntList; - -{ ***** Other Globals ****************************************** } - - LastAlert : Array[0..3] of LONG; - - { these next two variables are provided to allow - ** system developers to have a rough idea of the - ** period of two externally controlled signals -- - ** the time between vertical blank interrupts and the - ** external line rate (which is counted by CIA A's - ** "time of day" clock). In general these values - ** will be 50 or 60, and may or may not track each - ** other. These values replace the obsolete AFB_PAL - ** and AFB_50HZ flags. - } - - VBlankFrequency, { (readable) } - PowerSupplyFrequency : Byte; { (readable) } - - SemaphoreList : tList; - - { these next two are to be able to kickstart into user ram. - ** KickMemPtr holds a singly linked list of MemLists which - ** will be removed from the memory list via AllocAbs. If - ** all the AllocAbs's succeeded, then the KickTagPtr will - ** be added to the rom tag list. - } - - KickMemPtr, { ptr to queue of mem lists } - KickTagPtr, { ptr to rom tag queue } - KickCheckSum : Pointer; { checksum for mem and tags } - -{ ***** V36 Exec additions start here ************************************* } - - ex_Pad0 : Word; - ex_Reserved0 : ULONG; - ex_RamLibPrivate : Pointer; - - { The next ULONG contains the system "E" clock frequency, - ** expressed in Hertz. The E clock is used as a timebase for - ** the Amiga's 8520 I/O chips. (E is connected to "02"). - ** Typical values are 715909 for NTSC, or 709379 for PAL. - } - - ex_EClockFrequency, { (readable) } - ex_CacheControl, { Private to CacheControl calls } - ex_TaskID : ULONG; { Next available task ID } - - ex_Reserved1 : Array[0..4] of ULONG; - - ex_MMULock : Pointer; { private } - - ex_Reserved2 : Array[0..2] of ULONG; -{***** V39 Exec additions start here *************************************} - - { The following list and data element are used - * for V39 exec's low memory handler... - } - ex_MemHandlers : tMinList; { The handler list } - ex_MemHandler : Pointer; { Private! handler pointer } -end; - - -{ ***** Bit defines for AttnFlags (see above) ***************************** } - -{ Processors and Co-processors: } - -CONST - - AFB_68010 = 0; { also set for 68020 } - AFB_68020 = 1; { also set for 68030 } - AFB_68030 = 2; { also set for 68040 } - AFB_68040 = 3; - 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; - AFF_68030 = %00000100; - AFF_68040 = %00001000; - AFF_68881 = %00010000; - AFF_68882 = %00100000; - AFF_FPU40 = %01000000; - AFF_68060 = (1 shl 7); - -{ AFB_RESERVED8 = %000100000000; } -{ AFB_RESERVED9 = %001000000000; } - - -{ ***** Selected flag definitions for Cache manipulation calls ********* } - - CACRF_EnableI = %0000000000000001; { Enable instruction cache } - CACRF_FreezeI = %0000000000000010; { Freeze instruction cache } - CACRF_ClearI = %0000000000001000; { Clear instruction cache } - CACRF_IBE = %0000000000010000; { Instruction burst enable } - CACRF_EnableD = %0000000100000000; { 68030 Enable data cache } - CACRF_FreezeD = %0000001000000000; { 68030 Freeze data cache } - CACRF_ClearD = %0000100000000000; { 68030 Clear data cache } - CACRF_DBE = %0001000000000000; { 68030 Data burst enable } - CACRF_WriteAllocate = %0010000000000000; { 68030 Write-Allocate mode - (must always be set!) } - CACRF_EnableE = 1073741824; { Master enable for external caches } - { External caches should track the } - { state of the internal caches } - { such that they do not cache anything } - { that the internal cache turned off } - { for. } - - CACRF_CopyBack = $80000000; { Master enable for copyback caches } - - DMA_Continue = 2; { Continuation flag for CachePreDMA } - DMA_NoModify = 4; { Set if DMA does not update memory } - 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; - - - -function AbortIO(ioRequest : pIORequest): LongInt; -PROCEDURE AddDevice(device : pDevice); -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 AddPort(port : pMsgPort); -PROCEDURE AddResource(resource : POINTER); -PROCEDURE AddSemaphore(sigSem : pSignalSemaphore); -PROCEDURE AddTail(list : pList; node : pNode); -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; -FUNCTION AllocEntry(entry : pMemList) : pMemList; -FUNCTION AllocMem(byteSize : ULONG; requirements : ULONG) : POINTER; -FUNCTION AllocPooled(poolHeader : POINTER; memSize : ULONG) : POINTER; -FUNCTION AllocSignal(signalNum : LONGINT) : shortint; -FUNCTION AllocTrap(trapNum : LONGINT) : LONGINT; -FUNCTION AllocVec(byteSize : ULONG; requirements : ULONG) : POINTER; -FUNCTION AttemptSemaphore(sigSem : pSignalSemaphore) : BOOLEAN; -FUNCTION AttemptSemaphoreShared(sigSem : pSignalSemaphore) : ULONG; -FUNCTION AvailMem(requirements : ULONG) : ULONG; -PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG); -PROCEDURE CacheClearU; -FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG; -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); -PROCEDURE ChildOrphan(tid : POINTER); -PROCEDURE ChildStatus(tid : POINTER); -PROCEDURE ChildWait(tid : POINTER); -PROCEDURE CloseDevice(ioRequest : pIORequest); -PROCEDURE CloseLibrary(lib : pLibrary); -PROCEDURE ColdReboot; -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; -PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG); -PROCEDURE Debug(flags : ULONG); -PROCEDURE DeleteIORequest(iorequest : POINTER); -PROCEDURE DeleteMsgPort(port : pMsgPort); -PROCEDURE DeletePool(poolHeader : POINTER); -PROCEDURE Disable; -FUNCTION DoIO(ioRequest : pIORequest) : shortint; -PROCEDURE Enable; -PROCEDURE Enqueue(list : pList; node : pNode); -PROCEDURE ExecFreeMem(memoryBlock : POINTER; byteSize : ULONG); -PROCEDURE ExecInsert(list : pList; node : pNode; pred : pNode); -FUNCTION FindName(list : pList; const name : pCHAR) : pNode; -FUNCTION FindPort(const name : pCHAR) : pMsgPort; -FUNCTION FindResident(const name : pCHAR) : pResident; -FUNCTION FindSemaphore(const sigSem : pCHAR) : pSignalSemaphore; -FUNCTION FindTask(const name : pCHAR) : pTask; -PROCEDURE Forbid; -PROCEDURE FreeEntry(entry : pMemList); -PROCEDURE FreePooled(poolHeader : POINTER; memory : POINTER; memSize : ULONG); -PROCEDURE FreeSignal(signalNum : LONGINT); -PROCEDURE FreeTrap(trapNum : LONGINT); -PROCEDURE FreeVec(memoryBlock : POINTER); -FUNCTION GetCC : ULONG; -FUNCTION GetMsg(port : pMsgPort) : pMessage; -PROCEDURE InitCode(startClass : ULONG; version : ULONG); -FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER; -PROCEDURE InitSemaphore(sigSem : pSignalSemaphore); -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 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); -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); -FUNCTION RemHead(list : pList) : pNode; -PROCEDURE RemIntServer(intNumber : LONGINT; interrupt_ : pInterrupt); -PROCEDURE RemLibrary(lib : pLibrary); -PROCEDURE RemMemHandler(memhand : pInterrupt); -PROCEDURE Remove(node : pNode); -PROCEDURE RemPort(port : pMsgPort); -PROCEDURE RemResource(resource : POINTER); -PROCEDURE RemSemaphore(sigSem : pSignalSemaphore); -FUNCTION RemTail(list : pList) : pNode; -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;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; -PROCEDURE Signal(task : pTask; signalSet : ULONG); -PROCEDURE StackSwap(newStack : pStackSwapStruct); -PROCEDURE SumKickData; -PROCEDURE SumLibrary(lib : pLibrary); -FUNCTION SuperState : POINTER; -FUNCTION Supervisor(userFunction : tPROCEDURE) : 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; -{ -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); -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 OpenLibrary(const libName : String; version : ULONG) : pLibrary; -FUNCTION OpenResource(const resName : String) : POINTER; -function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc :tPROCEDURE; putChData : POINTER): pointer; -} -function BitMask(no :shortint): longint; -function IsListEmpty( list : pList): boolean; -function IsMsgPortEmpty( mp : pMsgPort): boolean; - -IMPLEMENTATION - -uses pastoc; - -function BitMask(no :shortint): longint; -begin - BitMask := 1 shl no; -end; - -function IsListEmpty( list : pList): boolean; -begin - IsListEmpty := list^.lh_TailPred = pnode(list); -end; - -function IsMsgPortEmpty(mp: pMsgPort): boolean; -begin - with mp^ do - IsMsgPortEmpty := mp_MsgList.lh_TailPred = pNode(@mp_MsgList); -end; - -function AbortIO(ioRequest: pIORequest): LongInt; -type - TLocalCall = function(ioRequest : pIORequest; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 80)); - AbortIO := Call(ioRequest, AOS_ExecBase); -end; - -procedure AddDevice(device: pDevice); -type - TLocalCall = procedure(device: pDevice; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 72)); - Call(device, AOS_ExecBase); -end; - -procedure AddHead(list: pList; node: pNode); -type - TLocalCall = procedure(list : pList; node : pNode; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 40)); - Call(list, node, AOS_ExecBase); -end; - -procedure AddIntServer(intNumber: LONGINT; interrupt_: pInterrupt); -type - TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 28)); - Call(intNumber, interrupt_, AOS_ExecBase); -end; - -procedure AddLibrary(lib: pLibrary); -type - TLocalCall = procedure(lib: pLibrary; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 66)); - Call(lib, AOS_ExecBase); -end; - -procedure AddMemHandler(memhand: pInterrupt); -type - TLocalCall = procedure(memhand: pInterrupt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 129)); - Call(memhand, AOS_ExecBase); -end; - -procedure AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR); -type - TLocalCall = procedure(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 103)); - Call(size, attributes, pri, base, name, AOS_ExecBase); -end; - -PROCEDURE AddPort(port : pMsgPort); -type - TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 59)); - Call(port, AOS_ExecBase); -end; - -PROCEDURE AddResource(resource : POINTER); -type - TLocalCall = procedure(resource : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 81)); - Call(resource, AOS_ExecBase); -end; - -PROCEDURE AddSemaphore(sigSem : pSignalSemaphore); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 100)); - Call(sigSem, AOS_ExecBase); -end; - -PROCEDURE AddTail(list : pList; node : pNode); -type - TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 41)); - Call(list, node, AOS_ExecBase); -end; - -FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER; -type - TLocalCall = function(task : pTask;const initPC : POINTER;const finalPC : POINTER; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 47)); - AddTask := Call(task, initPC, finalPC, AOS_ExecBase); -end; - -PROCEDURE Alert(alertNum : ULONG); -type - TLocalCall = procedure(alertNum : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 18)); - Call(alertNum, AOS_ExecBase); -end; - -FUNCTION AllocAbs(byteSize : ULONG; location : POINTER) : POINTER; -type - TLocalCall = FUNCTION(byteSize : ULONG; location : POINTER; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 34)); - AllocAbs := Call(byteSize, location, AOS_ExecBase); -end; - -FUNCTION Allocate(freeList : pMemHeader; byteSize : ULONG) : POINTER; -type - TLocalCall = function(freeList : pMemHeader; byteSize : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 31)); - Allocate := Call(freeList, byteSize, AOS_ExecBase); -end; - -FUNCTION AllocEntry(entry : pMemList) : pMemList; -type - TLocalCall = function(entry : pMemList; LibBase: Pointer): pMemList; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 37)); - AllocEntry := Call(entry, AOS_ExecBase); -end; - -FUNCTION AllocMem(byteSize : ULONG; requirements : ULONG) : POINTER; -type - TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 33)); - AllocMem := Call(byteSize, requirements, AOS_ExecBase); -end; - -FUNCTION AllocPooled(poolHeader : POINTER; memSize : ULONG) : POINTER; -type - TLocalCall = function(poolHeader : POINTER; memSize : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 118)); - AllocPooled := Call(poolHeader, memSize, AOS_ExecBase); -end; - -FUNCTION AllocSignal(signalNum : LONGINT) : shortint; -type - TLocalCall = function(signalNum : LONGINT; LibBase: Pointer): shortint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 55)); - AllocSignal := Call(signalNum, AOS_ExecBase); -end; - -FUNCTION AllocTrap(trapNum : LONGINT) : LONGINT; -type - TLocalCall = function(trapNum : LONGINT; LibBase: Pointer): LONGINT; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 57)); - AllocTrap := Call(trapNum, AOS_ExecBase); -end; - -FUNCTION AllocVec(byteSize : ULONG; requirements : ULONG) : POINTER; -type - TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 114)); - AllocVec := Call(byteSize, requirements, AOS_ExecBase); -end; - -FUNCTION AttemptSemaphore(sigSem : pSignalSemaphore) : BOOLEAN; -type - TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 96)); - AttemptSemaphore := Call(sigSem, AOS_ExecBase); -end; - -FUNCTION AttemptSemaphoreShared(sigSem : pSignalSemaphore) : ULONG; -type - TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 120)); - AttemptSemaphoreShared := Call(sigSem, AOS_ExecBase); -end; - -FUNCTION AvailMem(requirements : ULONG) : ULONG; -type - TLocalCall = function(requirements : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 36)); - AvailMem := Call(requirements, AOS_ExecBase); -end; - -PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG); -type - TLocalCall = procedure(address : POINTER; length : ULONG; caches : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 107)); - Call(address, length, caches, AOS_ExecBase); -end; - -PROCEDURE CacheClearU; -type - TLocalCall = procedure(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 106)); - Call(AOS_ExecBase); -end; - -FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG; -type - TLocalCall = function(cacheBits : ULONG; cacheMask : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 108)); - CacheControl := Call(cacheBits, cacheMask, AOS_ExecBase); -end; - -PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG); -type - TLocalCall = procedure(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 128)); - Call(address, length, flags, AOS_ExecBase); -end; - -FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER; -type - TLocalCall = function(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 127)); - CachePreDMA := Call(address, length, flags, AOS_ExecBase); -end; - -PROCEDURE Cause(interrupt_ : pInterrupt); -type - TLocalCall = procedure(interrupt_ : pInterrupt; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 30)); - Call(interrupt_, AOS_ExecBase); -end; - -FUNCTION CheckIO(ioRequest : pIORequest) : pIORequest; -type - TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): pIORequest; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 78)); - CheckIO := Call(ioRequest, AOS_ExecBase); -end; - -PROCEDURE ChildFree(tid : POINTER); -type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 123)); - Call(tid, AOS_ExecBase); -end; - -PROCEDURE ChildOrphan(tid : POINTER); -type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 124)); - Call(tid, AOS_ExecBase); -end; - -PROCEDURE ChildStatus(tid : POINTER); -type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 125)); - Call(tid, AOS_ExecBase); -end; - -PROCEDURE ChildWait(tid : POINTER); -type - TLocalCall = procedure(tid : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 126)); - Call(tid, AOS_ExecBase); -end; - -PROCEDURE CloseDevice(ioRequest : pIORequest); -type - TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 75)); - Call(ioRequest, AOS_ExecBase); -end; - -PROCEDURE CloseLibrary(lib : pLibrary); -type - TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 69)); - Call(lib, AOS_ExecBase); -end; - -PROCEDURE ColdReboot; -type - TLocalCall = procedure(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 121)); - Call(AOS_ExecBase); -end; - -PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG); -type - TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 104)); - Call(source, dest, size, AOS_ExecBase); -end; - -PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG); -type - TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 105)); - Call(source, dest, size, AOS_ExecBase); -end; - -FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER; -type - TLocalCall = function(const port : pMsgPort; size : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 109)); - CreateIORequest := Call(port, size, AOS_ExecBase); -end; - -FUNCTION CreateMsgPort : pMsgPort; -type - TLocalCall = function(LibBase: Pointer): pMsgPort; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 111)); - CreateMsgPort := Call(AOS_ExecBase); -end; - -FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : -POINTER; -type - TLocalCall = function(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 116)); - CreatePool := Call(requirements, puddleSize, threshSize, AOS_ExecBase); -end; - -PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG); -type - TLocalCall = procedure(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 32)); - Call(freeList, memoryBlock, byteSize, AOS_ExecBase); -end; - -PROCEDURE Debug(flags : ULONG); -type - TLocalCall = procedure(flags : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 19)); - Call(flags, AOS_ExecBase); -end; - -PROCEDURE DeleteIORequest(iorequest : POINTER); -type - TLocalCall = procedure(iorequest : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 110)); - Call(iorequest, AOS_ExecBase); -end; - -PROCEDURE DeleteMsgPort(port : pMsgPort); -type - TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 112)); - Call(port, AOS_ExecBase); -end; - -PROCEDURE DeletePool(poolHeader : POINTER); -type - TLocalCall = procedure(poolHeader : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 117)); - Call(poolHeader, AOS_ExecBase); -end; - -PROCEDURE Disable; -type - TLocalCall = procedure(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 20)); - Call(AOS_ExecBase); -end; - -FUNCTION DoIO(ioRequest : pIORequest) : shortint; -type - TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 76)); - DoIO := Call(ioRequest, AOS_ExecBase); -end; - -PROCEDURE Enable; -type - TLocalCall = procedure(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 21)); - Call(AOS_ExecBase); -end; - -PROCEDURE Enqueue(list : pList; node : pNode); -type - TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 45)); - Call(list, node, AOS_ExecBase); -end; - -PROCEDURE ExecFreeMem(memoryBlock : POINTER; byteSize : ULONG); -type - TLocalCall = procedure(memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 35)); - Call(memoryBlock, byteSize, AOS_ExecBase); -end; - -PROCEDURE ExecInsert(list : pList; node : pNode; pred : pNode); -type - TLocalCall = procedure(list : pList; node : pNode; pred : pNode; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 39)); - Call(list, node, pred, AOS_ExecBase); -end; - -FUNCTION FindName(list : pList; const name : pCHAR) : pNode; -type - TLocalCall = function(list : pList; const name : pCHAR; LibBase: Pointer): pNode; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 46)); - FindName := Call(list, name, AOS_ExecBase); -end; - -FUNCTION FindPort(const name : pCHAR) : pMsgPort; -type - TLocalCall = function(const name : pCHAR; LibBase: Pointer): pMsgPort; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 65)); - FindPort := Call(name, AOS_ExecBase); -end; - -FUNCTION FindResident(const name : pCHAR) : pResident; -type - TLocalCall = function(const name : pCHAR; LibBase: Pointer): pResident; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 16)); - FindResident := Call(name, AOS_ExecBase); -end; - -FUNCTION FindSemaphore(const sigSem : pCHAR) : pSignalSemaphore; -type - TLocalCall = function(const sigSem : pCHAR; LibBase: Pointer): pSignalSemaphore; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 99)); - FindSemaphore := Call(sigSem, AOS_ExecBase); -end; - -FUNCTION FindTask(const name : pCHAR) : pTask; -type - TLocalCall = function(const name : pCHAR; LibBase: Pointer): pTask; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 49)); - FindTask := Call(name, AOS_ExecBase); -end; - -PROCEDURE Forbid; -type - TLocalCall = procedure(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 22)); - Call(AOS_ExecBase); -end; - -PROCEDURE FreeEntry(entry : pMemList); -type - TLocalCall = procedure(entry : pMemList; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 38)); - Call(entry, AOS_ExecBase); -end; - -PROCEDURE FreePooled(poolHeader : POINTER; memory : POINTER; memSize : ULONG); -type - TLocalCall = procedure(poolHeader : POINTER; memory : POINTER; memSize : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 119)); - Call(poolHeader, memory, memSize, AOS_ExecBase); -end; - -PROCEDURE FreeSignal(signalNum : LONGINT); -type - TLocalCall = procedure(signalNum : LONGINT; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 56)); - Call(signalNum, AOS_ExecBase); -end; - -PROCEDURE FreeTrap(trapNum : LONGINT); -type - TLocalCall = procedure(trapNum : LONGINT; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 58)); - Call(trapNum, AOS_ExecBase); -end; - -PROCEDURE FreeVec(memoryBlock : POINTER); -type - TLocalCall = procedure(memoryBlock : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 115)); - Call(memoryBlock, AOS_ExecBase); -end; - -FUNCTION GetCC : ULONG; -type - TLocalCall = function(LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 88)); - GetCC := Call(AOS_ExecBase); -end; - -FUNCTION GetMsg(port : pMsgPort) : pMessage; -type - TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 62)); - GetMsg := Call(port, AOS_ExecBase); -end; - -PROCEDURE InitCode(startClass : ULONG; version : ULONG); -type - TLocalCall = procedure(startClass : ULONG; version : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 12)); - Call(startClass, version, AOS_ExecBase); -end; - -FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER; -type - TLocalCall = function(const resident_ : pResident; segList : ULONG; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 17)); - InitResident := Call(resident_, segList, AOS_ExecBase); -end; - -PROCEDURE InitSemaphore(sigSem : pSignalSemaphore); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 93)); - Call(sigSem, AOS_ExecBase); -end; - -PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG); -type - TLocalCall = procedure(const initTable : POINTER; memory : POINTER; size : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 13)); - Call(initTable, memory, size, AOS_ExecBase); -end; - -PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer); -type - TLocalCall = procedure(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 15)); - Call(target, functionArray, funcDispBase, AOS_ExecBase); -end; - -FUNCTION MakeLibrary(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG) : pLibrary; -type - TLocalCall = function(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG; LibBase: Pointer): pLibrary; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 14)); - MakeLibrary := Call(funcInit, structInit, libInit, dataSize, segList, AOS_ExecBase); -end; - -FUNCTION ObtainQuickVector(interruptCode : POINTER) : ULONG; -type - TLocalCall = function(interruptCode : POINTER; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 131)); - ObtainQuickVector := Call(interruptCode, AOS_ExecBase); -end; - -PROCEDURE ObtainSemaphore(sigSem : pSignalSemaphore); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 94)); - Call(sigSem, AOS_ExecBase); -end; - -PROCEDURE ObtainSemaphoreList(sigSem : pList); -type - TLocalCall = procedure(sigSem : pList; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 97)); - Call(sigSem, AOS_ExecBase); -end; - -PROCEDURE ObtainSemaphoreShared(sigSem : pSignalSemaphore); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 113)); - Call(sigSem, AOS_ExecBase); -end; - -FUNCTION OldOpenLibrary(const libName : pCHAR) : pLibrary; -type - TLocalCall = function(const libName : pCHAR; LibBase: Pointer): pLibrary; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 68)); - OldOpenLibrary := Call(libName, AOS_ExecBase); -end; - -FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; -flags : ULONG) : shortint; -type - TLocalCall = function(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG; LibBase: Pointer): shortint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 74)); - OpenDevice := Call(devName, unite, ioRequest, flags, AOS_ExecBase); -end; - -FUNCTION OpenLibrary(const libName : pCHAR; version : ULONG) : pLibrary; -type - TLocalCall = function(const libName : pCHAR; version : ULONG; LibBase: Pointer): pLibrary; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 92)); - OpenLibrary := Call(libName, version, AOS_ExecBase); -end; - -FUNCTION OpenResource(const resName : pCHAR) : POINTER; -type - TLocalCall = function(const resName : pCHAR; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 83)); - OpenResource := Call(resName, AOS_ExecBase); -end; - -PROCEDURE Permit; -type - TLocalCall = PROCEDURE(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 23)); - Call(AOS_ExecBase); -end; - -FUNCTION Procure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage) : BOOLEAN; -type - TLocalCall = function(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer): BOOLEAN; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 90)); - Procure := Call(sigSem, bidMsg, AOS_ExecBase); -end; - -PROCEDURE PutMsg(port : pMsgPort; message : pMessage); -type - TLocalCall = PROCEDURE(port : pMsgPort; message : pMessage; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 61)); - Call(port, message, AOS_ExecBase); -end; - -function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; -type - TLocalCall = function(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER; LibBase: Pointer): pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 87)); - RawDoFmt := Call(formatString, dataStream, putChProc, putChData, AOS_ExecBase); -end; - -PROCEDURE ReleaseSemaphore(sigSem : pSignalSemaphore); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 95)); - Call(sigSem, AOS_ExecBase); -end; - -PROCEDURE ReleaseSemaphoreList(sigSem : pList); -type - TLocalCall = procedure(sigSem : pList; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 98)); - Call(sigSem, AOS_ExecBase); -end; - -PROCEDURE RemDevice(device : pDevice); -type - TLocalCall = PROCEDURE(device : pDevice; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 73)); - Call(device, AOS_ExecBase); -end; - -FUNCTION RemHead(list : pList) : pNode; -type - TLocalCall = function(list : pList; LibBase: Pointer): pNode; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 43)); - RemHead := Call(list, AOS_ExecBase); -end; - -PROCEDURE RemIntServer(intNumber : LONGINT; interrupt_ : pInterrupt); -type - TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 29)); - Call(intNumber, interrupt_, AOS_ExecBase); -end; - -PROCEDURE RemLibrary(lib : pLibrary); -type - TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 67)); - Call(lib, AOS_ExecBase); -end; - -PROCEDURE RemMemHandler(memhand : pInterrupt); -type - TLocalCall = procedure(memhand : pInterrupt; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 130)); - Call(memhand, AOS_ExecBase); -end; - -PROCEDURE Remove(node : pNode); -type - TLocalCall = procedure(node : pNode; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 42)); - Call(node, AOS_ExecBase); -end; - -PROCEDURE RemPort(port : pMsgPort); -type - TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 60)); - Call(port, AOS_ExecBase); -end; - -PROCEDURE RemResource(resource : POINTER); -type - TLocalCall = procedure(resource : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 82)); - Call(resource, AOS_ExecBase); -end; - -PROCEDURE RemSemaphore(sigSem : pSignalSemaphore); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 101)); - Call(sigSem, AOS_ExecBase); -end; - -FUNCTION RemTail(list : pList) : pNode; -type - TLocalCall = function(list : pList; LibBase: Pointer): pNode; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 44)); - RemTail := Call(list, AOS_ExecBase); -end; - -PROCEDURE RemTask(task : pTask); -type - TLocalCall = procedure(task : pTask; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 48)); - Call(task, AOS_ExecBase); -end; - -PROCEDURE ReplyMsg(message : pMessage); -type - TLocalCall = procedure(message : pMessage; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 63)); - Call(message, AOS_ExecBase); -end; - -PROCEDURE SendIO(ioRequest : pIORequest); -type - TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 77)); - Call(ioRequest, AOS_ExecBase); -end; - -FUNCTION SetExcept(newSignals : ULONG; signalSet : ULONG) : ULONG; -type - TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 52)); - SetExcept := Call(newSignals, signalSet, AOS_ExecBase); -end; - -FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : POINTER; -type - TLocalCall = function(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE; LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 70)); - SetFunction := Call(lib, funcOffset, newFunction, AOS_ExecBase); -end; - -FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt; -type - TLocalCall = function(intNumber : LONGINT;const interrupt_ : pInterrupt; LibBase: Pointer): pInterrupt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 27)); - SetIntVector := Call(intNumber, interrupt_, AOS_ExecBase); -end; - -FUNCTION SetSignal(newSignals : ULONG; signalSet : ULONG) : ULONG; -type - TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 51)); - SetSignal := Call(newSignals, signalSet, AOS_ExecBase); -end; - -FUNCTION SetSR(newSR : ULONG; mask : ULONG) : ULONG; -type - TLocalCall = function(newSR : ULONG; mask : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 24)); - SetSR := Call(newSR, mask, AOS_ExecBase); -end; - -FUNCTION SetTaskPri(task : pTask; priority : LONGINT) : shortint; -type - TLocalCall = function(task : pTask; priority : LONGINT; LibBase: Pointer): shortint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 50)); - SetTaskPri := Call(task, priority, AOS_ExecBase); -end; - -PROCEDURE Signal(task : pTask; signalSet : ULONG); -type - TLocalCall = procedure(task : pTask; signalSet : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 54)); - Call(task, signalSet, AOS_ExecBase); -end; - -PROCEDURE StackSwap(newStack : pStackSwapStruct); -type - TLocalCall = procedure(newStack : pStackSwapStruct; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 122)); - Call(newStack, AOS_ExecBase); -end; - -PROCEDURE SumKickData; -type - TLocalCall = procedure(LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 102)); - Call(AOS_ExecBase); -end; - -PROCEDURE SumLibrary(lib : pLibrary); -type - TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 71)); - Call(lib, AOS_ExecBase); -end; - -FUNCTION SuperState : POINTER; -type - TLocalCall = function(LibBase: Pointer): POINTER; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 25)); - SuperState := Call(AOS_ExecBase); -end; - -FUNCTION Supervisor(userFunction : tPROCEDURE) : ULONG; -type - TLocalCall = function(userFunction : tPROCEDURE; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 5)); - Supervisor := Call(userFunction, AOS_ExecBase); -end; - -FUNCTION TypeOfMem(const address : POINTER) : ULONG; -type - TLocalCall = function(const address : POINTER; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 89)); - TypeOfMem := Call(address, AOS_ExecBase); -end; - -PROCEDURE UserState(sysStack : POINTER); -type - TLocalCall = procedure(sysStack : POINTER; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 26)); - Call(sysStack, AOS_ExecBase); -end; - -PROCEDURE Vacate(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage); -type - TLocalCall = procedure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 91)); - Call(sigSem, bidMsg, AOS_ExecBase); -end; - -FUNCTION Wait(signalSet : ULONG) : ULONG; -type - TLocalCall = function(signalSet : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 53)); - Wait := Call(signalSet, AOS_ExecBase); -end; - -FUNCTION WaitIO(ioRequest : pIORequest) : shortint; -type - TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 79)); - WaitIO := Call(ioRequest, AOS_ExecBase); -end; - -FUNCTION WaitPort(port : pMsgPort) : pMessage; -type - TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, 64)); - WaitPort := Call(port, AOS_ExecBase); -end; -{ -PROCEDURE NewMinList(minlist : pMinList); -type - TLocalCall = procedure(; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Call(, AOS_ExecBase); -end; - -FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; - -FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode; -type - TLocalCall = function(; LibBase: Pointer): ; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); - Result := Call(, AOS_ExecBase); -end; -} - -{PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : String); -BEGIN - AddMemList(size,attributes,pri,base,pas2c(name)); -END; -FUNCTION FindName(list : pList; const name : String) : pNode; -BEGIN - FindName := FindName(list,pas2c(name)); -END; -FUNCTION FindPort(const name : String) : pMsgPort; -BEGIN - FindPort := FindPort(pas2c(name)); -END; -FUNCTION FindResident(const name : String) : pResident; -BEGIN - FindResident := FindResident(pas2c(name)); -END; -FUNCTION FindSemaphore(const sigSem : String) : pSignalSemaphore; -BEGIN - FindSemaphore := FindSemaphore(pas2c(sigSem)); -END; -FUNCTION FindTask(const name : String) : pTask; -BEGIN - FindTask := FindTask(pas2c(name)); -END; -FUNCTION OldOpenLibrary(const libName : String) : pLibrary; -BEGIN - OldOpenLibrary := OldOpenLibrary(pas2c(libName)); -END; -FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest; -flags : ULONG) : shortint; -BEGIN - OpenDevice := OpenDevice(pas2c(devName),unite,ioRequest,flags); -END; -FUNCTION OpenLibrary(const libName : String; version : ULONG) : pLibrary; -BEGIN - OpenLibrary := OpenLibrary(pas2c(libName),version); -END; -FUNCTION OpenResource(const resName : String) : POINTER; -BEGIN - OpenResource := OpenResource(pas2c(resName)); -END; -function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; -BEGIN - RawDoFmt := RawDoFmt(pas2c(formatString),dataStream,putChProc,putChData); -END;} - -END. (* UNIT EXEC *) - - - - - diff --git a/packages/arosunits/src/gadtools.pas b/packages/arosunits/src/gadtools.pas index f2a57596b7..be8b680500 100644 --- a/packages/arosunits/src/gadtools.pas +++ b/packages/arosunits/src/gadtools.pas @@ -755,7 +755,7 @@ END; } FUNCTION CreateContext(glistptr : pGadget): pGadget; type - TLocalCall = function(glistptr : pGadget; Base: Pointer): pGadget; stdcall; + TLocalCall = function(glistptr : pGadget; Base: Pointer): pGadget; cdecl; var Call: TLocalCall; begin @@ -765,7 +765,7 @@ end; FUNCTION CreateGadgetA(kind : ULONG; gad : pGadget;const ng : pNewGadget;const taglist : pTagItem) : pGadget; type - TLocalCall = function(kind : ULONG; gad : pGadget;const ng : pNewGadget;const taglist : pTagItem; Base: Pointer): pGadget; stdcall; + TLocalCall = function(kind : ULONG; gad : pGadget;const ng : pNewGadget;const taglist : pTagItem; Base: Pointer): pGadget; cdecl; var Call: TLocalCall; begin @@ -776,7 +776,7 @@ end; PROCEDURE FreeGadgets(gad : pGadget); type - TLocalCall = procedure(gad : pGadget; Base: Pointer); stdcall; + TLocalCall = procedure(gad : pGadget; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -786,7 +786,7 @@ end; PROCEDURE GT_RefreshWindow(win : pWindow; req : pRequester); type - TLocalCall = procedure(win : pWindow; req : pRequester; Base: Pointer); stdcall; + TLocalCall = procedure(win : pWindow; req : pRequester; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -796,7 +796,7 @@ end; FUNCTION GetVisualInfoA(screen : pScreen;const taglist : pTagItem) : POINTER; type - TLocalCall = function(screen : pScreen;const taglist : pTagItem; Base: Pointer): POINTER; stdcall; + TLocalCall = function(screen : pScreen;const taglist : pTagItem; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -806,7 +806,7 @@ end; PROCEDURE FreeVisualInfo(vi : POINTER); type - TLocalCall = procedure(vi : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(vi : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -816,7 +816,7 @@ end; FUNCTION GT_GetGadgetAttrsA(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem) : LONGINT; type - TLocalCall = function(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -826,7 +826,7 @@ end; PROCEDURE GT_SetGadgetAttrsA(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem); type - TLocalCall = procedure(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer); stdcall; + TLocalCall = procedure(gad : pGadget; win : pWindow; req : pRequester;const taglist : pTagItem; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/inputevent.pas b/packages/arosunits/src/inputevent.pas deleted file mode 100644 index 4334950e05..0000000000 --- a/packages/arosunits/src/inputevent.pas +++ /dev/null @@ -1,285 +0,0 @@ -{ - 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 - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -unit inputevent; - -INTERFACE - -uses exec, utility, timer; - -const - -{------ constants -------------------------------------------------} - -{ --- InputEvent.ie_Class --- } -{ A NOP input event } - IECLASS_NULL = $00; -{ A raw keycode from the keyboard device } - IECLASS_RAWKEY = $01; -{ The raw mouse report from the game port device } - IECLASS_RAWMOUSE = $02; -{ A private console event } - IECLASS_EVENT = $03; -{ A Pointer Position report } - IECLASS_POINTERPOS = $04; -{ A timer event } - IECLASS_TIMER = $06; -{ select button pressed down over a Gadget (address in ie_EventAddress) } - IECLASS_GADGETDOWN = $07; -{ select button released over the same Gadget (address in ie_EventAddress) } - IECLASS_GADGETUP = $08; -{ some Requester activity has taken place. See Codes REQCLEAR and REQSET } - IECLASS_REQUESTER = $09; -{ this is a Menu Number transmission (Menu number is in ie_Code) } - IECLASS_MENULIST = $0A; -{ User has selected the active Window's Close Gadget } - IECLASS_CLOSEWINDOW = $0B; -{ this Window has a new size } - IECLASS_SIZEWINDOW = $0C; -{ the Window pointed to by ie_EventAddress needs to be refreshed } - IECLASS_REFRESHWINDOW = $0D; -{ new preferences are available } - IECLASS_NEWPREFS = $0E; -{ the disk has been removed } - IECLASS_DISKREMOVED = $0F; -{ the disk has been inserted } - IECLASS_DISKINSERTED = $10; -{ the window is about to be been made active } - IECLASS_ACTIVEWINDOW = $11; -{ the window is about to be made inactive } - IECLASS_INACTIVEWINDOW = $12; -{ extended-function pointer position report (V36) } - IECLASS_NEWPOINTERPOS = $13; -{ Help key report during Menu session (V36) } - IECLASS_MENUHELP = $14; -{ the Window has been modified with move, size, zoom, or change (V36) } - IECLASS_CHANGEWINDOW = $15; - - - -{ the last class } - - IECLASS_MAX = $15; - -{ --- InputEvent.ie_SubClass --- } -{ IECLASS_NEWPOINTERPOS } -{ like IECLASS_POINTERPOS } - IESUBCLASS_COMPATIBLE = $00; -{ ie_EventAddress points to struct IEPointerPixel } - IESUBCLASS_PIXEL = $01; -{ ie_EventAddress points to struct IEPointerTablet } - IESUBCLASS_TABLET = $02; - -{ pointed to by ie_EventAddress for IECLASS_NEWPOINTERPOS, - * and IESUBCLASS_PIXEL. - * - * You specify a screen and pixel coordinates in that screen - * at which you'd like the mouse to be positioned. - * Intuition will try to oblige, but there will be restrictions - * to positioning the pointer over offscreen pixels. - * - * IEQUALIFIER_RELATIVEMOUSE is supported for IESUBCLASS_PIXEL. - } -Type - - pIEPointerPixel = ^tIEPointerPixel; - tIEPointerPixel = record - iepp_Screen : Pointer; { pointer to an open screen } - iepp_Position : record - x,y : smallint; - end; - END; - -{ pointed to by ie_EventAddress for IECLASS_NEWPOINTERPOS, - * and IESUBCLASS_TABLET. - * - * You specify a range of values and a value within the range - * independently for each of X and Y (the minimum value of - * the ranges is always normalized to 0). - * - * Intuition will position the mouse proportionally within its - * natural mouse position rectangle limits. - * - * IEQUALIFIER_RELATIVEMOUSE is not supported for IESUBCLASS_TABLET. - } - - pIEPointerTablet = ^tIEPointerTablet; - tIEPointerTablet = record - iept_Range : record { 0 is min, these are max } - x,y : Word; - end; - iept_Value : record { between 0 AND iept_Range } - x,y : Word; - end; - iept_Pressure : Word; { -128 to 127 (unused, set to 0) } - END; - -{ The ie_EventAddress of an IECLASS_NEWPOINTERPOS event of subclass - * IESUBCLASS_NEWTABLET points at an IENewTablet structure. - * - * - * IEQUALIFIER_RELATIVEMOUSE is not supported for IESUBCLASS_NEWTABLET. - } - - pIENewTablet = ^tIENewTablet; - tIENewTablet = record - { Pointer to a hook you wish to be called back through, in - * order to handle scaling. You will be provided with the - * width and height you are expected to scale your tablet - * to, perhaps based on some user preferences. - * If NULL, the tablet's specified range will be mapped directly - * to that width and height for you, and you will not be - * called back. - } - ient_CallBack : pHook; - - { Post-scaling coordinates and fractional coordinates. - * DO NOT FILL THESE IN AT THE TIME THE EVENT IS WRITTEN! - * Your driver will be called back and provided information - * about the width and height of the area to scale the - * tablet into. It should scale the tablet coordinates - * (perhaps based on some preferences controlling aspect - * ratio, etc.) and place the scaled result into these - * fields. The ient_ScaledX and ient_ScaledY fields are - * in screen-pixel resolution, but the origin ( [0,0]-point ) - * is not defined. The ient_ScaledXFraction and - * ient_ScaledYFraction fields represent sub-pixel position - * information, and should be scaled to fill a UWORD fraction. - } - ient_ScaledX, ient_ScaledY, - ient_ScaledXFraction, ient_ScaledYFraction : WORD; - - { Current tablet coordinates along each axis: } - ient_TabletX, ient_TabletY : ULONG; - - { Tablet range along each axis. For example, if ient_TabletX - * can take values 0-999, ient_RangeX should be 1000. - } - ient_RangeX, ient_RangeY : ULONG; - - { Pointer to tag-list of additional tablet attributes. - * See for the tag values. - } - ient_TagList : pTagItem; - end; - - -CONST -{ --- InputEvent.ie_Code --- } -{ IECLASS_RAWKEY } - IECODE_UP_PREFIX = $80; - IECODE_KEY_CODE_FIRST = $00; - IECODE_KEY_CODE_LAST = $77; - IECODE_COMM_CODE_FIRST = $78; - IECODE_COMM_CODE_LAST = $7F; - -{ IECLASS_ANSI } - IECODE_C0_FIRST = $00; - IECODE_C0_LAST = $1F; - IECODE_ASCII_FIRST = $20; - IECODE_ASCII_LAST = $7E; - IECODE_ASCII_DEL = $7F; - IECODE_C1_FIRST = $80; - IECODE_C1_LAST = $9F; - IECODE_LATIN1_FIRST = $A0; - IECODE_LATIN1_LAST = $FF; - -{ IECLASS_RAWMOUSE } - IECODE_LBUTTON = $68; { also uses IECODE_UP_PREFIX } - IECODE_RBUTTON = $69; - IECODE_MBUTTON = $6A; - IECODE_NOBUTTON = $FF; - -{ IECLASS_EVENT } - IECODE_NEWACTIVE = $01; { active input window changed } - IECODE_NEWSIZE = $02; { resize of window } - IECODE_REFRESH = $03; { refresh of window } - -{ IECLASS_REQUESTER Codes } -{ REQSET is broadcast when the first Requester (not subsequent ones) opens - * in the Window - } - IECODE_REQSET = $01; -{ REQCLEAR is broadcast when the last Requester clears out of the Window } - IECODE_REQCLEAR = $00; - - -{ --- InputEvent.ie_Qualifier --- } - IEQUALIFIER_LSHIFT = $0001; - IEQUALIFIER_RSHIFT = $0002; - IEQUALIFIER_CAPSLOCK = $0004; - IEQUALIFIER_CONTROL = $0008; - IEQUALIFIER_LALT = $0010; - IEQUALIFIER_RALT = $0020; - IEQUALIFIER_LCOMMAND = $0040; - IEQUALIFIER_RCOMMAND = $0080; - IEQUALIFIER_NUMERICPAD = $0100; - IEQUALIFIER_REPEAT = $0200; - IEQUALIFIER_INTERRUPT = $0400; - IEQUALIFIER_MULTIBROADCAST = $0800; - IEQUALIFIER_MIDBUTTON = $1000; - IEQUALIFIER_RBUTTON = $2000; - IEQUALIFIER_LEFTBUTTON = $4000; - IEQUALIFIER_RELATIVEMOUSE = $8000; - - IEQUALIFIERB_LSHIFT = 0; - IEQUALIFIERB_RSHIFT = 1; - IEQUALIFIERB_CAPSLOCK = 2; - IEQUALIFIERB_CONTROL = 3; - IEQUALIFIERB_LALT = 4; - IEQUALIFIERB_RALT = 5; - IEQUALIFIERB_LCOMMAND = 6; - IEQUALIFIERB_RCOMMAND = 7; - IEQUALIFIERB_NUMERICPAD = 8; - IEQUALIFIERB_REPEAT = 9; - IEQUALIFIERB_INTERRUPT = 10; - IEQUALIFIERB_MULTIBROADCAST = 11; - IEQUALIFIERB_MIDBUTTON = 12; - IEQUALIFIERB_RBUTTON = 13; - IEQUALIFIERB_LEFTBUTTON = 14; - IEQUALIFIERB_RELATIVEMOUSE = 15; - - -{------ InputEvent ------------------------------------------------} - - type - pInputEvent = ^tInputEvent; - tInputEvent = record - ie_NextEvent : pInputEvent; - ie_Class : BYTE; - ie_SubClass : BYTE; - ie_Code : WORD; - ie_Qualifier : WORD; - ie_position : record - case longint of - 0 : ( ie_xy : record - ie_x : smallint; - ie_y : smallint; - end ); - 1 : ( ie_addr : APTR ); - 2 : ( ie_dead : record - ie_prev1DownCode : BYTE; - ie_prev1DownQual : BYTE; - ie_prev2DownCode : BYTE; - ie_prev2DownQual : BYTE; - end ); - end; - ie_TimeStamp : tTimeVal; - end; - -IMPLEMENTATION - -end. diff --git a/packages/arosunits/src/intuition.pas b/packages/arosunits/src/intuition.pas deleted file mode 100644 index ac0b92f820..0000000000 --- a/packages/arosunits/src/intuition.pas +++ /dev/null @@ -1,6090 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - - -{ - History: - Changed tNewWindow.MaxHeigth and tNewWindow.MaxWidth - from Word to Integer. - 30 May 2000. - - Added overlay functions for Pchar->Strings, functions - and procedures. - 14 Jul 2000. - - Added functions and procedures with array of const. - For use with fpc 1.0.7 They are in systemvartags. - 05 Nov 2002. - - Removed amigaoverlays, use smartlink instead. - 05 Nov 2002. - - Added the define use_amiga_smartlink. - 13 Jan 2003. - - Update for AmigaOS 3.9. - New consts and new records. - 04 Feb 2003. - - Changed integer > smallint. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se Nils Sjoholm - -} - -unit intuition; - -{$mode objfpc} - -interface - -uses - Exec, Utility, agraphics, inputevent, timer, layers; - -//uses exec, graphics, utility, inputevent, timer, layers; - -{ - * NOTE: intuition/iobsolete.h is included at the END of this file! - } -{ ======================================================================== } -{ === IntuiText ========================================================== } -{ ================================= ======================================= } -{ IntuiText is a series of strings that start with a screen location - * (always relative to the upper-left corner of something) and then the - * text of the string. The text is null-terminated. - } -type - PIntuiText = ^TIntuiText; - - TIntuiText = record - FrontPen, - BackPen: Byte; { the pen numbers for the rendering } - DrawMode: Byte; { the mode for rendering the text } - LeftEdge: SmallInt; { relative start location for the text } - TopEdge: SmallInt; { relative start location for the text } - ITextFont: PTextAttr; { if NULL, you accept the default } - IText: PChar; { pointer to null-terminated text } - NextText: PIntuiText; { continuation to TxWrite another text } - end; - - - -{ ======================================================================== } -{ === Border ============================================================= } -{ ======================================================================== } -{ Data type Border, used for drawing a series of lines which is intended for - * use as a border drawing, but which may, in fact, be used to render any - * arbitrary vector shape. - * The routine DrawBorder sets up the RastPort with the appropriate - * variables, then does a Move to the first coordinate, then does Draws - * to the subsequent coordinates. - * After all the Draws are done, if NextBorder is non-zero we call DrawBorder - * recursively - } -type - PBorder = ^TBorder; - - TBorder = record - LeftEdge, - TopEdge: SmallInt; { initial offsets from the origin } - FrontPen, - BackPen: Byte; { pens numbers for rendering } - DrawMode: Byte; { mode for rendering } - Count: ShortInt; { number of XY pairs } - XY: Pointer; { vector coordinate pairs rel to LeftTop} - NextBorder: PBorder; { pointer to any other Border too } - end; - -{ ======================================================================== } -{ === MenuItem =========================================================== } -{ ======================================================================== } - -type - - PMenuItem = ^TMenuItem; - - TMenuItem = record - NextItem: PMenuItem; { pointer to next in chained list } - LeftEdge, - TopEdge: SmallInt; { position of the select box } - Width, - Height: SmallInt; { dimensions of the select box } - Flags: Word; { see the defines below } - - MutualExclude: LongInt; { set bits mean this item excludes that } - - ItemFill: Pointer; { points to Image, IntuiText, or NULL } - - { when this item is pointed to by the cursor and the items highlight - * mode HIGHIMAGE is selected, this alternate image will be displayed - } - - SelectFill: Pointer; { points to Image, IntuiText, or NULL } - - Command: Char; { only if appliprog sets the COMMSEQ flag } - - SubItem: PMenuItem; { if non-zero, DrawMenu shows "->" } - - { The NextSelect field represents the menu number of next selected - * item (when user has drag-selected several items) - } - - NextSelect: Word; - end; - - -const - - { FLAGS SET BY THE APPLIPROG } - CHECKIT = $0001; { whether to check this item if selected } - ITEMTEXT = $0002; { set if textual, clear if graphical item } - COMMSEQ = $0004; { set if there's an command sequence } - MENUTOGGLE = $0008; { set to toggle the check of a menu item } - ITEMENABLED = $0010; { set if this item is enabled } - - { these are the SPECIAL HIGHLIGHT FLAG state meanings } - HIGHFLAGS = $00C0; { see definitions below for these bits } - HIGHIMAGE = $0000; { use the user's "select image" } - HIGHCOMP = $0040; { highlight by complementing the selectbox } - HIGHBOX = $0080; { highlight by "boxing" the selectbox } - HIGHNONE = $00C0; { don't highlight } - - { FLAGS SET BY BOTH APPLIPROG AND INTUITION } - Checked = $0100; { if CHECKIT, then set this when selected } - - { FLAGS SET BY INTUITION } - ISDRAWN = $1000; { this item's subs are currently drawn } - HIGHITEM = $2000; { this item is currently highlighted } - MENUTOGGLED = $4000; { this item was already toggled } - - -{ ======================================================================== } -{ === Menu =============================================================== } -{ ======================================================================== } -type - - PMenu = ^TMenu; - - TMenu = record - NextMenu: PMenu; { same level } - LeftEdge, - TopEdge: SmallInt; { position of the select box } - Width, - Height: SmallInt; { dimensions of the select box } - Flags: Word; { see flag definitions below } - MenuName: PChar; { text for this Menu Header } - FirstItem: PMenuItem; { pointer to first in chain } - - { these mysteriously-named variables are for internal use only } - - JazzX, - JazzY, - BeatX, - BeatY: SmallInt; - end; - -const - { FLAGS SET BY BOTH THE APPLIPROG AND INTUITION } - MENUENABLED = $0001; { whether or not this menu is enabled } - - { FLAGS SET BY INTUITION } - MIDRAWN = $0100; { this menu's items are currently drawn } - - -{ ======================================================================== } -{ === Gadget ============================================================= } -{ ======================================================================== } - -type - - PGadget = ^TGadget; - - TGadget = record - NextGadget: PGadget; { next gadget in the list } - - LeftEdge, - TopEdge: SmallInt; { "hit box" of gadget } - Width, - Height: SmallInt; { "hit box" of gadget } - - Flags: Word; { see below for list of defines } - - Activation: Word; { see below for list of defines } - - GadgetType: Word; { see below for defines } - - { appliprog can specify that the Gadget be rendered as either as Border - * or an Image. This variable points to which (or equals NULL if there's - * nothing to be rendered about this Gadget) - } - - GadgetRender: Pointer; - - { appliprog can specify "highlighted" imagery rather than algorithmic - * this can point to either Border or Image data - } - - SelectRender: Pointer; - - GadgetText: PIntuiText; { text for this gadget } - - { by using the MutualExclude Word, the appliprog can describe - * which gadgets mutually-exclude which other ones. The bits - * in MutualExclude correspond to the gadgets in object containing - * the gadget list. If this gadget is selected and a bit is set - * in this gadget's MutualExclude and the gadget corresponding to - * that bit is currently selected (e.g. bit 2 set and gadget 2 - * is currently selected) that gadget must be unselected. - * Intuition does the visual unselecting (with checkmarks) and - * leaves it up to the program to unselect internally - } - - MutualExclude: LongInt; - { set bits mean this gadget excludes that gadget } - - { pointer to a structure of special data required by Proportional, - * String and LongInt Gadgets - } - - SpecialInfo: Pointer; - - GadgetID: Word; { user-definable ID field } - UserData: Pointer; - { ptr to general purpose User data (ignored by In) } - end; - - PExtGadget = ^TExtGadget; - - TExtGadget = record - { The first fields match struct Gadget exactly } - NextGadget: PExtGadget; { Matches struct Gadget } - LeftEdge, TopEdge, { Matches struct Gadget } - Width, Height: SmallInt; { Matches struct Gadget } - Flags, { Matches struct Gadget } - Activation, { Matches struct Gadget } - GadgetType: Word; { Matches struct Gadget } - GadgetRender, { Matches struct Gadget } - SelectRender: Pointer; { Matches struct Gadget } - GadgetText: PIntuiText; { Matches struct Gadget } - MutualExclude: LongInt; { Matches struct Gadget } - SpecialInfo: Pointer; { Matches struct Gadget } - GadgetID: Word; { Matches struct Gadget } - UserData: Pointer; { Matches struct Gadget } - - { These fields only exist under V39 and only if GFLG_EXTENDED is set } - MoreFlags: LongWord; { see GMORE_ flags below } - BoundsLeftEdge, { Bounding extent for gadget, valid } - BoundsTopEdge, { only if GMORE_BOUNDS is set. The } - BoundsWidth, { GFLG_RELxxx flags affect these } - BoundsHeight: SmallInt; { coordinates as well. } - end; - - -const - { --- Gadget.Flags values --- } - { combinations in these bits describe the highlight technique to be used } - GFLG_GADGHIGHBITS = $0003; - GFLG_GADGHCOMP = $0000; { Complement the select box } - GFLG_GADGHBOX = $0001; { Draw a box around the image } - GFLG_GADGHIMAGE = $0002; { Blast in this alternate image } - GFLG_GADGHNONE = $0003; { don't highlight } - - GFLG_GADGIMAGE = $0004; { set IF GadgetRender AND SelectRender - * point to an Image structure, clear - * if they point to Border structures - } - -{ combinations in these next two bits specify to which corner the gadget's - * Left & Top coordinates are relative. If relative to Top/Left, - * these are "normal" coordinates (everything is relative to something in - * this universe). - * - * Gadget positions and dimensions are relative to the window or - * requester which contains the gadget - } - GFLG_RELBOTTOM = $0008; { vert. pos. is relative to bottom edge } - GFLG_RELRIGHT = $0010; { horiz. pos. is relative to right edge } - GFLG_RELWIDTH = $0020; { width is relative to req/window } - GFLG_RELHEIGHT = $0040; { height is relative to req/window } - -{ New for V39: GFLG_RELSPECIAL allows custom gadget implementors to - * make gadgets whose position and size depend in an arbitrary way - * on their window's dimensions. The GM_LAYOUT method will be invoked - * for such a gadget (or any other GREL_xxx gadget) at suitable times, - * such as when the window opens or the window's size changes. - } - GFLG_RELSPECIAL = $4000; { custom gadget has special relativity. - * Gadget box values are absolutes, but - * can be changed via the GM_LAYOUT method. - } - - GFLG_SELECTED = $0080; { you may initialize AND look at this } - -{ the GFLG_DISABLED flag is initialized by you and later set by Intuition - * according to your calls to On/OffGadget(). It specifies whether or not - * this Gadget is currently disabled from being selected - } - GFLG_DISABLED = $0100; - -{ These flags specify the type of text field that Gadget.GadgetText - * points to. In all normal (pre-V36) gadgets which you initialize - * this field should always be zero. Some types of gadget objects - * created from classes will use these fields to keep track of - * types of labels/contents that different from IntuiText, but are - * stashed in GadgetText. - } - - GFLG_LABELMASK = $3000; - GFLG_LABELITEXT = $0000; { GadgetText points to IntuiText } - GFLG_LABELSTRING = $1000; { GadgetText points to (UBYTE * ) } - GFLG_LABELIMAGE = $2000; { GadgetText points to Image (object) } - - { New for V37: GFLG_TABCYCLE } - GFLG_TABCYCLE = $0200; { (string OR custom) gadget participates in - * cycling activation with Tab or Shift-Tab - } -{ New for V37: GFLG_STRINGEXTEND. We discovered that V34 doesn't properly - * ignore the value we had chosen for the Gadget->Activation flag - * GACT_STRINGEXTEND. NEVER SET THAT FLAG WHEN RUNNING UNDER V34. - * The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is - * safe under V34, and equivalent to GACT_STRINGEXTEND under V37. - * (Note that the two flags are not numerically equal) - } - GFLG_STRINGEXTEND = $0400; { this String Gadget has StringExtend } - -{ New for V39: GFLG_IMAGEDISABLE. This flag is automatically set if - * the custom image of this gadget knows how to do disabled rendering - * (more specifically, if its IA_SupportsDisable attribute is TRUE). - * Intuition uses this to defer the ghosting to the image-class, - * instead of doing it itself (the old compatible way). - * Do not set this flag yourself - Intuition will do it for you. - } - - GFLG_IMAGEDISABLE = $0800; { Gadget's image knows how to do disabled - * rendering - } - -{ New for V39: If set, this bit means that the Gadget is actually - * a struct ExtGadget, with new fields and flags. All V39 boopsi - * gadgets are ExtGadgets. Never ever attempt to read the extended - * fields of a gadget if this flag is not set. - } - GFLG_EXTENDED = $8000; { Gadget is extended } - - { --- Gadget.Activation flag values --- } -{ Set GACT_RELVERIFY if you want to verify that the pointer was still over - * the gadget when the select button was released. Will cause - * an IDCMP_GADGETUP message to be sent if so. - } - GACT_RELVERIFY = $0001; - -{ the flag GACT_IMMEDIATE, when set, informs the caller that the gadget - * was activated when it was activated. This flag works in conjunction with - * the GACT_RELVERIFY flag - } - GACT_IMMEDIATE = $0002; - -{ the flag GACT_ENDGADGET, when set, tells the system that this gadget, - * when selected, causes the Requester to be ended. Requesters - * that are ended are erased and unlinked from the system. - } - GACT_ENDGADGET = $0004; - -{ the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive - * reports on mouse movements while this gadget is active. - * You probably want to set the GACT_IMMEDIATE flag when using - * GACT_FOLLOWMOUSE, since that's the only reasonable way you have of - * learning why Intuition is suddenly sending you a stream of mouse - * movement events. If you don't set GACT_RELVERIFY, you'll get at - * least one Mouse Position event. - } - GACT_FOLLOWMOUSE = $0008; - -{ if any of the BORDER flags are set in a Gadget that's included in the - * Gadget list when a Window is opened, the corresponding Border will - * be adjusted to make room for the Gadget - } - GACT_RIGHTBORDER = $0010; - GACT_LEFTBORDER = $0020; - GACT_TOPBORDER = $0040; - GACT_BOTTOMBORDER = $0080; - GACT_BORDERSNIFF = $8000; { neither set nor rely on this bit } - - GACT_TOGGLESELECT = $0100; { this bit for toggle-select mode } - GACT_BOOLEXTEND = $2000; { this Boolean Gadget has a BoolInfo } - - { should properly be in StringInfo, but aren't } - GACT_STRINGLEFT = $0000; { NOTE WELL: that this has value zero } - GACT_STRINGCENTER = $0200; - GACT_STRINGRIGHT = $0400; - GACT_LONGINT = $0800; { this String Gadget is for Long Ints } - GACT_ALTKEYMAP = $1000; { this String has an alternate keymap } - GACT_STRINGEXTEND = $2000; { this String Gadget has StringExtend } - { NOTE: NEVER SET GACT_STRINGEXTEND IF YOU - * ARE RUNNING ON LESS THAN V36! SEE - * GFLG_STRINGEXTEND (ABOVE) INSTEAD - } - - GACT_ACTIVEGADGET = $4000; { this gadget is "active". This flag - * is maintained by Intuition, and you - * cannot count on its value persisting - * while you do something on your program's - * task. It can only be trusted by - * people implementing custom gadgets - } - -{ note $8000 is used above (GACT_BORDERSNIFF); - * all Activation flags defined } - - { --- GADGET TYPES ------------------------------------------------------- } -{ These are the Gadget type definitions for the variable GadgetType - * gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED. - * first comes the mask for Gadget flags reserved for Gadget typing - } - GTYP_GADGETTYPE = $FC00; { all Gadget Global type flags (padded) } - GTYP_SYSGADGET = $8000; { 1 = Allocated by the system, 0 = by app. } - GTYP_SCRGADGET = $4000; { 1 = ScreenGadget, 0 = WindowGadget } - GTYP_GZZGADGET = $2000; { 1 = for WFLG_GIMMEZEROZERO borders } - GTYP_REQGADGET = $1000; { 1 = this is a Requester Gadget } - { system gadgets } - GTYP_SIZING = $0010; - GTYP_WDRAGGING = $0020; - GTYP_SDRAGGING = $0030; - GTYP_WUPFRONT = $0040; - GTYP_SUPFRONT = $0050; - GTYP_WDOWNBACK = $0060; - GTYP_SDOWNBACK = $0070; - GTYP_CLOSE = $0080; - { application gadgets } - GTYP_BOOLGADGET = $0001; - GTYP_GADGET0002 = $0002; - GTYP_PROPGADGET = $0003; - GTYP_STRGADGET = $0004; - GTYP_CUSTOMGADGET = $0005; - - -{* GTYP_GTYPEMASK is a mask you can apply to tell what class - * of gadget this is. The possible classes follow. - *} - GTYP_GTYPEMASK = $0007; - -{ This bit in GadgetType is reserved for undocumented internal use - * by the Gadget Toolkit, and cannot be used nor relied on by - * applications: $0100; - } - -{ New for V39. Gadgets which have the GFLG_EXTENDED flag set are - * actually ExtGadgets, which have more flags. The GMORE_xxx - * identifiers describe those flags. For GMORE_SCROLLRASTER, see - * important information in the ScrollWindowRaster() autodoc. - * NB: GMORE_SCROLLRASTER must be set before the gadget is - * added to a window. - } - GMORE_BOUNDS = $00000001; { ExtGadget has valid Bounds } - GMORE_GADGETHELP = $00000002; { This gadget responds to gadget help } - GMORE_SCROLLRASTER = $00000004; { This (custom) gadget uses ScrollRaster } - -{ ======================================================================== } -{ === BoolInfo======================================================= } -{ ======================================================================== } -{ This is the special data needed by an Extended Boolean Gadget - * Typically this structure will be pointed to by the Gadget field SpecialInfo - } -type - PBoolInfo = ^TBoolInfo; - - TBoolInfo = record - Flags: Word; { defined below } - Mask: Pointer; { bit mask for highlighting and selecting - * mask must follow the same rules as an Image - * plane. It's width and height are determined - * by the width and height of the gadget's - * select box. (i.e. Gadget.Width and .Height). - } - Reserved: LongWord; { set to 0 } - end; - -const - -{ set BoolInfo.Flags to this flag bit. - * in the future, additional bits might mean more stuff hanging - * off of BoolInfo.Reserved. -} - BOOLMASK = $0001; { extension is for masked gadget } - -{ ======================================================================== } -{ === PropInfo =========================================================== } -{ ======================================================================== } -{ this is the special data required by the proportional Gadget - * typically, this data will be pointed to by the Gadget variable SpecialInfo - } - -type - - PPropInfo = ^TPropInfo; - - TPropInfo = record - Flags: Word; { general purpose flag bits (see defines below) } - - { You initialize the Pot variables before the Gadget is added to - * the system. Then you can look here for the current settings - * any time, even while User is playing with this Gadget. To - * adjust these after the Gadget is added to the System, use - * ModifyProp(); The Pots are the actual proportional settings, - * where a value of zero means zero and a value of MAXPOT means - * that the Gadget is set to its maximum setting. - } - - HorizPot: Word; { 16-bit FixedPoint horizontal quantity percentage } - VertPot: Word; { 16-bit FixedPoint vertical quantity percentage } - - { the 16-bit FixedPoint Body variables describe what percentage of - * the entire body of stuff referred to by this Gadget is actually - * shown at one time. This is used with the AUTOKNOB routines, - * to adjust the size of the AUTOKNOB according to how much of - * the data can be seen. This is also used to decide how far - * to advance the Pots when User hits the Container of the Gadget. - * For instance, if you were controlling the display of a 5-line - * Window of text with this Gadget, and there was a total of 15 - * lines that could be displayed, you would set the VertBody value to - * (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3. - * Therefore, the AUTOKNOB would fill 1/3 of the container, and - * if User hits the Cotainer outside of the knob, the pot would - * advance 1/3 (plus or minus) If there's no body to show, or - * the total amount of displayable info is less than the display area, - * set the Body variables to the MAX. To adjust these after the - * Gadget is added to the System, use ModifyProp(); - } - - HorizBody: Word; { horizontal Body } - VertBody: Word; { vertical Body } - - { these are the variables that Intuition sets and maintains } - - CWidth: Word; - { Container width (with any relativity absoluted) } - CHeight: Word; - { Container height (with any relativity absoluted) } - HPotRes, - VPotRes: Word; { pot increments } - LeftBorder: Word; { Container borders } - TopBorder: Word; { Container borders } - end; - -const - { --- FLAG BITS ---------------------------------------------------------- } - AUTOKNOB = $0001; { this flag sez: gimme that old auto-knob } -{ NOTE: if you do not use an AUTOKNOB for a proportional gadget, - * you are currently limited to using a single Image of your own - * design: Intuition won't handle a linked list of images as - * a proportional gadget knob. - } - - FREEHORIZ = $0002; { IF set, the knob can move horizontally } - FREEVERT = $0004; { IF set, the knob can move vertically } - PROPBORDERLESS = $0008; { IF set, no border will be rendered } - KNOBHIT = $0100; { set when this Knob is hit } - PROPNEWLOOK = $0010; { set this IF you want to get the new - * V36 look - } - - KNOBHMIN = 6; { minimum horizontal size of the Knob } - KNOBVMIN = 4; { minimum vertical size of the Knob } - MAXBODY = $FFFF; { maximum body value } - MAXPOT = $FFFF; { maximum pot value } - -{ ======================================================================== } -{ === StringInfo ========================================================= } -{ ======================================================================== } -{ this is the special data required by the string Gadget - * typically, this data will be pointed to by the Gadget variable SpecialInfo - } - -type - - PStringInfo = ^TStringInfo; - - TStringInfo = record - { you initialize these variables, and then Intuition maintains them } - Buffer: PChar; - { the buffer containing the start and final string } - UndoBuffer: PChar; { optional buffer for undoing current entry } - BufferPos: SmallInt; { character position in Buffer } - MaxChars: SmallInt; - { max number of chars in Buffer (including NULL) } - DispPos: SmallInt; - { Buffer position of first displayed character } - - { Intuition initializes and maintains these variables for you } - - UndoPos: SmallInt; { character position in the undo buffer } - NumChars: SmallInt; { number of characters currently in Buffer } - DispCount: SmallInt; - { number of whole characters visible in Container } - CLeft, - CTop: SmallInt; { topleft offset of the container } - - { you can initialize this variable before the gadget is submitted to - * Intuition, and then examine it later to discover what LongInt - * the user has entered (if the user never plays with the gadget, - * the value will be unchanged from your initial setting) - } - Extension: Pointer; - _LongInt: LongInt; - - { If you want this Gadget to use your own Console keymapping, you - * set the ALTKEYMAP bit in the Activation flags of the Gadget, and then - * set this variable to point to your keymap. If you don't set the - * ALTKEYMAP, you'll get the standard ASCII keymapping. - } - - AltKeyMap: Pointer; - end; - - -{ ======================================================================== } -{ === Requester ========================================================== } -{ ======================================================================== } - -type - - PRequester = ^TRequester; - - TRequester = record - { the ClipRect and BitMap and used for rendering the requester } - OlderRequest: PRequester; - LeftEdge, - TopEdge: SmallInt; { dimensions of the entire box } - Width, - Height: SmallInt; { dimensions of the entire box } - RelLeft, - RelTop: SmallInt; { for Pointer relativity offsets } - - ReqGadget: PGadget; { pointer to a list of Gadgets } - ReqBorder: PBorder; { the box's border } - ReqText: PIntuiText; { the box's text } - Flags: Word; { see definitions below } - - { pen number for back-plane fill before draws } - - BackFill: Byte; - - { Layer in place of clip rect } - - ReqLayer: PLayer; - - ReqPad1: array [0..31] of Byte; - - { If the BitMap plane pointers are non-zero, this tells the system - * that the image comes pre-drawn (if the appliprog wants to define - * it's own box, in any shape or size it wants!); this is OK by - * Intuition as long as there's a good correspondence between - * the image and the specified Gadgets - } - - ImageBMap: PBitMap; { points to the BitMap of PREDRAWN imagery } - RWindow: Pointer; { added. points back to Window } - ReqImage: Pointer; - ReqPad2: array[0..31] of ShortInt; - end; - - -const - - { FLAGS SET BY THE APPLIPROG } - POINTREL = $0001; { if POINTREL set, TopLeft is relative to pointer} - PREDRAWN = $0002; { if ReqBMap points to predrawn Requester imagery } - NOISYREQ = $0004; - { if you don't want requester to filter input } - - SIMPLEREQ = $0010; - { to use SIMPLEREFRESH layer (recommended) } - - { New for V36 } - USEREQIMAGE = $0020; - { render linked list ReqImage after BackFill - * but before gadgets and text - } - NOREQBACKFILL = $0040; - { don't bother filling requester with Requester.BackFill pen } - - - { FLAGS SET BY INTUITION } - REQOFFWINDOW = $1000; { part of one of the Gadgets was offwindow } - REQACTIVE = $2000; { this requester is active } - SYSREQUEST = $4000; { this requester caused by system } - DEFERREFRESH = $8000; { this Requester stops a Refresh broadcast } - - - - -{ ======================================================================== } -{ === Image ============================================================== } -{ ======================================================================== } -{ This is a brief image structure for very simple transfers of - * image data to a RastPort - } - -type - PImage = ^TImage; - - TImage = record - LeftEdge: SmallInt; { starting offset relative to some origin } - TopEdge: SmallInt; { starting offsets relative to some origin } - Width: SmallInt; { pixel size (though data is Word-aligned) } - Height, - Depth: SmallInt; { pixel sizes } - ImageData: Pointer; { pointer to the actual Word-aligned bits } - - { the PlanePick and PlaneOnOff variables work much the same way as the - * equivalent GELS Bob variables. It's a space-saving - * mechanism for image data. Rather than defining the image data - * for every plane of the RastPort, you need define data only - * for the planes that are not entirely zero or one. As you - * define your Imagery, you will often find that most of the planes - * ARE just as color selectors. For instance, if you're designing - * a two-color Gadget to use colors two and three, and the Gadget - * will reside in a five-plane display, bit plane zero of your - * imagery would be all ones, bit plane one would have data that - * describes the imagery, and bit planes two through four would be - * all zeroes. Using these flags allows you to avoid wasting all - * that memory in this way: first, you specify which planes you - * want your data to appear in using the PlanePick variable. For - * each bit set in the variable, the next "plane" of your image - * data is blitted to the display. For each bit clear in this - * variable, the corresponding bit in PlaneOnOff is examined. - * If that bit is clear, a "plane" of zeroes will be used. - * If the bit is set, ones will go out instead. So, for our example: - * Gadget.PlanePick = $02; - * Gadget.PlaneOnOff = $01; - * Note that this also allows for generic Gadgets, like the - * System Gadgets, which will work in any number of bit planes. - * Note also that if you want an Image that is only a filled - * rectangle, you can get this by setting PlanePick to zero - * (pick no planes of data) and set PlaneOnOff to describe the pen - * color of the rectangle. - } - - PlanePick, - PlaneOnOff: Byte; - - { if the NextImage variable is not NULL, Intuition presumes that - * it points to another Image structure with another Image to be - * rendered - } - - NextImage: PImage; - end; - - -{ New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass - * of the IECLASS_NEWPOINTERPOS event. The ie_EventAddress of such - * an event points to a TabletData structure (see below). - * - * The TabletData structure contains certain elements including a taglist. - * The taglist can be used for special tablet parameters. A tablet driver - * should include only those tag-items the tablet supports. An application - * can listen for any tag-items that interest it. Note: an application - * must set the WA_TabletMessages attribute to TRUE to receive this - * extended information in its IntuiMessages. - * - * The definitions given here MUST be followed. Pay careful attention - * to normalization and the interpretation of signs. - * - * TABLETA_TabletZ: the current value of the tablet in the Z direction. - * This unsigned value should typically be in the natural units of the - * tablet. You should also provide TABLETA_RangeZ. - * - * TABLETA_RangeZ: the maximum value of the tablet in the Z direction. - * Normally specified along with TABLETA_TabletZ, this allows the - * application to scale the actual Z value across its range. - * - * TABLETA_AngleX: the angle of rotation or tilt about the X-axis. This - * number should be normalized to fill a signed long LongInt. Positive - * values imply a clockwise rotation about the X-axis when viewing - * from +X towards the origin. - * - * TABLETA_AngleY: the angle of rotation or tilt about the Y-axis. This - * number should be normalized to fill a signed long LongInt. Positive - * values imply a clockwise rotation about the Y-axis when viewing - * from +Y towards the origin. - * - * TABLETA_AngleZ: the angle of rotation or tilt about the Z axis. This - * number should be normalized to fill a signed long LongInt. Positive - * values imply a clockwise rotation about the Z-axis when viewing - * from +Z towards the origin. - * - * Note: a stylus that supports tilt should use the TABLETA_AngleX - * and TABLETA_AngleY attributes. Tilting the stylus so the tip - * points towards increasing or decreasing X is actually a rotation - * around the Y-axis. Thus, if the stylus tip points towards - * positive X, then that tilt is represented as a negative - * TABLETA_AngleY. Likewise, if the stylus tip points towards - * positive Y, that tilt is represented by positive TABLETA_AngleX. - * - * TABLETA_Pressure: the pressure reading of the stylus. The pressure - * should be normalized to fill a signed long LongInt. Typical devices - * won't generate negative pressure, but the possibility is not precluded. - * The pressure threshold which is considered to cause a button-click is - * expected to be set in a Preferences program supplied by the tablet - * vendor. The tablet driver would send IECODE_LBUTTON-type events as - * the pressure crossed that threshold. - * - * TABLETA_ButtonBits: ti_Data is a long LongInt whose bits are to - * be interpreted at the state of the first 32 buttons of the tablet. - * - * TABLETA_InProximity: ti_Data is a boolean. For tablets that support - * proximity, they should send the (TABLETA_InProximity,FALSE) tag item - * when the stylus is out of proximity. One possible use we can forsee - * is a mouse-blanking commodity which keys off this to blank the - * mouse. When this tag is absent, the stylus is assumed to be - * in proximity. - * - * TABLETA_ResolutionX: ti_Data is an unsigned long LongInt which - * is the x-axis resolution in dots per inch. - * - * TABLETA_ResolutionY: ti_Data is an unsigned long LongInt which - * is the y-axis resolution in dots per inch. - } - -{const - TABLETA_Dummy = (TAG_USER + $3A000) ; - TABLETA_TabletZ = (TABLETA_Dummy + $01); - TABLETA_RangeZ = (TABLETA_Dummy + $02); - TABLETA_AngleX = (TABLETA_Dummy + $03); - TABLETA_AngleY = (TABLETA_Dummy + $04); - TABLETA_AngleZ = (TABLETA_Dummy + $05); - TABLETA_Pressure = (TABLETA_Dummy + $06); - TABLETA_ButtonBits = (TABLETA_Dummy + $07); - TABLETA_InProximity = (TABLETA_Dummy + $08); - TABLETA_ResolutionX = (TABLETA_Dummy + $09); - TABLETA_ResolutionY = (TABLETA_Dummy + $0A);} - -{ If your window sets WA_TabletMessages to TRUE, then it will receive - * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData - * field points at a TabletData structure. This structure contains - * additional information about the input event. - } - -type - PTabletData = ^TTabletData; - - TTabletData = record - { Sub-pixel position of tablet, in screen coordinates, - * scaled to fill a UWORD fraction: - } - td_XFraction, td_YFraction: Word; - - { Current tablet coordinates along each axis: } - td_TabletX, td_TabletY: LongWord; - - { Tablet range along each axis. For example, if td_TabletX - * can take values 0-999, td_RangeX should be 1000. - } - td_RangeX, td_RangeY: LongWord; - - { Pointer to tag-list of additional tablet attributes. - * See for the tag values. - } - td_TagList: PTagItem; - end; - -{ If a tablet driver supplies a hook for ient_CallBack, it will be - * invoked in the standard hook manner. A0 will point to the Hook - * itself, A2 will point to the InputEvent that was sent, and - * A1 will point to a TabletHookData structure. The InputEvent's - * ie_EventAddress field points at the IENewTablet structure that - * the driver supplied. - * - * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver - * should scale the ient_TabletX and ient_TabletY fields and store the - * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and - * ient_ScaledYFraction. - * - * The tablet hook must currently return NULL. This is the only - * acceptable return-value under V39. - } - - PTabletHookData = ^TTabletHookData; - TTabletHookData = record - { Pointer to the active screen: - * Note: if there are no open screens, thd_Screen will be NULL. - * thd_Width and thd_Height will then describe an NTSC 64$400 - * screen. Please scale accordingly. - } - thd_Screen: Pointer; - - { The width and height (measured in pixels of the active screen) - * that your are to scale to: - } - thd_Width, - thd_Height: LongWord; - - { Non-zero if the screen or something about the screen - * changed since the last time you were invoked: - } - thd_ScreenChanged: LongInt; - end; - - -{ ======================================================================== } -{ === IntuiMessage ======================================================= } -{ ======================================================================== } - -type - - PIntuiMessage = ^TIntuiMessage; - - TIntuiMessage = record - ExecMessage: TMessage; - - { the Class bits correspond directly with the IDCMP Flags, except for the - * special bit LONELYMESSAGE (defined below) - } - - IClass: LongWord; - - { the Code field is for special values like MENU number } - - Code: Word; - - { the Qualifier field is a copy of the current InputEvent's Qualifier } - - Qualifier: Word; - - { IAddress contains particular addresses for Intuition functions, like - * the pointer to the Gadget or the Screen - } - - IAddress: Pointer; - - { when getting mouse movement reports, any event you get will have the - * the mouse coordinates in these variables. the coordinates are relative - * to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding) - } - - MouseX, - MouseY: SmallInt; - - { the time values are copies of the current system clock time. Micros - * are in units of microseconds, Seconds in seconds. - } - - Seconds, - Micros: LongWord; - - { the IDCMPWindow variable will always have the Pointer of the Window of - * this IDCMP - } - - IDCMPWindow: Pointer; - - { system-use variable } - - SpecialLink: PIntuiMessage; - end; - -{ New for V39: - * All IntuiMessages are now slightly extended. The ExtIntuiMessage - * structure has an additional field for tablet data, which is usually - * NULL. If a tablet driver which is sending IESUBCLASS_NEWTABLET - * events is installed in the system, windows with the WA_TabletMessages - * property set will find that eim_TabletData points to the TabletData - * structure. Applications must first check that this field is non-NULL; - * it will be NULL for certain kinds of message, including mouse activity - * generated from other than the tablet (i.e. the keyboard equivalents - * or the mouse itself). - * - * NEVER EVER examine any extended fields when running under pre-V39! - * - * NOTE: This structure is subject to grow in the future. Making - * assumptions about its size is A BAD IDEA. - } - - PExtIntuiMessage = ^TExtIntuiMessage; - TExtIntuiMessage = record - eim_IntuiMessage: TIntuiMessage; - eim_TabletData: PTabletData; - end; - - -const - - { --- IDCMP Classes ------------------------------------------------------ } -{ Please refer to the Autodoc for OpenWindow() and to the Rom Kernel - * Manual for full details on the IDCMP classes. - } - IDCMP_SIZEVERIFY = $00000001; - IDCMP_NEWSIZE = $00000002; - IDCMP_REFRESHWINDOW = $00000004; - IDCMP_MOUSEBUTTONS = $00000008; - IDCMP_MOUSEMOVE = $00000010; - IDCMP_GADGETDOWN = $00000020; - IDCMP_GADGETUP = $00000040; - IDCMP_REQSET = $00000080; - IDCMP_MENUPICK = $00000100; - IDCMP_CLOSEWINDOW = $00000200; - IDCMP_RAWKEY = $00000400; - IDCMP_REQVERIFY = $00000800; - IDCMP_REQCLEAR = $00001000; - IDCMP_MENUVERIFY = $00002000; - IDCMP_NEWPREFS = $00004000; - IDCMP_DISKINSERTED = $00008000; - IDCMP_DISKREMOVED = $00010000; - IDCMP_WBENCHMESSAGE = $00020000; { System use only } - IDCMP_ACTIVEWINDOW = $00040000; - IDCMP_INACTIVEWINDOW = $00080000; - IDCMP_DELTAMOVE = $00100000; - IDCMP_VANILLAKEY = $00200000; - IDCMP_INTUITICKS = $00400000; - { for notifications from "boopsi" gadgets } - IDCMP_IDCMPUPDATE = $00800000; { new for V36 } - { for getting help key report during menu session } - IDCMP_MENUHELP = $01000000; { new for V36 } - { for notification of any move/size/zoom/change window } - IDCMP_CHANGEWINDOW = $02000000; { new for V36 } - IDCMP_GADGETHELP = $04000000; { new for V39 } - - { NOTEZ-BIEN: $80000000 is reserved for internal use } - -{ the IDCMP Flags do not use this special bit, which is cleared when - * Intuition sends its special message to the Task, and set when Intuition - * gets its Message back from the Task. Therefore, I can check here to - * find out fast whether or not this Message is available for me to send - } - IDCMP_LONELYMESSAGE = $80000000; - - - { --- IDCMP Codes -------------------------------------------------------- } - { This group of codes is for the IDCMP_CHANGEWINDOW message } - CWCODE_MOVESIZE = $0000; { Window was moved and/or sized } - CWCODE_DEPTH = $0001; { Window was depth-arranged (new for V39) } - - { This group of codes is for the IDCMP_MENUVERIFY function } - MENUHOT = $0001; { IntuiWants verification OR MENUCANCEL } - MENUCANCEL = $0002; { HOT Reply of this cancels Menu operation } - MENUWAITING = $0003; { Intuition simply wants a ReplyMsg() ASAP } - -{ These are internal tokens to represent state of verification attempts - * shown here as a clue. - } - OKOK = MENUHOT; { guy didn't care } - OKABORT = $0004; { window rendered question moot } - OKCANCEL = MENUCANCEL; { window sent cancel reply } - - { This group of codes is for the IDCMP_WBENCHMESSAGE messages } - WBENCHOPEN = $0001; - WBENCHCLOSE = $0002; - - -{ A data structure common in V36 Intuition processing } -type - PIBox = ^TIBox; - - TIBox = record - Left, - Top, - Width, - Height: SmallInt; - end; - - -{ ======================================================================== } -{ === Window ============================================================= } -{ ======================================================================== } - -type - PWindow = ^TWindow; - - TWindow = record - NextWindow: PWindow; { for the linked list in a screen } - - LeftEdge, - TopEdge: SmallInt; { screen dimensions of window } - Width, - Height: SmallInt; { screen dimensions of window } - - MouseY, - MouseX: SmallInt; { relative to upper-left of window } - - MinWidth, - MinHeight: SmallInt; { minimum sizes } - MaxWidth, - MaxHeight: SmallInt; { maximum sizes } - - Flags: LongWord; { see below for defines } - MenuStrip: PMenu; { the strip of Menu headers } - Title: PChar; { the title text for this window } - FirstRequest: PRequester; { all active Requesters } - DMRequest: PRequester; { double-click Requester } - ReqCount: SmallInt; { count of reqs blocking Window } - WScreen: Pointer; { this Window's Screen } - RPort: PRastPort; { this Window's very own RastPort } - - { the border variables describe the window border. If you specify - * GIMMEZEROZERO when you open the window, then the upper-left of the - * ClipRect for this window will be upper-left of the BitMap (with correct - * offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when - * using SuperBitMap). If you don't specify ZeroZero, then you save - * memory (no allocation of RastPort, Layer, ClipRect and associated - * Bitmaps), but you also must offset all your writes by BorderTop, - * BorderLeft and do your own mini-clipping to prevent writing over the - * system gadgets - } - - BorderLeft, - BorderTop, - BorderRight, - BorderBottom: ShortInt; - BorderRPort: pRastPort; - - - { You supply a linked-list of Gadgets for your Window. - * This list DOES NOT include system gadgets. You get the standard - * window system gadgets by setting flag-bits in the variable Flags (see - * the bit definitions below) - } - - FirstGadget: PGadget; - - { these are for opening/closing the windows } - - Parent, - Descendant: PWindow; - - { sprite data information for your own Pointer - * set these AFTER you Open the Window by calling SetPointer() - } - - _Pointer: Pointer; { sprite data } - PtrHeight: ShortInt; - { sprite height (not including sprite padding) } - PtrWidth: ShortInt; - { sprite width (must be less than or equal to 16) } - XOffset, - YOffset: ShortInt; { sprite offsets } - - { the IDCMP Flags and User's and Intuition's Message Ports } - IDCMPFlags: LongWord; { User-selected flags } - UserPort, - WindowPort: PMsgPort; - MessageKey: PIntuiMessage; - - DetailPen, - BlockPen: Byte; { for bar/border/gadget rendering } - - { the CheckMark is a pointer to the imagery that will be used when - * rendering MenuItems of this Window that want to be checkmarked - * if this is equal to NULL, you'll get the default imagery - } - - CheckMark: PImage; - - ScreenTitle: PChar; { if non-null, Screen title when Window is active } - - { These variables have the mouse coordinates relative to the - * inner-Window of GIMMEZEROZERO Windows. This is compared with the - * MouseX and MouseY variables, which contain the mouse coordinates - * relative to the upper-left corner of the Window, GIMMEZEROZERO - * notwithstanding - } - - GZZMouseX: SmallInt; - GZZMouseY: SmallInt; - - { these variables contain the width and height of the inner-Window of - * GIMMEZEROZERO Windows - } - - GZZWidth: SmallInt; - GZZHeight: SmallInt; - - ExtData: Pointer; - - UserData: Pointer; - { general-purpose pointer to User data extension } - - {* jimm: NEW: 11/18/85: this pointer keeps a duplicate of what - * Window.RPort->Layer is _supposed_ to be pointing at - } - - WLayer: PLayer; - - { jimm: NEW 1.2: need to keep track of the font that - * OpenWindow opened, in case user SetFont's into RastPort - } - - IFont: PTextFont; - {* (V36) another flag Word (the Flags field is used up). - * At present, all flag values are system private. - * Until further notice, you may not change nor use this field. - *} - MoreFlags: LongWord; - - RelLeftEdge: SmallInt; // relative coordinates of the window - RelTopEdge: SmallInt; - - FirstChild: PWindow; // pointer to first child - PrevChild: PWindow; // if window is a child of a window - NextChild: PWindow; // then they are concatenated here. - Parent2: PWindow; // parent of this window - {**** Data beyond this point are Intuition Private. DO NOT USE ****} - - end; - -const - { --- Flags requested at OpenWindow() time by the application --------- } - WFLG_SIZEGADGET = $00000001; { include sizing system-gadget? } - WFLG_DRAGBAR = $00000002; { include dragging system-gadget? } - WFLG_DEPTHGADGET = $00000004; { include depth arrangement gadget? } - WFLG_CLOSEGADGET = $00000008; { include close-box system-gadget? } - - WFLG_SIZEBRIGHT = $00000010; { size gadget uses right border } - WFLG_SIZEBBOTTOM = $00000020; { size gadget uses bottom border } - - { --- refresh modes ------------------------------------------------------ } - { combinations of the WFLG_REFRESHBITS select the refresh type } - WFLG_REFRESHBITS = $000000C0; - WFLG_SMART_REFRESH = $00000000; - WFLG_SIMPLE_REFRESH = $00000040; - WFLG_SUPER_BITMAP = $00000080; - WFLG_OTHER_REFRESH = $000000C0; - - WFLG_BACKDROP = $00000100; { this is a backdrop window } - - WFLG_REPORTMOUSE = $00000200; { to hear about every mouse move } - - WFLG_GIMMEZEROZERO = $00000400; { a GimmeZeroZero window } - - WFLG_BORDERLESS = $00000800; { to get a Window sans border } - - WFLG_ACTIVATE = $00001000; { when Window opens, it's Active } - - - { --- Other User Flags --------------------------------------------------- } - WFLG_RMBTRAP = $00010000; { Catch RMB events for your own } - WFLG_NOCAREREFRESH = $00020000; { not to be bothered with REFRESH } - - { - V36 new Flags which the programmer may specify in NewWindow.Flags } - WFLG_NW_EXTENDED = $00040000; { extension data provided } - { see struct ExtNewWindow } - - { - V39 new Flags which the programmer may specify in NewWindow.Flags } - WFLG_NEWLOOKMENUS = $00200000; { window has NewLook menus } - - { These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF! } - WFLG_WINDOWACTIVE = $00002000; { this window is the active one } - WFLG_INREQUEST = $00004000; { this window is in request mode } - WFLG_MENUSTATE = $00008000; { Window is active with Menus on } - WFLG_WINDOWREFRESH = $01000000; { Window is currently refreshing } - WFLG_WBENCHWINDOW = $02000000; { WorkBench tool ONLY Window } - WFLG_WINDOWTICKED = $04000000; { only one timer tick at a time } - - { --- V36 Flags to be set only by Intuition ------------------------- } - WFLG_VISITOR = $08000000; { visitor window } - WFLG_ZOOMED = $10000000; { identifies "zoom state" } - WFLG_HASZOOM = $20000000; { windowhas a zoom gadget } - - { --- Other Window Values ---------------------------------------------- } - DEFAULTMOUSEQUEUE = (5); { no more mouse messages } - -{ --- see struct IntuiMessage for the IDCMP Flag definitions ------------- } - - -{ ======================================================================== } -{ === NewWindow ========================================================== } -{ ======================================================================== } - -type - - PNewWindow = ^TNewWindow; - - TNewWindow = record - LeftEdge, - TopEdge: SmallInt; { screen dimensions of window } - Width, - Height: SmallInt; { screen dimensions of window } - - DetailPen, - BlockPen: Byte; { for bar/border/gadget rendering } - - IDCMPFlags: LongWord; { User-selected IDCMP flags } - - Flags: LongWord; { see Window struct for defines } - - { You supply a linked-list of Gadgets for your Window. - * This list DOES NOT include system Gadgets. You get the standard - * system Window Gadgets by setting flag-bits in the variable Flags (see - * the bit definitions under the Window structure definition) - } - - FirstGadget: PGadget; - - { the CheckMark is a pointer to the imagery that will be used when - * rendering MenuItems of this Window that want to be checkmarked - * if this is equal to NULL, you'll get the default imagery - } - - CheckMark: PImage; - - Title: PChar; { the title text for this window } - - { the Screen pointer is used only if you've defined a CUSTOMSCREEN and - * want this Window to open in it. If so, you pass the Pointer of the - * Custom Screen structure in this variable. Otherwise, this variable - * is ignored and doesn't have to be initialized. - } - - Screen: Pointer; - - { SUPER_BITMAP Window? If so, put the Pointer of your BitMap structure - * in this variable. If not, this variable is ignored and doesn't have - * to be initialized - } - - BitMap: PBitMap; - - { the values describe the minimum and maximum sizes of your Windows. - * these matter only if you've chosen the WINDOWSIZING Gadget option, - * which means that you want to let the User to change the size of - * this Window. You describe the minimum and maximum sizes that the - * Window can grow by setting these variables. You can initialize - * any one these to zero, which will mean that you want to duplicate - * the setting for that dimension (if MinWidth == 0, MinWidth will be - * set to the opening Width of the Window). - * You can change these settings later using SetWindowLimits(). - * If you haven't asked for a SIZING Gadget, you don't have to - * initialize any of these variables. - } - - MinWidth, - MinHeight: SmallInt; { minimums } - MaxWidth, - MaxHeight: SmallInt; { maximums } - - { the type variable describes the Screen in which you want this Window to - * open. The type value can either be CUSTOMSCREEN or one of the - * system standard Screen Types such as WBENCHSCREEN. See the - * type definitions under the Screen structure - } - - WType: Word; { is "type" in C includes } - end; - - -{ The following structure is the future NewWindow. Compatibility - * issues require that the size of NewWindow not change. - * Data in the common part (NewWindow) indicates the the extension - * fields are being used. - * NOTE WELL: This structure may be subject to future extension. - * Writing code depending on its size is not allowed. - } - PExtNewWindow = ^TExtNewWindow; - TExtNewWindow = record - LeftEdge, TopEdge : SmallInt; - Width, Height : SmallInt; - - DetailPen, BlockPen : Byte; - IDCMPFlags : LongWord; - Flags : LongWord; - FirstGadget : PGadget; - - CheckMark : PImage; - - Title : PChar; - WScreen : Pointer; - WBitMap : pBitMap; - - MinWidth, MinHeight: SmallInt; - MaxWidth, MaxHeight: Word; - - { the type variable describes the Screen in which you want this Window to - * open. The type value can either be CUSTOMSCREEN or one of the - * system standard Screen Types such as WBENCHSCREEN. See the - * type definitions under the Screen structure. - * A new possible value for this field is PUBLICSCREEN, which - * defines the window as a 'visitor' window. See below for - * additional information provided. - } - WType: Word; - - { ------------------------------------------------------- * - * extensions for V36 - * if the NewWindow Flag value WFLG_NW_EXTENDED is set, then - * this field is assumed to point to an array ( or chain of arrays) - * of TagItem structures. See also ExtNewScreen for another - * use of TagItems to pass optional data. - * - * see below for tag values and the corresponding data. - } - Extension: PTagItem; - end; - -{ - * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow. - * They are values in a TagItem array passed as extension/replacement - * values for the data in NewWindow. OpenWindowTagList() can actually - * work well with a NULL NewWindow pointer. - } - -const - TAG_USER = $80000000; - TAG_DONE = 0; { terminates array of TagItems. ti_Data unused } - TAG_END = TAG_DONE; - WA_Dummy = (TAG_USER + 99); { $80000063 } - - { these tags simply override NewWindow parameters } - WA_Left = (WA_Dummy + $01); - WA_Top = (WA_Dummy + $02); - WA_Width = (WA_Dummy + $03); - WA_Height = (WA_Dummy + $04); - WA_DetailPen = (WA_Dummy + $05); - WA_BlockPen = (WA_Dummy + $06); - WA_IDCMP = (WA_Dummy + $07); - { "bulk" initialization of NewWindow.Flags } - WA_Flags = (WA_Dummy + $08); - WA_Gadgets = (WA_Dummy + $09); - WA_Checkmark = (WA_Dummy + $0A); - WA_Title = (WA_Dummy + $0B); - { means you don't have to call SetWindowTitles - * after you open your window - } - WA_ScreenTitle = (WA_Dummy + $0C); - WA_CustomScreen = (WA_Dummy + $0D); - WA_SuperBitMap = (WA_Dummy + $0E); - { also implies WFLG_SUPER_BITMAP property } - WA_MinWidth = (WA_Dummy + $0F); - WA_MinHeight = (WA_Dummy + $10); - WA_MaxWidth = (WA_Dummy + $11); - WA_MaxHeight = (WA_Dummy + $12); - - { The following are specifications for new features } - - WA_InnerWidth = (WA_Dummy + $13); - WA_InnerHeight = (WA_Dummy + $14); - { You can specify the dimensions of the interior - * region of your window, independent of what - * the border widths will be. You probably want - * to also specify WA_AutoAdjust to allow - * Intuition to move your window or even - * shrink it so that it is completely on screen. - } - - WA_PubScreenName = (WA_Dummy + $15); - { declares that you want the window to open as - * a visitor on the public screen whose name is - * pointed to by (UBYTE * ) ti_Data - } - WA_PubScreen = (WA_Dummy + $16); - { open as a visitor window on the public screen - * whose Pointer is in (struct Screen * ) ti_Data. - * To ensure that this screen remains open, you - * should either be the screen's owner, have a - * window open on the screen, or use LockPubScreen(). - } - WA_PubScreenFallBack = (WA_Dummy + $17); - { A Boolean, specifies whether a visitor window - * should "fall back" to the default public screen - * (or Workbench) if the named public screen isn't - * available - } - WA_WindowName = (WA_Dummy + $18); - { not implemented } - WA_Colors = (WA_Dummy + $19); - { a ColorSpec array for colors to be set - * when this window is active. This is not - * implemented, and may not be, since the default - * values to restore would be hard to track. - * We'd like to at least support per-window colors - * for the mouse pointer sprite. - } - WA_Zoom = (WA_Dummy + $1A); - { ti_Data points to an array of four Word's, - * the initial Left/Top/Width/Height values of - * the "alternate" zoom position/dimensions. - * It also specifies that you want a Zoom gadget - * for your window, whether or not you have a - * sizing gadget. - } - WA_MouseQueue = (WA_Dummy + $1B); - { ti_Data contains initial value for the mouse - * message backlog limit for this window. - } - WA_BackFill = (WA_Dummy + $1C); - { unimplemented at present: provides a "backfill - * hook" for your window's layer. - } - WA_RptQueue = (WA_Dummy + $1D); - { initial value of repeat key backlog limit } - - { These Boolean tag items are alternatives to the NewWindow.Flags - * boolean flags with similar names. - } - WA_SizeGadget = (WA_Dummy + $1E); - WA_DragBar = (WA_Dummy + $1F); - WA_DepthGadget = (WA_Dummy + $20); - WA_CloseGadget = (WA_Dummy + $21); - WA_Backdrop = (WA_Dummy + $22); - WA_ReportMouse = (WA_Dummy + $23); - WA_NoCareRefresh = (WA_Dummy + $24); - WA_Borderless = (WA_Dummy + $25); - WA_Activate = (WA_Dummy + $26); - WA_RMBTrap = (WA_Dummy + $27); - WA_WBenchWindow = (WA_Dummy + $28); { PRIVATE!! } - WA_SimpleRefresh = (WA_Dummy + $29); - { only specify if TRUE } - WA_SmartRefresh = (WA_Dummy + $2A); - { only specify if TRUE } - WA_SizeBRight = (WA_Dummy + $2B); - WA_SizeBBottom = (WA_Dummy + $2C); - - { New Boolean properties } - WA_AutoAdjust = (WA_Dummy + $2D); - { shift or squeeze the window's position and - * dimensions to fit it on screen. - } - - WA_GimmeZeroZero = (WA_Dummy + $2E); - { equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO } - - { New for V37: WA_MenuHelp (ignored by V36) } - WA_MenuHelp = (WA_Dummy + $2F); - { Enables IDCMP_MENUHELP: Pressing HELP during menus - * will return IDCMP_MENUHELP message. - } - - { New for V39: (ignored by V37 and earlier) } - WA_NewLookMenus = (WA_Dummy + $30); - { Set to TRUE if you want NewLook menus } - WA_AmigaKey = (WA_Dummy + $31); - { Pointer to image for Amiga-key equiv in menus } - WA_NotifyDepth = (WA_Dummy + $32); - { Requests IDCMP_CHANGEWINDOW message when - * window is depth arranged - * (imsg->Code = CWCODE_DEPTH) - } - - { WA_Dummy + $33 is obsolete } - - WA_Pointer = (WA_Dummy + $34); - { Allows you to specify a custom pointer - * for your window. ti_Data points to a - * pointer object you obtained via - * "pointerclass". NULL signifies the - * default pointer. - * This tag may be passed to OpenWindowTags() - * or SetWindowPointer(). - } - - WA_BusyPointer = (WA_Dummy + $35); - { ti_Data is boolean. Set to TRUE to - * request the standard busy pointer. - * This tag may be passed to OpenWindowTags() - * or SetWindowPointer(). - } - - WA_PointerDelay = (WA_Dummy + $36); - { ti_Data is boolean. Set to TRUE to - * request that the changing of the - * pointer be slightly delayed. The change - * will be called off if you call NewSetPointer() - * before the delay expires. This allows - * you to post a busy-pointer even if you think - * the busy-time may be very Word, without - * fear of a flashing pointer. - * This tag may be passed to OpenWindowTags() - * or SetWindowPointer(). - } - - WA_TabletMessages = (WA_Dummy + $37); - { ti_Data is a boolean. Set to TRUE to - * request that tablet information be included - * in IntuiMessages sent to your window. - * Requires that something (i.e. a tablet driver) - * feed IESUBCLASS_NEWTABLET InputEvents into - * the system. For a pointer to the TabletData, - * examine the ExtIntuiMessage->eim_TabletData - * field. It is UNSAFE to check this field - * when running on pre-V39 systems. It's always - * safe to check this field under V39 and up, - * though it may be NULL. - } - - WA_HelpGroup = (WA_Dummy + $38); - { When the active window has gadget help enabled, - * other windows of the same HelpGroup number - * will also get GadgetHelp. This allows GadgetHelp - * to work for multi-windowed applications. - * Use GetGroupID() to get an ID number. Pass - * this number as ti_Data to all your windows. - * See also the HelpControl() function. - } - - WA_HelpGroupWindow = (WA_Dummy + $39); - { When the active window has gadget help enabled, - * other windows of the same HelpGroup will also get - * GadgetHelp. This allows GadgetHelp to work - * for multi-windowed applications. As an alternative - * to WA_HelpGroup, you can pass a pointer to any - * other window of the same group to join its help - * group. Defaults to NULL, which has no effect. - * See also the HelpControl() function. - } -WA_ToolBox = (WA_Dummy + 58); - -// AROS specific tags - -WA_Priority = (WA_Dummy + 100); -WA_Parent = (WA_Dummy + 101); -WA_InFrontOf = (WA_Dummy + 102); -WA_Behind = (WA_Dummy + 103); -WA_Visible = (WA_Dummy + 104); -WA_Shape = (WA_Dummy + 105); -WA_ShapeHook = (WA_Dummy + 106); - - -{ HelpControl() flags: - * - * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more - * windows. - } - - HC_GADGETHELP = 1; - - -{ ======================================================================== } -{ === Remember =========================================================== } -{ ======================================================================== } -{ this structure is used for remembering what memory has been allocated to - * date by a given routine, so that a premature abort or systematic exit - * can deallocate memory cleanly, easily, and completely - } - -type - - PRemember = ^TRemember; - - TRemember = record - NextRemember: PRemember; - RememberSize: LongWord; - Memory: Pointer; - end; - - - { === Color Spec ====================================================== } - { How to tell Intuition about RGB values for a color table entry. } - - PColorSpec = ^TColorSpec; - - TColorSpec = record - ColorIndex: SmallInt; { -1 terminates an array of ColorSpec } - Red: Word; { only the _bottom_ 4 bits recognized } - Green: Word; { only the _bottom_ 4 bits recognized } - Blue: Word; { only the _bottom_ 4 bits recognized } - end; - - { === Easy Requester Specification ======================================= } - { see also autodocs for EasyRequest and BuildEasyRequest } - { NOTE: This structure may grow in size in the future } - - PEasyStruct = ^TEasyStruct; - - TEasyStruct = record - es_StructSize: LongWord; { should be sizeof (struct EasyStruct )} - es_Flags: LongWord; { should be 0 for now } - es_Title: PChar; { title of requester window } - es_TextFormat: PChar; { 'printf' style formatting string } - es_GadgetFormat: PChar; { 'printf' style formatting string } - end; - - - -{ ======================================================================== } -{ === Miscellaneous ====================================================== } -{ ======================================================================== } -const - { = MENU STUFF =========================================================== } - NOMENU = $001F; - NOITEM = $003F; - NOSUB = $001F; - MENUNULL = -1; - - - { = =RJ='s peculiarities ================================================= } - -{ these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT, - * I'll use a generic Width (for all resolutions) for the CheckMark. - * If COMMSEQ, likewise I'll use this generic stuff - } - - CHECKWIDTH = 19; - COMMWIDTH = 27; - LOWCHECKWIDTH = 13; - LOWCOMMWIDTH = 16; - -{ these are the AlertNumber defines. if you are calling DisplayAlert() - * the AlertNumber you supply must have the ALERT_TYPE bits set to one - * of these patterns - } - - ALERT_TYPE = $80000000; - RECOVERY_ALERT = $00000000; { the system can recover from this } - DEADEND_ALERT = $80000000; { no recovery possible, this is it } - - -{ When you're defining IntuiText for the Positive and Negative Gadgets - * created by a call to AutoRequest(), these defines will get you - * reasonable-looking text. The only field without a define is the IText - * field; you decide what text goes with the Gadget - } - - AUTOFRONTPEN = 0; - AUTOBACKPEN = 1; - AUTODRAWMODE = JAM2; - AUTOLEFTEDGE = 6; - AUTOTOPEDGE = 3; - -{ - - AUTOITEXTFONT = Nil; - AUTONEXTTEXT = Nil; -- } - - - { --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- } - - - SELECTUP = IECODE_LBUTTON + IECODE_UP_PREFIX; - SELECTDOWN = IECODE_LBUTTON; - MENUUP = IECODE_RBUTTON + IECODE_UP_PREFIX; - MENUDOWN = IECODE_RBUTTON; - ALTLEFT = IEQUALIFIER_LALT; - ALTRIGHT = IEQUALIFIER_RALT; - AMIGALEFT = IEQUALIFIER_LCOMMAND; - AMIGARIGHT = IEQUALIFIER_RCOMMAND; - AMIGAKEYS = AMIGALEFT + AMIGARIGHT; - - CURSORUP = $4C; - CURSORLEFT = $4F; - CURSORRIGHT = $4E; - CURSORDOWN = $4D; - KEYCODE_Q = $10; - KEYCODE_X = $32; - KEYCODE_N = $36; - KEYCODE_M = $37; - KEYCODE_V = $34; - KEYCODE_B = $35; - KEYCODE_LESS = $38; - KEYCODE_GREATER = $39; - -{ these are the display modes for which we have corresponding parameter - * settings in the config arrays - } -const - DMODECOUNT = $0002; { how many modes there are } - HIRESPICK = $0000; - LOWRESPICK = $0001; - - EVENTMAX = 10; { size of event array } - - { these are the system Gadget defines } - RESCOUNT = 2; - HIRESGADGET = 0; - LOWRESGADGET = 1; - - GADGETCOUNT = 8; - UPFRONTGADGET = 0; - DOWNBACKGADGET = 1; - SIZEGADGET = 2; - CLOSEGADGET = 3; - DRAGGADGET = 4; - SUPFRONTGADGET = 5; - SDOWNBACKGADGET = 6; - SDRAGGADGET = 7; - - -{ ======================================================================== } -{ === DrawInfo ========================================================= } -{ ======================================================================== } - -{ This is a packet of information for graphics rendering. It originates - * with a Screen, and is gotten using GetScreenDrawInfo( screen ); - } - -{ If you find dri_Version >= DRI_VERSION, you know this structure - * has at least the fields defined in this version of the include file - } -const - RI_VERSION = (1); { obsolete, will be removed } - DRI_VERSION = (1); - -type - - PDrawInfo = ^TDrawInfo; - - TDrawInfo = record - dri_Version: Word; { will be DRI_VERSION } - dri_NumPens: Word; { guaranteed to be >= numDrIPens } - dri_Pens: Pointer; { pointer to pen array } - - dri_Font: PTextFont; { screen default font } - dri_Depth: Word; { (initial) depth of screen bitmap } - - dri_Resolution: record { from DisplayInfo database for initial display mode } - x: Word; - y: Word; - end; - - dri_Flags: LongWord; { defined below } - { New for V39: dri_CheckMark, dri_AmigaKey. } - dri_CheckMark: PImage; { ImagePtr } { pointer to scaled checkmark image - * Will be NULL if DRI_VERSION < 2 - } - dri_AmigaKey: PImage; { ImagePtr } { pointer to scaled Amiga-key image - * Will be NULL if DRI_VERSION < 2 - } - - dri_Reserved: array[0..4] of LongWord; { avoid recompilation ;^) } - end; - -const - DRIF_NEWLOOK = $00000001; { specified SA_Pens, full treatment } - - { rendering pen number indexes into DrawInfo.dri_Pens[] } - DETAILPEN = ($0000); { compatible Intuition rendering pens } - BLOCKPEN = ($0001); { compatible Intuition rendering pens } - TEXTPEN = ($0002); { text on background } - SHINEPEN = ($0003); { bright edge on 3D objects } - SHADOWPEN = ($0004); { dark edge on 3D objects } - FILLPEN = ($0005); { active-window/selected-gadget fill } - FILLTEXTPEN = ($0006); { text over FILLPEN } - BACKGROUNDPEN = ($0007); { always color 0 } - HIGHLIGHTTEXTPEN = ($0008); { special color text, on background } - { New for V39, only present if DRI_VERSION >= 2: } - BARDETAILPEN = ($0009); { text/detail in screen-bar/menus } - BARBLOCKPEN = ($000A); { screen-bar/menus fill } - BARTRIMPEN = ($000B); { trim under screen-bar } - - NUMDRIPENS = ($0009); - -{ New for V39: It is sometimes useful to specify that a pen value - * is to be the complement of color zero to three. The "magic" numbers - * serve that purpose: - } - PEN_C3 = $FEFC; { Complement of color 3 } - PEN_C2 = $FEFD; { Complement of color 2 } - PEN_C1 = $FEFE; { Complement of color 1 } - PEN_C0 = $FEFF; { Complement of color 0 } - -{ ======================================================================== } -{ === Screen ============================================================= } -{ ======================================================================== } - -type - - PScreen = ^TScreen; - - TScreen = record - NextScreen: PScreen; { linked list of screens } - FirstWindow: PWindow; { linked list Screen's Windows } - - LeftEdge, - TopEdge: SmallInt; { parameters of the screen } - Width, - Height: SmallInt; { parameters of the screen } - - MouseY, - MouseX: SmallInt; { position relative to upper-left } - - Flags: Word; { see definitions below } - - Title: PChar; { null-terminated Title text } - DefaultTitle: PChar; { for Windows without ScreenTitle } - - { Bar sizes for this Screen and all Window's in this Screen } - BarHeight, - BarVBorder, - BarHBorder, - MenuVBorder, - MenuHBorder: ShortInt; - WBorTop, - WBorLeft, - WBorRight, - WBorBottom: ShortInt; - - Font: PTextAttr; { this screen's default font } - - { the display data structures for this Screen (note the prefix S)} - ViewPort: TViewPort; { describing the Screen's display } - RastPort: TRastPort; { describing Screen rendering } - BitMap: TBitMap; { extra copy of RastPort BitMap } - LayerInfo: TLayer_Info; { each screen gets a LayerInfo } - - { You supply a linked-list of Gadgets for your Screen. - * This list DOES NOT include system Gadgets. You get the standard - * system Screen Gadgets by default - } - - FirstGadget: PGadget; - - DetailPen, - BlockPen: Byte; { for bar/border/gadget rendering } - - { the following variable(s) are maintained by Intuition to support the - * DisplayBeep() color flashing technique - } - SaveColor0: Word; - - { This layer is for the Screen and Menu bars } - BarLayer: PLayer; - - ExtData: Pointer; - UserData: Pointer; - { general-purpose pointer to User data extension } - {**** Data below this point are SYSTEM PRIVATE ****} - - end; - -const - -{ The screen flags have the suffix "_f" added to avoid conflicts with - routine names. } - - { --- FLAGS SET BY INTUITION --------------------------------------------- } -{ The SCREENTYPE bits are reserved for describing various Screen types - * available under Intuition. - } - SCREENTYPE_f = $000F; { all the screens types available } - { --- the definitions for the Screen type ------------------------------- } - WBENCHSCREEN_f = $0001; { Ta Da! The Workbench } - CUSTOMSCREEN_f = $000F; { for that special look } - - SHOWTITLE_f = $0010; { this gets set by a call to ShowTitle() } - - BEEPING_f = $0020; { set when Screen is beeping } - - CUSTOMBITMAP_f = $0040; { if you are supplying your own BitMap } - - SCREENBEHIND_f = $0080; { if you want your screen to open behind - * already open screens - } - SCREENQUIET_f = $0100; { if you do not want Intuition to render - * into your screen (gadgets, title) } - SCREENHIRES = $0200; { do no use lowres gadgets (private) } - - NS_EXTENDED = $1000; { ExtNewScreen.Extension is valid } - { V36 applications can use OpenScreenTagList() instead of NS_EXTENDED } - - { New for V39: } - PENSHARED = $0400; { Screen opener set (SA_SharePens,TRUE) } - - - AUTOSCROLL = $4000; { screen is to autoscoll } - - STDSCREENHEIGHT = -1; { supply in NewScreen.Height } - STDSCREENWIDTH = -1; { supply in NewScreen.Width } - - - -{ - * Screen attribute tag ID's. These are used in the ti_Tag field of - * TagItem arrays passed to OpenScreenTagList() (or in the - * ExtNewScreen.Extension field). - } - -{ Screen attribute tags. Please use these versions, not those in - * iobsolete.h. - } -const - SA_Dummy = (TAG_USER + 32); -{ - * these items specify items equivalent to fields in NewScreen - } - SA_Left = (SA_Dummy + $0001); - SA_Top = (SA_Dummy + $0002); - SA_Width = (SA_Dummy + $0003); - SA_Height = (SA_Dummy + $0004); - { traditional screen positions and dimensions } - SA_Depth = (SA_Dummy + $0005); - { screen bitmap depth } - SA_DetailPen = (SA_Dummy + $0006); - { serves as default for windows, too } - SA_BlockPen = (SA_Dummy + $0007); - SA_Title = (SA_Dummy + $0008); - { default screen title } - SA_Colors = (SA_Dummy + $0009); - { ti_Data is an array of struct ColorSpec, - * terminated by ColorIndex = -1. Specifies - * initial screen palette colors. - } - SA_ErrorCode = (SA_Dummy + $000A); - { ti_Data points to LONG error code (values below)} - SA_Font = (SA_Dummy + $000B); - { equiv. to NewScreen.Font } - SA_SysFont = (SA_Dummy + $000C); - { Selects one of the preferences system fonts: - * 0 - old DefaultFont, fixed-width - * 1 - WB Screen preferred font - } - SA_Type = (SA_Dummy + $000D); - { equiv. to NewScreen.type } - SA_BitMap = (SA_Dummy + $000E); - { ti_Data is pointer to custom BitMap. This - * implies type of CUSTOMBITMAP - } - SA_PubName = (SA_Dummy + $000F); - { presence of this tag means that the screen - * is to be a public screen. Please specify - * BEFORE the two tags below - } - SA_PubSig = (SA_Dummy + $0010); - SA_PubTask = (SA_Dummy + $0011); - { Task ID and signal for being notified that - * the last window has closed on a public screen. - } - SA_DisplayID = (SA_Dummy + $0012); - { ti_Data is new extended display ID from - * . - } - SA_DClip = (SA_Dummy + $0013); - { ti_Data points to a rectangle which defines - * screen display clip region - } - SA_Overscan = (SA_Dummy + $0014); - { was S_STDDCLIP. Set to one of the OSCAN_ - * specifiers below to get a system standard - * overscan region for your display clip, - * screen dimensions (unless otherwise specified), - * and automatically centered position (partial - * support only so far). - * If you use this, you shouldn't specify - * SA_DClip. SA_Overscan is for "standard" - * overscan dimensions, SA_DClip is for - * your custom numeric specifications. - } - SA_Obsolete1 = (SA_Dummy + $0015); - { obsolete S_MONITORNAME } - - {* booleans *} - SA_ShowTitle = (SA_Dummy + $0016); - { boolean equivalent to flag SHOWTITLE } - SA_Behind = (SA_Dummy + $0017); - { boolean equivalent to flag SCREENBEHIND } - SA_Quiet = (SA_Dummy + $0018); - { boolean equivalent to flag SCREENQUIET } - SA_AutoScroll = (SA_Dummy + $0019); - { boolean equivalent to flag AUTOSCROLL } - SA_Pens = (SA_Dummy + $001A); - { pointer to ~0 terminated UWORD array, as - * found in struct DrawInfo - } - SA_FullPalette = (SA_Dummy + $001B); - { boolean: initialize color table to entire - * preferences palette (32 for V36), rather - * than compatible pens 0-3, 17-19, with - * remaining palette as returned by GetColorMap() - } - - SA_ColorMapEntries = (SA_Dummy + $001C); - { New for V39: - * Allows you to override the number of entries - * in the ColorMap for your screen. Intuition - * normally allocates (1<dri_Pens, - * Intuition obtains them in shared mode (see - * graphics.library/ObtainPen()). For compatibility, - * Intuition obtains the other pens of a public - * screen as PEN_EXCLUSIVE. Screens that wish to - * manage the pens themselves should generally set - * this tag to TRUE. This instructs Intuition to - * leave the other pens unallocated. - } - - SA_BackFill = (SA_Dummy + $0021); - { New for V39: - * provides a "backfill hook" for your screen's - * Layer_Info. - * See layers.library/InstallLayerInfoHook() - } - - SA_Interleaved = (SA_Dummy + $0022); - { New for V39: - * Boolean tag requesting that the bitmap - * allocated for you be interleaved. - * (Defaults to FALSE). - } - - SA_Colors32 = (SA_Dummy + $0023); - { New for V39: - * Tag to set the screen's initial palette colors - * at 32 bits-per-gun. ti_Data is a pointer - * to a table to be passed to the - * graphics.library/LoadRGB32() function. - * This format supports both runs of color - * registers and sparse registers. See the - * autodoc for that function for full details. - * Any color set here has precedence over - * the same register set by SA_Colors. - } - - SA_VideoControl = (SA_Dummy + $0024); - { New for V39: - * ti_Data is a pointer to a taglist that Intuition - * will pass to graphics.library/VideoControl(), - * upon opening the screen. - } - - SA_FrontChild = (SA_Dummy + $0025); - { New for V39: - * ti_Data is a pointer to an already open screen - * that is to be the child of the screen being - * opened. The child screen will be moved to the - * front of its family. - } - - SA_BackChild = (SA_Dummy + $0026); - { New for V39: - * ti_Data is a pointer to an already open screen - * that is to be the child of the screen being - * opened. The child screen will be moved to the - * back of its family. - } - - SA_LikeWorkbench = (SA_Dummy + $0027); - { New for V39: - * Set ti_Data to 1 to request a screen which - * is just like the Workbench. This gives - * you the same screen mode, depth, size, - * colors, etc., as the Workbench screen. - } - - SA_Reserved = (SA_Dummy + $0028); - { Reserved for private Intuition use } - - SA_MinimizeISG = (SA_Dummy + $0029); - { New for V40: - * For compatibility, Intuition always ensures - * that the inter-screen gap is at least three - * non-interlaced lines. If your application - * would look best with the smallest possible - * inter-screen gap, set ti_Data to TRUE. - * If you use the new graphics VideoControl() - * VC_NoColorPaletteLoad tag for your screen's - * ViewPort, you should also set this tag. - } - - -{ this is an obsolete tag included only for compatibility with V35 - * interim release for the A2024 and Viking monitors - } - NSTAG_EXT_VPMODE = (TAG_USER + 1); - - -{ OpenScreen error codes, which are returned in the (optional) LONG - * pointed to by ti_Data for the SA_ErrorCode tag item - } - OSERR_NOMONITOR = (1); { named monitor spec not available } - OSERR_NOCHIPS = (2); { you need newer custom chips } - OSERR_NOMEM = (3); { couldn't get normal memory } - OSERR_NOCHIPMEM = (4); { couldn't get chipmem } - OSERR_PUBNOTUNIQUE = (5); { public screen name already used } - OSERR_UNKNOWNMODE = (6); { don't recognize mode asked for } - -{ ======================================================================== } -{ === NewScreen ========================================================== } -{ ======================================================================== } - -type - - PNewScreen = ^TNewScreen; - - TNewScreen = record - LeftEdge, - TopEdge, - Width, - Height, - Depth: SmallInt; { screen dimensions } - - DetailPen, - BlockPen: Byte; { for bar/border/gadget rendering } - - ViewModes: Word; { the Modes for the ViewPort (and View) } - - SType: Word; { the Screen type (see defines above) } - - Font: PTextAttr; { this Screen's default text attributes } - - DefaultTitle: PChar; { the default title for this Screen } - - Gadgets: PGadget; { your own Gadgets for this Screen } - - { if you are opening a CUSTOMSCREEN and already have a BitMap - * that you want used for your Screen, you set the flags CUSTOMBITMAP in - * the type field and you set this variable to point to your BitMap - * structure. The structure will be copied into your Screen structure, - * after which you may discard your own BitMap if you want - } - - CustomBitMap: PBitMap; - end; - - -type - - PExtNewScreen = ^TExtNewScreen; - - TExtNewScreen = record - LeftEdge, TopEdge, Width, Height, Depth: SmallInt; - DetailPen, BlockPen: Byte; - ViewModes: Word; - ens_Type: Word; { type in C-Includes } - Font: PTextAttr; - DefaultTitle: PChar; - Gadgets: PGadget; - CustomBitMap: PBitMap; - Extension: PTagItem; - end; - - -const - { === Overscan Types === } - OSCAN_TEXT = (1); { entirely visible } - OSCAN_STANDARD = (2); { just past edges } - OSCAN_MAX = (3); { as much as possible } - OSCAN_VIDEO = (4); { even more than is possible } - - -{ === Public Shared Screen Node === } - -{ This is the representative of a public shared screen. - * This is an internal data structure, but some functions may - * present a copy of it to the calling application. In that case, - * be aware that the screen pointer of the structure can NOT be - * used safely, since there is no guarantee that the referenced - * screen will remain open and a valid data structure. - * - * Never change one of these. - } - -type - PPubScreenNode = ^TPubScreenNode; - - TPubScreenNode = record - psn_Node: TNode; { ln_Name is screen name } - psn_Screen: PScreen; - psn_Flags: Word; { below } - psn_Size: SmallInt; { includes name buffer } - psn_VisitorCount: SmallInt; { how many visitor windows } - psn_SigTask: PTask; { who to signal when visitors gone } - psn_SigBit: Byte; { which signal } - end; - -const - PSNF_PRIVATE = ($0001); - - MAXPUBSCREENNAME = (139); { names no longer, please } - - { pub screen modes } - SHANGHAI = $0001; { put workbench windows on pub screen } - POPPUBSCREEN = $0002; { pop pub screen to front when visitor opens } - -{ New for V39: Intuition has new screen depth-arrangement and movement - * functions called ScreenDepth() and ScreenPosition() respectively. - * These functions permit the old behavior of ScreenToFront(), - * ScreenToBack(), and MoveScreen(). ScreenDepth() also allows - * independent depth control of attached screens. ScreenPosition() - * optionally allows positioning screens even though they were opened - * (SA_Draggable,FALSE). - } - -{ For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK, - * and optionally also SDEPTH_INFAMILY. - * - * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify - * SDEPTH_INFAMILY. Commodities, "input helper" programs, - * or any other program that did not open a screen should never - * use that flag. (Note that this is a style-behavior - * requirement; there is no technical requirement that the - * task calling this function need be the task which opened - * the screen). - } - - SDEPTH_TOFRONT = (0); { Bring screen to front } - SDEPTH_TOBACK = (1); { Send screen to back } - SDEPTH_INFAMILY = (2); { Move an attached screen with - * respect to other screens of - * its family - } - - { Here's an obsolete name equivalent to SDEPTH_INFAMILY: } - SDEPTH_CHILDONLY = SDEPTH_INFAMILY; - - -{ For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE, - * or SPOS_MAKEVISIBLE to describe the kind of screen positioning you - * wish to perform: - * - * SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe - * the offset in coordinates you wish to move the screen by. - * SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe - * the absolute coordinates you wish to move the screen to. - * SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the - * screen which you would like autoscrolled into view. - * - * You may additionally set SPOS_FORCEDRAG along with any of the - * above. Set this if you wish to reposition an (SA_Draggable,FALSE) - * screen that you opened. - * - * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify - * SPOS_FORCEDRAG. Commodities, "input helper" programs, - * or any other program that did not open a screen should never - * use that flag. - } - - SPOS_RELATIVE = (0); { Coordinates are relative } - - SPOS_ABSOLUTE = (1); { Coordinates are expressed as - * absolutes, not relatives. - } - - SPOS_MAKEVISIBLE = (2); { Coordinates describe a box on - * the screen you wish to be - * made visible by autoscrolling - } - - SPOS_FORCEDRAG = (4); { Move non-draggable screen } - -{ New for V39: Intuition supports double-buffering in screens, - * with friendly interaction with menus and certain gadgets. - * For each buffer, you need to get one of these structures - * from the AllocScreenBuffer() call. Never allocate your - * own ScreenBuffer structures! - * - * The sb_DBufInfo field is for your use. See the graphics.library - * AllocDBufInfo() autodoc for details. - } -type - - PScreenBuffer = ^TScreenBuffer; - - TScreenBuffer = record - sb_BitMap: PBitMap; { BitMap of this buffer } - sb_DBufInfo: PDBufInfo; { DBufInfo for this buffer } - end; - -const -{ These are the flags that may be passed to AllocScreenBuffer(). - } - SB_SCREEN_BITMAP = 1; - SB_COPY_BITMAP = 2; - - -{ ======================================================================== } -{ === Preferences ======================================================== } -{ ======================================================================== } - -const - - { these are the definitions for the printer configurations } - FILENAME_SIZE = 30; { Filename size } - - POINTERSIZE = (1 + 16 + 1) * 2; { Size of Pointer data buffer } - -{ These defines are for the default font size. These actually describe the - * height of the defaults fonts. The default font type is the topaz - * font, which is a fixed width font that can be used in either - * eighty-column or sixty-column mode. The Preferences structure reflects - * which is currently selected by the value found in the variable FontSize, - * which may have either of the values defined below. These values actually - * are used to select the height of the default font. By changing the - * height, the resolution of the font changes as well. - } - TOPAZ_EIGHTY = 8; - TOPAZ_SIXTY = 9; - -type - - PPreferences = ^TPreferences; - - TPreferences = record - { the default font height } - FontHeight: ShortInt; { height for system default font } - - { constant describing what's hooked up to the port } - PrinterPort: Byte; { printer port connection } - - { the baud rate of the port } - BaudRate: Word; { baud rate for the serial port } - - { various timing rates } - KeyRptSpeed: ttimeval; { repeat speed for keyboard } - KeyRptDelay: ttimeval; { Delay before keys repeat } - DoubleClick: ttimeval; { Interval allowed between clicks } - - { Intuition Pointer data } - PointerMatrix: array [0..POINTERSIZE - 1] of Word; - { Definition of pointer sprite } - XOffset: ShortInt; { X-Offset for active 'bit' } - YOffset: ShortInt; { Y-Offset for active 'bit' } - color17: Word; {*********************************} - color18: Word; { Colours for sprite pointer } - color19: Word; {*********************************} - PointerTicks: Word; { Sensitivity of the pointer } - - { Workbench Screen colors } - color0: Word; {*********************************} - color1: Word; { Standard default colours } - color2: Word; { Used in the Workbench } - color3: Word; {*********************************} - - { positioning data for the Intuition View } - ViewXOffset: ShortInt; { Offset for top lefthand corner } - ViewYOffset: ShortInt; { X and Y dimensions } - ViewInitX, - ViewInitY: SmallInt; { View initial offset values } - - EnableCLI: boolean; { CLI availability switch } - - { printer configurations } - PrinterType: Word; { printer type } - PrinterFilename: array [0..FILENAME_SIZE - 1] of char; - { file for printer } - - { print format and quality configurations } - PrintPitch: Word; { print pitch } - PrintQuality: Word; { print quality } - PrintSpacing: Word; { number of lines per inch } - PrintLeftMargin: Word; { left margin in characters } - PrintRightMargin: Word; { right margin in characters } - PrintImage: Word; { positive or negative } - PrintAspect: Word; { horizontal or vertical } - PrintShade: Word; { b&w, half-tone, or color } - PrintThreshold: SmallInt; { darkness ctrl for b/w dumps } - - { print paper descriptors } - PaperSize: Word; { paper size } - PaperLength: Word; { paper length in number of lines } - PaperType: Word; { continuous or single sheet } - - { Serial device settings: These are six nibble-fields in three bytes } - { (these look a little strange so the defaults will map out to zero) } - SerRWBits: Byte; - { upper nibble = (8-number of read bits) } - { lower nibble = (8-number of write bits) } - SerStopBuf: Byte; - { upper nibble = (number of stop bits - 1) } - { lower nibble = (table value for BufSize) } - SerParShk: Byte; - { upper nibble = (value for Parity setting) } - { lower nibble = (value for Handshake mode) } - LaceWB: Byte; { if workbench is to be interlaced } - - WorkName: array [0..FILENAME_SIZE - 1] of char; - { temp file for printer } - - RowSizeChange: ShortInt; - ColumnSizeChange: ShortInt; - - PrintFlags: Word; { user preference flags } - PrintMaxWidth: Word; { max width of printed picture in 10ths/inch } - PrintMaxHeight: Word; { max height of printed picture in 10ths/inch } - PrintDensity: Byte; { print density } - PrintXOffset: Byte; { offset of printed picture in 10ths/inch } - - wb_Width: Word; { override default workbench width } - wb_Height: Word; { override default workbench height } - wb_Depth: Byte; { override default workbench depth } - - ext_size: Byte; { extension information -- do not touch! } - { extension size in blocks of 64 bytes } - end; - -const - - { Workbench Interlace (use one bit) } - LACEWB = $01; - LW_RESERVED = 1; { internal use only } - - { PrinterPort } - PARALLEL_PRINTER = $00; - SERIAL_PRINTER = $01; - - { BaudRate } - BAUD_110 = $00; - BAUD_300 = $01; - BAUD_1200 = $02; - BAUD_2400 = $03; - BAUD_4800 = $04; - BAUD_9600 = $05; - BAUD_19200 = $06; - BAUD_MIDI = $07; - - { PaperType } - FANFOLD = $00; - single = $80; - - { PrintPitch } - PICA = $000; - ELITE = $400; - FINE = $800; - - { PrintQuality } - DRAFT = $000; - LETTER = $100; - - { PrintSpacing } - SIX_LPI = $000; - EIGHT_LPI = $200; - - { Print Image } - IMAGE_POSITIVE = $00; - IMAGE_NEGATIVE = $01; - - { PrintAspect } - ASPECT_HORIZ = $00; - ASPECT_VERT = $01; - - { PrintShade } - SHADE_BW = $00; - SHADE_GREYSCALE = $01; - SHADE_COLOR = $02; - - { PaperSize } - US_LETTER = $00; - US_LEGAL = $10; - N_TRACTOR = $20; - W_TRACTOR = $30; - CUSTOM_PAPER = $40; - - { New PaperSizes for V36: } - EURO_A0 = $50; { European size A0: 841 x 1189 } - EURO_A1 = $60; { European size A1: 594 x 841 } - EURO_A2 = $70; { European size A2: 420 x 594 } - EURO_A3 = $80; { European size A3: 297 x 420 } - EURO_A4 = $90; { European size A4: 210 x 297 } - EURO_A5 = $A0; { European size A5: 148 x 210 } - EURO_A6 = $B0; { European size A6: 105 x 148 } - EURO_A7 = $C0; { European size A7: 74 x 105 } - EURO_A8 = $D0; { European size A8: 52 x 74 } - - { PrinterType } - CUSTOM_NAME = $00; - ALPHA_P_101 = $01; - BROTHER_15XL = $02; - CBM_MPS1000 = $03; - DIAB_630 = $04; - DIAB_ADV_D25 = $05; - DIAB_C_150 = $06; - EPSON = $07; - EPSON_JX_80 = $08; - OKIMATE_20 = $09; - QUME_LP_20 = $0A; - { new printer entries, 3 October 1985 } - HP_LASERJET = $0B; - HP_LASERJET_PLUS = $0C; - - { Serial Input Buffer Sizes } - SBUF_512 = $00; - SBUF_1024 = $01; - SBUF_2048 = $02; - SBUF_4096 = $03; - SBUF_8000 = $04; - SBUF_16000 = $05; - - { Serial Bit Masks } - SREAD_BITS = $F0; { for SerRWBits } - SWRITE_BITS = $0F; - - SSTOP_BITS = $F0; { for SerStopBuf } - SBUFSIZE_BITS = $0F; - - SPARITY_BITS = $F0; { for SerParShk } - SHSHAKE_BITS = $0F; - -{ Serial Parity (upper nibble, after being shifted by - * macro SPARNUM() ) - } - SPARITY_NONE = 0; - SPARITY_EVEN = 1; - SPARITY_ODD = 2; - -{ Serial Handshake Mode (lower nibble, after masking using - * macro SHANKNUM() ) - } - SHSHAKE_XON = 0; - SHSHAKE_RTS = 1; - SHSHAKE_NONE = 2; - - { new defines for PrintFlags } - - CORRECT_RED = $0001; { color correct red shades } - CORRECT_GREEN = $0002; { color correct green shades } - CORRECT_BLUE = $0004; { color correct blue shades } - - CENTER_IMAGE = $0008; { center image on paper } - - IGNORE_DIMENSIONS = $0000; { ignore max width/height settings } - BOUNDED_DIMENSIONS = $0010; { use max width/height as boundaries } - ABSOLUTE_DIMENSIONS = $0020; { use max width/height as absolutes } - PIXEL_DIMENSIONS = $0040; { use max width/height as prt pixels } - MULTIPLY_DIMENSIONS = $0080; { use max width/height as multipliers } - - INTEGER_SCALING = $0100; { force integer scaling } - - ORDERED_DITHERING = $0000; { ordered dithering } - HALFTONE_DITHERING = $0200; { halftone dithering } - FLOYD_DITHERING = $0400; { Floyd-Steinberg dithering } - - ANTI_ALIAS = $0800; { anti-alias image } - GREY_SCALE2 = $1000; { for use with hi-res monitor } - - { masks used for checking bits } - - CORRECT_RGB_MASK = CORRECT_RED + CORRECT_GREEN + CORRECT_BLUE; - DIMENSIONS_MASK = BOUNDED_DIMENSIONS + ABSOLUTE_DIMENSIONS + - PIXEL_DIMENSIONS + MULTIPLY_DIMENSIONS; - DITHERING_MASK = HALFTONE_DITHERING + FLOYD_DITHERING; - - - - -{ ======================================================================== } -{ === IntuitionBase ====================================================== } -{ ======================================================================== } -{ - * Be sure to protect yourself against someone modifying these data as - * you look at them. This is done by calling: - * - * lock = LockIBase(0), which returns an Integer. When done call - * UnlockIBase(lock) where lock is what LockIBase() returned. - } - -type - - PIntuitionBase = ^TIntuitionBase; - - TIntuitionBase = record - { IntuitionBase should never be directly modified by programs } - { even a little bit, guys/gals; do you hear me? } - - LibNode: TLibrary; - - ViewLord: tView; - - ActiveWindow: PWindow; - ActiveScreen: PScreen; - - { the FirstScreen variable points to the frontmost Screen. Screens are - * then maintained in a front to back order using Screen.NextScreen - } - - FirstScreen: PScreen; { for linked list of all screens } - - Flags: LongWord; { see definitions below } - MouseY, - MouseX: SmallInt; { mouse position relative to View } - - Seconds: LongWord; { timestamp of most current input event } - Micros: LongWord; { timestamp of most current input event } - - { I told you this was private. - * The data beyond this point has changed, is changing, and - * will continue to change. - } - - end; - - -{ - * Package of information passed to custom and 'boopsi' - * gadget 'hook' functions. This structure is READ ONLY. - } -type - - PGadgetInfo = ^TGadgetInfo; - - TGadgetInfo = record - gi_Screen: PScreen; { ScreenPtr } - gi_Window: PWindow; - { null for screen gadgets }{ WindowPtr } - gi_Requester: PRequester; - { null IF not GTYP_REQGADGET }{ RequesterPtr } - - { rendering information: - * don't use these without cloning/locking. - * Official way is to call ObtainRPort() - } - gi_RastPort: PRastPort; { RastPortPtr } - gi_Layer: pLayer; { LayerPtr } - - { copy of dimensions of screen/window/g00/req(/group) - * that gadget resides in. Left/Top of this box is - * offset from window mouse coordinates to gadget coordinates - * screen gadgets: 0,0 (from screen coords) - * window gadgets (no g00): 0,0 - * GTYP_GZZGADGETs (borderlayer): 0,0 - * GZZ innerlayer gadget: borderleft, bordertop - * Requester gadgets: reqleft, reqtop - } - gi_Domain: TIBox; - - gi_Pens: record - DetailPen: Byte; - BlockPen: Byte; - end; - - { the Detail and Block pens in gi_DrInfo->dri_Pens[] are - * for the screen. Use the above for window-sensitive - * colors. - } - gi_DrInfo: PDrawInfo; { DrawInfoPtr } - - { reserved space: this structure is extensible - * anyway, but using these saves some recompilation - } - gi_Reserved: array[0..5] of LongWord; - end; - - {** system private data structure for now **} - { prop gadget extra info } - - PPGX = ^TPGX; - - TPGX = record - pgx_Container: TIBox; - pgx_NewKnob: TIBox; - end; - -{ this casts MutualExclude for easy assignment of a hook - * pointer to the unused MutualExclude field of a custom gadget - } - -{** User visible handles on objects, classes, messages **} -type - Object_ = LongWord; - PObject_ = ^Object_; - ClassID = ^Byte; - -{ - you can use this type to point to a 'generic' message, - * in the object-oriented programming parlance. Based on - * the value of 'MethodID', you dispatch to processing - * for the various message types. The meaningful parameter - * packet structure definitions are defined below. - -typedef struct - LongWord MethodID; - method-specific data follows, some examples below - *Msg; } - - PMsg = ^TMsg; - - TMsg = record - MethodID: LongWord; - end; - -{ - * Class id strings for Intuition classes. - * There's no real reason to use the uppercase constants - * over the lowercase strings, but this makes a good place - * to list the names of the built-in classes. - } -const - ROOTCLASS: PChar = 'rootclass'; { classusr.h } - IMAGECLASS: PChar = 'imageclass'; { imageclass.h } - FRAMEICLASS: PChar = 'frameiclass'; - SYSICLASS: PChar = 'sysiclass'; - FILLRECTCLASS: PChar = 'fillrectclass'; - GADGETCLASS: PChar = 'gadgetclass'; { gadgetclass.h } - PROPGCLASS: PChar = 'propgclass'; - STRGCLASS: PChar = 'strgclass'; - BUTTONGCLASS: PChar = 'buttongclass'; - FRBUTTONCLASS: PChar = 'frbuttonclass'; - GROUPGCLASS: PChar = 'groupgclass'; - ICCLASS: PChar = 'icclass'; { icclass.h } - MODELCLASS: PChar = 'modelclass'; - ITEXTICLASS: PChar = 'itexticlass'; - POINTERCLASS: PChar = 'pointerclass'; { pointerclass.h } - - -{ Dispatched method ID's - * NOTE: Applications should use Intuition entry points, not direct - * DoMethod() calls, for NewObject, DisposeObject, SetAttrs, - * SetGadgetAttrs, and GetAttr. - } - - OM_Dummy = ($100); - OM_NEW = ($101); { 'object' parameter is 'true class' } - OM_DISPOSE = ($102); { delete self (no parameters) } - OM_SET = ($103); { set attributes (in tag list) } - OM_GET = ($104); { return single attribute value } - OM_ADDTAIL = ($105); { add self to a List (let root do it) } - OM_REMOVE = ($106); { remove self from list } - OM_NOTIFY = ($107); { send to self: notify dependents } - OM_UPDATE = ($108); { notification message from somebody } - OM_ADDMEMBER = ($109); { used by various classes with lists } - OM_REMMEMBER = ($10A); { used by various classes with lists } - -{ Parameter 'Messages' passed to methods } - -{ OM_NEW and OM_SET } -type - PopSet = ^TopSet; - - TopSet = record - MethodID: LongWord; - ops_AttrList: PTagItem; { new attributes } - ops_GInfo: PGadgetInfo; { always there for gadgets, - * when SetGadgetAttrs() is used, - * but will be NULL for OM_NEW - } - end; - - { OM_NOTIFY, and OM_UPDATE } - - PopUpdate = ^TopUpdate; - - TopUpdate = record - MethodID: LongWord; - opu_AttrList: PTagItem; { new attributes } - opu_GInfo: PGadgetInfo; { non-NULL when SetGadgetAttrs OR - * notification resulting from gadget - * input occurs. - } - opu_Flags: LongWord; { defined below } - end; - -{ this flag means that the update message is being issued from - * something like an active gadget, a la GACT_FOLLOWMOUSE. When - * the gadget goes inactive, it will issue a final update - * message with this bit cleared. Examples of use are for - * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes - * for buttons. - } -const - OPUF_INTERIM = 1; - -{ OM_GET } -type - - popGet = ^topGet; - - topGet = record - MethodID, - opg_AttrID: LongWord; - opg_Storage: Pointer; { may be other types, but 'int' - * types are all LongWord - } - end; - - { OM_ADDTAIL } - - PopAddTail = ^TopAddTail; - - TopAddTail = record - MethodID: LongWord; - opat_List: pList; - end; - -{ OM_ADDMEMBER, OM_REMMEMBER } -type - - PopMember = ^TopMember; - - TopMember = record - MethodID: LongWord; - opam_Object: PObject_; - end; - - - -{*****************************************} -{** 'White box' access to struct IClass **} -{*****************************************} - -{ This structure is READ-ONLY, and allocated only by Intuition } -type - - PIClass = ^TIClass; - - TIClass = record - cl_Dispatcher: THook; - cl_Reserved: LongWord; { must be 0 } - cl_Super: PIClass; - cl_ID: ClassID; - - { where within an object is the instance data for this class? } - cl_InstOffset: Word; - cl_InstSize: Word; - - cl_UserData: LongWord; { per-class data of your choice } - cl_SubclassCount: LongWord; - { how many direct subclasses? } - cl_ObjectCount: LongWord; - { how many objects created of this class? } - cl_Flags: LongWord; - end; - -const - CLF_INLIST = $00000001; { class is in public class list } - - - -{************************************************} -{** 'White box' access to struct _Object **} -{************************************************} - -{ - * We have this, the instance data of the root class, PRECEDING - * the 'object'. This is so that Gadget objects are Gadget pointers, - * and so on. If this structure grows, it will always have o_Class - * at the end, so the macro OCLASS(o) will always have the same - * offset back from the pointer returned from NewObject(). - * - * This data structure is subject to change. Do not use the o_Node - * embedded structure. - } -type - P_Object = ^T_Object; - - T_Object = record - o_Node: TMinNode; - 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: is included at the END of this file! - } - -{ 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); - - { (PChar) 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); - - { (BOOL) Reserved for system use to indicate that the - * gadget belongs to the system. Defaults to FALSE. } - GA_SysGadget = (GA_Dummy + $001D); - - { (UWord) Reserved for system use to indicate the - * gadget type. } - GA_SysGType = (GA_Dummy + $001E); - - { (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); - - { (struct Gadget * ) Next gadget in the linked list. } - GA_Next = (GA_Dummy + $0020); - - { (struct DrawInfo * ) Some gadgets need a DrawInfo at creation time } - GA_DrawInfo = (GA_Dummy + $0021); - - { 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); - - { (Object * ) Label is an image object. } - GA_LabelImage = (GA_Dummy + $0023); - - { New for V37: - * Boolean indicates that this gadget is to participate in - * cycling activation with Tab or Shift-Tab. - } - GA_TabCycle = (GA_Dummy + $0024); - - { New for V39: - * Boolean indicates that this gadget sends gadget-help - } - GA_GadgetHelp = (GA_Dummy + $0025); - - { 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); - - { 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; - { (PChar) 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; - { (PChar) 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); - PGA_Freedom = (PGA_Dummy + $0001); - { only one of FREEVERT or FREEHORIZ } - PGA_Borderless = (PGA_Dummy + $0002); - PGA_HorizPot = (PGA_Dummy + $0003); - PGA_HorizBody = (PGA_Dummy + $0004); - PGA_VertPot = (PGA_Dummy + $0005); - PGA_VertBody = (PGA_Dummy + $0006); - PGA_Total = (PGA_Dummy + $0007); - PGA_Visible = (PGA_Dummy + $0008); - PGA_Top = (PGA_Dummy + $0009); - { New for V37: } - PGA_NewLook = (PGA_Dummy + $000A); - - { STRGCLASS attributes } - - STRINGA_Dummy = (TAG_USER + $32000); - STRINGA_MaxChars = (STRINGA_Dummy + $0001); - STRINGA_Buffer = (STRINGA_Dummy + $0002); - STRINGA_UndoBuffer = (STRINGA_Dummy + $0003); - STRINGA_WorkBuffer = (STRINGA_Dummy + $0004); - STRINGA_BufferPos = (STRINGA_Dummy + $0005); - STRINGA_DispPos = (STRINGA_Dummy + $0006); - STRINGA_AltKeyMap = (STRINGA_Dummy + $0007); - STRINGA_Font = (STRINGA_Dummy + $0008); - STRINGA_Pens = (STRINGA_Dummy + $0009); - STRINGA_ActivePens = (STRINGA_Dummy + $000A); - STRINGA_EditHook = (STRINGA_Dummy + $000B); - STRINGA_EditModes = (STRINGA_Dummy + $000C); - - { booleans } - STRINGA_ReplaceMode = (STRINGA_Dummy + $000D); - STRINGA_FixedFieldMode = (STRINGA_Dummy + $000E); - STRINGA_NoFilterMode = (STRINGA_Dummy + $000F); - - STRINGA_Justification = (STRINGA_Dummy + $0010); - { GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT } - STRINGA_LongVal = (STRINGA_Dummy + $0011); - STRINGA_TextVal = (STRINGA_Dummy + $0012); - - STRINGA_ExitHelp = (STRINGA_Dummy + $0013); - { STRINGA_ExitHelp is new for V37, and ignored by V36. - * Set this if you want the gadget to exit when Help is - * pressed. Look for a code of $5F, the rawkey code for Help - } - - SG_DEFAULTMAXCHARS = (128); - - { Gadget Layout related attributes } - - LAYOUTA_Dummy = (TAG_USER + $38000); - 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; - LORIENT_HORIZ = 1; - LORIENT_VERT = 2; - - - { Gadget Method ID's } - - GM_Dummy = (-1); { not used for anything } - GM_HITTEST = (0); { return GMR_GADGETHIT IF you are clicked on - * (whether or not you are disabled). - } - GM_RENDER = (1); { draw yourself, in the appropriate state } - GM_GOACTIVE = (2); { you are now going to be fed input } - GM_HANDLEINPUT = (3); { handle that input } - GM_GOINACTIVE = (4); { whether or not by choice, you are done } - GM_HELPTEST = (5); { Will you send gadget help if the mouse is - * at the specified coordinates? See below - * for possible GMR_ values. - } - GM_LAYOUT = (6); { re-evaluate your size based on the GadgetInfo - * Domain. Do NOT re-render yourself yet, you - * will be called when it is time... - } - -{ Parameter "Messages" passed to gadget class methods } - -{ GM_HITTEST } -type - - PgpHitTest = ^TgpHitTest; - - TgpHitTest = record - MethodID: LongWord; - gpht_GInfo: PGadgetInfo; - gpht_Mouse: record - x: SmallInt; - y: SmallInt; - end; - end; - -const -{ For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit, - * otherwise return zero. - * - * For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit. - * Typically, return GMR_HELPHIT if you were hit. - * It is possible to pass a UWord to the application via the Code field - * of the IDCMP_GADGETHELP message. Return GMR_HELPCODE or'd with - * the UWord-sized result you wish to return. - * - * GMR_HELPHIT yields a Code value of ((UWord) ~0), which should - * mean "nothing particular" to the application. - } - - GMR_GADGETHIT = ($00000004); { GM_HITTEST hit } - - GMR_NOHELPHIT = ($00000000); { GM_HELPTEST didn't hit } - GMR_HELPHIT = ($FFFFFFFF); { GM_HELPTEST hit, return code = ~0 } - GMR_HELPCODE = ($00010000); { GM_HELPTEST hit, return low Word as code } - - -{ GM_RENDER } -type - pgpRender = ^tgpRender; - - tgpRender = record - MethodID: LongWord; - gpr_GInfo: PGadgetInfo; { gadget context } - gpr_RPort: PRastPort; { all ready for use } - gpr_Redraw: LongInt; { might be a "highlight pass" } - end; - -{ values of gpr_Redraw } -const - GREDRAW_UPDATE = (2); { incremental update, e.g. prop slider } - GREDRAW_REDRAW = (1); { redraw gadget } - GREDRAW_TOGGLE = (0); { toggle highlight, IF applicable } - -{ GM_GOACTIVE, GM_HANDLEINPUT } -type - - PgpInput = ^TgpInput; - - TgpInput = record - MethodID: LongWord; - gpi_GInfo: PGadgetInfo; - gpi_IEvent: PInputEvent; - gpi_Termination: Pointer; - gpi_Mouse: record - x: SmallInt; - y: SmallInt; - end; - {* (V39) Pointer to TabletData structure, if this event originated - * from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if - * not. - * - * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39! - * IT WILL BE INVALID! - *} - gpi_TabletData: PTabletData; - end; - -{ GM_HANDLEINPUT and GM_GOACTIVE return code flags } -{ return GMR_MEACTIVE (0) alone if you want more input. - * Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally - * GMR_VERIFY. - } -const - GMR_MEACTIVE = (0); - GMR_NOREUSE = (2); - GMR_REUSE = (4); - GMR_VERIFY = (8); { you MUST set cgp_Termination } - -{ New for V37: - * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE, - * which instructs Intuition to activate the next or previous gadget - * that has GFLG_TABCYCLE set. - } - GMR_NEXTACTIVE = (16); - GMR_PREVACTIVE = (32); - -{ GM_GOINACTIVE } -type - - PgpGoInactive = ^TgpGoInactive; - - TgpGoInactive = record - MethodID: LongWord; - gpgi_GInfo: PGadgetInfo; - - { V37 field only! DO NOT attempt to read under V36! } - gpgi_Abort: LongWord; { gpgi_Abort=1 IF gadget was aborted - * by Intuition and 0 if gadget went - * inactive at its own request - } - end; - -{* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when - * the gadget is added to the window (or when the window opens, if - * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets - * list), or when the window is resized. Your gadget can set the - * GA_RelSpecial property to get GM_LAYOUT events without Intuition - * changing the interpretation of your gadget select box. This - * allows for completely arbitrary resizing/repositioning based on - * window size. - *} -{* GM_LAYOUT *} -type - - PgpLayout = ^TgpLayout; - - TgpLayout = record - MethodID: LongWord; - gpl_GInfo: PGadgetInfo; - gpl_Initial: LongWord; {* non-zero if this method was invoked - * during AddGList() or OpenWindow() - * time. zero if this method was invoked - * during window resizing. - *} - 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: LongWord; - 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: LongWord; - gpkt_GInfo: PGadgetInfo; - gpkt_IMsg: PIntuiMessage; { The IntuiMessage that triggered this } - gpkt_VanillaKey: LongWord; - 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: LongWord; { 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: LongWord; - gpki_GInfo: PGadgetInfo; - gpki_Abort: LongWord; - end; - -const - ICM_Dummy = ($0401); { used for nothing } - ICM_SETLOOP = ($0402); { set/increment loop counter } - ICM_CLEARLOOP = ($0403); { clear/decrement loop counter } - ICM_CHECKLOOP = ($0404); { set/increment loop } - - { no parameters for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP } - - { interconnection attributes used by icclass, modelclass, and gadgetclass } - ICA_Dummy = (TAG_USER + $40000); - ICA_TARGET = (ICA_Dummy + 1); - { interconnection target } - ICA_MAP = (ICA_Dummy + 2); - { interconnection map tagitem list } - ICSPECIAL_CODE = (ICA_Dummy + 3); - { a "pseudo-attribute", see below. } - -{ Normally, the value for ICA_TARGET is some object pointer, - * but if you specify the special value ICTARGET_IDCMP, notification - * will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's - * IDCMP port. See the definition of IDCMP_IDCMPUPDATE. - * - * When you specify ICTARGET_IDCMP for ICA_TARGET, the map you - * specify will be applied to derive the attribute list that is - * sent with the IDCMP_IDCMPUPDATE message. If you specify a map list - * which results in the attribute tag id ICSPECIAL_CODE, the - * lower sixteen bits of the corresponding ti_Data value will - * be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage. - } - ICTARGET_IDCMP = (not 0); - - -const - CUSTOMIMAGEDEPTH = (-1); -{ if image.Depth is this, it's a new Image class object } - - -{****************************************************} -const - IA_Dummy = (TAG_USER + $20000); - IA_Left = (IA_Dummy + $01); - IA_Top = (IA_Dummy + $02); - IA_Width = (IA_Dummy + $03); - IA_Height = (IA_Dummy + $04); - IA_FGPen = (IA_Dummy + $05); - { IA_FGPen also means "PlanePick" } - IA_BGPen = (IA_Dummy + $06); - { IA_BGPen also means "PlaneOnOff" } - IA_Data = (IA_Dummy + $07); - { bitplanes, for classic image, - * other image classes may use it for other things - } - IA_LineWidth = (IA_Dummy + $08); - IA_Pens = (IA_Dummy + $0E); - { pointer to UWord pens[], - * ala DrawInfo.Pens, MUST be - * terminated by ~0. Some classes can - * choose to have this, or SYSIA_DrawInfo, - * or both. - } - IA_Resolution = (IA_Dummy + $0F); - { packed uwords for x/y resolution into a LongWord - * ala DrawInfo.Resolution - } - - {*** see class documentation to learn which ****} - {*** classes recognize these ****} - IA_APattern = (IA_Dummy + $10); - IA_APatSize = (IA_Dummy + $11); - IA_Mode = (IA_Dummy + $12); - IA_Font = (IA_Dummy + $13); - IA_Outline = (IA_Dummy + $14); - IA_Recessed = (IA_Dummy + $15); - IA_DoubleEmboss = (IA_Dummy + $16); - IA_EdgesOnly = (IA_Dummy + $17); - - {*** "sysiclass" attributes ****} - SYSIA_Size = (IA_Dummy + $0B); - { 's below } - SYSIA_Depth = (IA_Dummy + $0C); - { this is unused by Intuition. SYSIA_DrawInfo - * is used instead for V36 - } - SYSIA_Which = (IA_Dummy + $0D); - { see 's below } - SYSIA_DrawInfo = (IA_Dummy + $18); - { pass to sysiclass, please } - - {**** obsolete: don't use these, use IA_Pens ****} - SYSIA_Pens = IA_Pens; - IA_ShadowPen = (IA_Dummy + $09); - IA_HighlightPen = (IA_Dummy + $0A); - - { New for V39: } - SYSIA_ReferenceFont = (IA_Dummy + $19); - { Font to use as reference for scaling - * certain sysiclass images - } - IA_SupportsDisable = (IA_Dummy + $1a); - { By default, Intuition ghosts gadgets itself, - * instead of relying on IDS_DISABLED or - * IDS_SELECTEDDISABLED. An imageclass that - * supports these states should return this attribute - * as TRUE. You cannot set or clear this attribute, - * however. - } - - IA_FrameType = (IA_Dummy + $1b); - { Starting with V39, FrameIClass recognizes - * several standard types of frame. Use one - * of the FRAME_ specifiers below. Defaults - * 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. - (LongWord) - } - - {* next attribute: (IA_Dummy + $1c) *} - - {***********************************************} - - { data values for SYSIA_Size } - SYSISIZE_MEDRES = (0); - SYSISIZE_LOWRES = (1); - SYSISIZE_HIRES = (2); - -{ - * SYSIA_Which tag data values: - * Specifies which system gadget you want an image for. - * Some numbers correspond to internal Intuition s - } - DEPTHIMAGE = ($00); - ZOOMIMAGE = ($01); - SIZEIMAGE = ($02); - CLOSEIMAGE = ($03); - SDEPTHIMAGE = ($05); { screen depth gadget } - LEFTIMAGE = ($0A); - UPIMAGE = ($0B); - RIGHTIMAGE = ($0C); - DOWNIMAGE = ($0D); - CHECKIMAGE = ($0E); - MXIMAGE = ($0F); { mutual exclude "button" } - {* New for V39: *} - 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" } - IM_HITTEST = $203; { return TRUE IF click hits image } - IM_ERASE = $204; { erase yourself } - IM_MOVE = $205; { draw new AND erase old, smoothly } - - IM_DRAWFRAME = $206; { draw with specified dimensions } - 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); - IDS_SELECTED = (1); { for selected gadgets } - IDS_DISABLED = (2); { for disabled gadgets } - IDS_BUSY = (3); { for future functionality } - IDS_INDETERMINATE = (4); { for future functionality } - 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; - -{ IM_FRAMEBOX } -type - - PimpFrameBox = ^TimpFrameBox; - - TimpFrameBox = record - MethodID: LongWord; - imp_ContentsBox: PIBox; { input: relative box of contents } - imp_FrameBox: PIBox; { output: rel. box of encl frame } - imp_DrInfo: PDrawInfo; - imp_FrameFlags: LongWord; - end; - -const - FRAMEF_SPECIFY = (1); { Make do with the dimensions of FrameBox - * provided. - } - -{ IM_DRAW, IM_DRAWFRAME } -type - - PimpDraw = ^TimpDraw; - - TimpDraw = record - MethodID: LongWord; - imp_RPort: PRastPort; - imp_Offset: record - x: Word; - y: Word; - end; - imp_State: LongWord; - imp_DrInfo: PDrawInfo; - - { these parameters only valid for IM_DRAWFRAME } - imp_Dimensions: record - Width: Word; - Height: Word; - end; - end; - - { IM_ERASE, IM_ERASEFRAME } - { NOTE: This is a subset of impDraw } - - PimpErase = ^TimpErase; - - TimpErase = record - MethodID: LongWord; - imp_RPort: PRastPort; - imp_Offset: record - x: Word; - y: Word; - end; - - { these parameters only valid for IM_ERASEFRAME } - imp_Dimensions: record - Width: Word; - Height: Word; - end; - end; - - { IM_HITTEST, IM_HITFRAME } - - PimpHitTest = ^TimpHitTest; - - TimpHitTest = record - MethodID: LongWord; - imp_Point: record - x: Word; - y: Word; - end; - - { these parameters only valid for IM_HITFRAME } - imp_Dimensions: record - Width: Word; - Height: Word; - 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: LongWord; - 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 -{ The following tags are recognized at NewObject() time by - * pointerclass: - * - * POINTERA_BitMap (struct BitMap * ) - Pointer to bitmap to - * get pointer imagery from. Bitplane data need not be - * in chip RAM. - * POINTERA_XOffset (Long) - X-offset of the pointer hotspot. - * POINTERA_YOffset (Long) - Y-offset of the pointer hotspot. - * POINTERA_WordWidth (LongWord) - designed width of the pointer in words - * POINTERA_XResolution (LongWord) - one of the POINTERXRESN_ flags below - * POINTERA_YResolution (LongWord) - one of the POINTERYRESN_ flags below - * - } - - POINTERA_Dummy = (TAG_USER + $39000); - - POINTERA_BitMap = (POINTERA_Dummy + $01); - POINTERA_XOffset = (POINTERA_Dummy + $02); - POINTERA_YOffset = (POINTERA_Dummy + $03); - POINTERA_WordWidth = (POINTERA_Dummy + $04); - POINTERA_XResolution = (POINTERA_Dummy + $05); - POINTERA_YResolution = (POINTERA_Dummy + $06); - -{ These are the choices for the POINTERA_XResolution attribute which - * will determine what resolution pixels are used for this pointer. - * - * POINTERXRESN_DEFAULT (ECS-compatible pointer width) - * = 70 ns if SUPERHIRES-type mode, 140 ns if not - * - * POINTERXRESN_SCREENRES - * = Same as pixel speed of screen - * - * POINTERXRESN_LORES (pointer always in lores-like pixels) - * = 140 ns in 15kHz modes, 70 ns in 31kHz modes - * - * POINTERXRESN_HIRES (pointer always in hires-like pixels) - * = 70 ns in 15kHz modes, 35 ns in 31kHz modes - * - * POINTERXRESN_140NS (pointer always in 140 ns pixels) - * = 140 ns always - * - * POINTERXRESN_70NS (pointer always in 70 ns pixels) - * = 70 ns always - * - * POINTERXRESN_35NS (pointer always in 35 ns pixels) - * = 35 ns always - } - - POINTERXRESN_DEFAULT = 0; - POINTERXRESN_140NS = 1; - POINTERXRESN_70NS = 2; - POINTERXRESN_35NS = 3; - - POINTERXRESN_SCREENRES = 4; - POINTERXRESN_LORES = 5; - POINTERXRESN_HIRES = 6; - -{ These are the choices for the POINTERA_YResolution attribute which - * will determine what vertical resolution is used for this pointer. - * - * POINTERYRESN_DEFAULT - * = In 15 kHz modes, the pointer resolution will be the same - * as a non-interlaced screen. In 31 kHz modes, the pointer - * will be doubled vertically. This means there will be about - * 200-256 pointer lines per screen. - * - * POINTERYRESN_HIGH - * POINTERYRESN_HIGHASPECT - * = Where the hardware/software supports it, the pointer resolution - * will be high. This means there will be about 400-480 pointer - * lines per screen. POINTERYRESN_HIGHASPECT also means that - * when the pointer comes out double-height due to hardware/software - * restrictions, its width would be doubled as well, if possible - * (to preserve aspect). - * - * POINTERYRESN_SCREENRES - * POINTERYRESN_SCREENRESASPECT - * = Will attempt to match the vertical resolution of the pointer - * to the screen's vertical resolution. POINTERYRESN_SCREENASPECT also - * means that when the pointer comes out double-height due to - * hardware/software restrictions, its width would be doubled as well, - * if possible (to preserve aspect). - * - } - - POINTERYRESN_DEFAULT = 0; - POINTERYRESN_HIGH = 2; - POINTERYRESN_HIGHASPECT = 3; - POINTERYRESN_SCREENRES = 4; - POINTERYRESN_SCREENRESASPECT = 5; - -{ Compatibility note: - * - * The AA chipset supports variable sprite width and resolution, but - * the setting of width and resolution is global for all sprites. - * When no other sprites are in use, Intuition controls the sprite - * width and sprite resolution for correctness based on pointerclass - * attributes specified by the creator of the pointer. Intuition - * controls sprite resolution with the VTAG_DEFSPRITERESN_SET tag - * to VideoControl(). Applications can override this on a per-viewport - * basis with the VTAG_SPRITERESN_SET tag to VideoControl(). - * - * If an application uses a sprite other than the pointer sprite, - * Intuition will automatically regenerate the pointer sprite's image in - * a compatible width. This might involve BitMap scaling of the imagery - * you supply. - * - * If any sprites other than the pointer sprite were obtained with the - * old GetSprite() call, Intuition assumes that the owner of those - * sprites is unaware of sprite resolution, hence Intuition will set the - * default sprite resolution (VTAG_DEFSPRITERESN_SET) to ECS-compatible, - * instead of as requested by the various pointerclass attributes. - * - * No resolution fallback occurs when applications use ExtSprites. - * Such applications are expected to use VTAG_SPRITERESN_SET tag if - * necessary. - * - * NB: Under release V39, only sprite width compatibility is implemented. - * Sprite resolution compatibility was added for V40. - } - - -type - - PStringExtend = ^TStringExtend; - - TStringExtend = record - { display specifications } - Font: PTextFont; { must be an open Font (not TextAttr) } - Pens: array[0..1] of Byte; { color of text/backgroun } - ActivePens: array[0..1] of Byte; { colors when gadget is active } - - { edit specifications } - InitialModes: LongWord; { initial mode flags, below } - EditHook: PHook; { IF non-NULL, must supply WorkBuffer } - WorkBuffer: PChar; { must be as large as StringInfo.Buffer} - - Reserved: array[0..3] of LongWord; { set to 0 } - end; - - pSGWork = ^tSGWork; - - tSGWork = record - { set up when gadget is first activated } - Gad: PGadget; { the contestant itself } - { Gadget in C-Includes } - StrInfo: PStringInfo; - { easy access to sinfo }{ StrInfo in C-Includes } - WorkBuffer: PChar; { intuition's planned result } - PrevBuffer: PChar; { what was there before } - Modes: LongWord; { current mode } - - { modified for each input event } - IEvent: PInputEvent; { actual event: do not change } - Code: Word; { character code, IF one Byte } - BufferPos: SmallInt; { cursor position } - NumChars: SmallInt; - Actions: LongWord; { what Intuition will do } - LongInt_: LongInt; { temp storage for LongInt } - - GInfo: PGadgetInfo; - { see cghooks.h }{ GadgetInfo in C-Includes } - EditOp: Word; { from constants below } - end; - -{ SGWork.EditOp - - * These values indicate what basic type of operation the global - * editing hook has performed on the string before your gadget's custom - * editing hook gets called. You do not have to be concerned with the - * value your custom hook leaves in the EditOp field, only if you - * write a global editing hook. - * - * For most of these general edit operations, you'll want to compare - * the BufferPos and NumChars of the StringInfo (before global editing) - * and SGWork (after global editing). - } - -const - EO_NOOP = ($0001); - { did nothing } - EO_DELBACKWARD = ($0002); - { deleted some chars (maybe 0). } - EO_DELFORWARD = ($0003); - { deleted some characters under and in front of the cursor } - EO_MOVECURSOR = ($0004); - { moved the cursor } - EO_ENTER = ($0005); - { "enter" or "return" key, terminate } - EO_RESET = ($0006); - { current Intuition-style undo } - EO_REPLACECHAR = ($0007); - { replaced one character and (maybe) advanced cursor } - EO_INSERTCHAR = ($0008); - { inserted one char into string or added one at end } - EO_BADFORMAT = ($0009); - { didn't like the text data, e.g., Bad LONGINT } - EO_BIGCHANGE = ($000A); { unused by Intuition } - { complete or major change to the text, e.g. new string } - EO_UNDO = ($000B); { unused by Intuition } - { some other style of undo } - EO_CLEAR = ($000C); - { clear the string } - EO_SPECIAL = ($000D); { unused by Intuition } - { some operation that doesn't fit into the categories here } - - - { Mode Flags definitions (ONLY first group allowed as InitialModes) } - SGM_REPLACE = (1); { replace mode } -{ please initialize StringInfo with in-range value of BufferPos - * if you are using SGM_REPLACE mode. - } - - SGM_FIXEDFIELD = (2); { fixed length buffer } - { always set SGM_REPLACE, too } - SGM_NOFILTER = (4); { don't filter control chars } - - { SGM_EXITHELP is new for V37, and ignored by V36: } - SGM_EXITHELP = (128); { exit with code = $5F IF HELP hit } - - - { These Mode Flags are for internal use only } - SGM_NOCHANGE = (8); { no edit changes yet } - SGM_NOWORKB = (16); { Buffer == PrevBuffer } - SGM_CONTROL = (32); { control char escape mode } - SGM_LONGINT = (64); { an intuition LongInt gadget } - - { String Gadget Action Flags (put in SGWork.Actions by EditHook) } - SGA_USE = ($1); { use contents of SGWork } - SGA_END = ($2); { terminate gadget, code in Code field } - SGA_BEEP = ($4); { flash the screen for the user } - SGA_REUSE = ($8); { reuse input event } - SGA_REDISPLAY = ($10); { gadget visuals changed } - - { New for V37: } - SGA_NEXTACTIVE = ($20); { Make next possible gadget active. } - SGA_PREVACTIVE = ($40); { Make previous possible gadget active.} - - { function id for only existing custom string gadget edit hook } - - SGH_KEY = (1); { process editing keystroke } - SGH_CLICK = (2); { process mouse click cursor position } - -{ Here's a brief summary of how the custom string gadget edit hook works: - * You provide a hook in StringInfo.Extension.EditHook. - * The hook is called in the standard way with the 'object' - * a pointer to SGWork, and the 'message' a pointer to a command - * block, starting either with (LongWord) SGH_KEY, SGH_CLICK, - * or something new. - * - * You return 0 if you don't understand the command (SGH_KEY is - * required and assumed). Return non-zero if you implement the - * command. - * - * SGH_KEY: - * There are no parameters following the command LongWord. - * - * Intuition will put its idea of proper values in the SGWork - * before calling you, and if you leave SGA_USE set in the - * SGWork.Actions field, Intuition will use the values - * found in SGWork fields WorkBuffer, NumChars, BufferPos, - * and LongInt, copying the WorkBuffer back to the StringInfo - * Buffer. - * - * NOTE WELL: You may NOT change other SGWork fields. - * - * If you clear SGA_USE, the string gadget will be unchanged. - * - * If you set SGA_END, Intuition will terminate the activation - * of the string gadget. If you also set SGA_REUSE, Intuition - * will reuse the input event after it deactivates your gadget. - * - * In this case, Intuition will put the value found in SGWork.Code - * into the IntuiMessage.Code field of the IDCMP_GADGETUP message it - * sends to the application. - * - * If you set SGA_BEEP, Intuition will call DisplayBeep(); use - * this if the user has typed in error, or buffer is full. - * - * Set SGA_REDISPLAY if the changes to the gadget warrant a - * gadget redisplay. Note: cursor movement requires a redisplay. - * - * Starting in V37, you may set SGA_PREVACTIVE or SGA_NEXTACTIVE - * when you set SGA_END. This tells Intuition that you want - * the next or previous gadget with GFLG_TABCYCLE to be activated. - * - * SGH_CLICK: - * This hook command is called when Intuition wants to position - * the cursor in response to a mouse click in the string gadget. - * - * Again, here are no parameters following the command LongWord. - * - * This time, Intuition has already calculated the mouse position - * character cell and put it in SGWork.BufferPos. The previous - * BufferPos value remains in the SGWork.StringInfo.BufferPos. - * - * Intuition will again use the SGWork fields listed above for - * SGH_KEY. One restriction is that you are NOT allowed to set - * SGA_END or SGA_REUSE for this command. Intuition will not - * stand for a gadget which goes inactive when you click in it. - * - * You should always leave the SGA_REDISPLAY flag set, since Intuition - * uses this processing when activating a string gadget. - } - -type - PNewDecorator = ^TNewDecorator; - TNewDecorator = record - nd_Node: TNode; - nd_Port: PMsgPort; - nd_cnt: LongWord; - nd_Pattern: PChar; - nd_IntPattern: PChar; - nd_Window: PObject_; - nd_Screen: PObject_; - nd_Menu: PObject_; - end; - - - - - -function ActivateGadget(Gadgets: PGadget; Window: PWindow; - Requester: PRequester): Boolean; -procedure ActivateWindow(Window: PWindow); -procedure AddClass(ClassPtr: PIClass); -function AddGadget(Window: PWindow; Gadget: PGadget; Position: LongWord): Word; -function AddGList(Window: PWindow; Gadget: PGadget; Position: LongWord; - NumGad: LongInt; Requester: PRequester): Word; -function AllocIntuiMessage(Window: PWindow): PIntuiMessage; -function AllocRemember(var RememberKey: PRemember; Size: LongWord; - Flags: LongWord): Pointer; -function AllocScreenBuffer(Sc: PScreen; Bm: PBitMap; Flags: LongWord): PScreenBuffer; -procedure AlohaWorkbench(MsgPort: PMsgPort); -function AutoRequest(Window: PWindow; const Body: PIntuiText; - const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; - NFlag: LongWord; Width: LongWord; Height: LongWord): Boolean; -procedure BeginRefresh(Window: PWindow); -function BuildEasyRequestArgs(Window : PWindow;const easyStruct : PEasyStruct; idcmp : LongWord;const args : Pointer) : PWindow; -function BuildSysRequest(Window: PWindow; const Body: PIntuiText; - const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; - Width: LongWord; Height: LongWord): PWindow; -function ChangeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer): LongWord; -procedure ChangeWindowBox(Window: PWindow; left: LongInt; top: LongInt; - Width: LongInt; Height: LongInt); -function ClearDMRequest(Window: PWindow): Boolean; -procedure ClearMenuStrip(Window: PWindow); -procedure ClearPointer(Window: PWindow); -procedure CloseScreen(Screen: PScreen); -procedure CloseWindow(Window: PWindow); -function CloseWorkBench: Boolean; -procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); -function ChangeWindowShape(Window: PWindow; NewShape: PRegion; CallBack: PHook): PRegion; -procedure CurrentTime(var Seconds: LongWord; var Micros: LongWord); -function DisplayAlert(AlertNumber: LongWord; - const string_: PChar; Height: LongWord): Boolean; -procedure DisplayBeep(Screen: PScreen); -procedure DisposeObject(obj : Pointer); -function DoGadgetMethodA(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg): LongWord; -function DoNotify(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate): Pointer; -function DoubleClick(SSeconds: LongWord; SMicros: LongWord; - CSeconds: LongWord; CMicros: LongWord): Boolean; -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 : LongWord;const DrawInfo : PDrawInfo); -function EasyRequestArgs(Window: PWindow; - const EasyStruct: PEasyStruct; IdcmpPtr: PLongWord; const args: Pointer): LongInt; -procedure EndRefresh(Window: PWindow; Complete: Boolean); -procedure EndRequest(Requester: PRequester; Window: PWindow); -function EndScreenNotify(Notify: Pointer): Boolean; -procedure EraseImage(Rp : PRastPort; Image : PImage; LeftOffset : LongInt; TopOffset : LongInt); -function FindClass(ClassID: PChar): PIClass; -function FreeClass(ClassPtr : PIClass) : Boolean; -procedure FreeICData(ICData: Pointer); -procedure FreeIntuiMessage(IMsg: PIntuiMessage); -procedure FreeMonitorList(Obj: Pointer); -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: psmallint); -function GetAttr(attrID: LongWord; obj: Pointer; storagePtr: PLongWord): LongWord; -procedure GetDefaultPubScreen(nameBuffer : PChar); -function GetDefPrefs(preferences: PPreferences; Size: LongInt): PPreferences; -function GetMonitorList(Tags: PTagItem): Pointer; -function GetPrefs(preferences: PPreferences; Size: LongInt): PPreferences; -function GetScreenData(buffer: Pointer; Size: LongWord; type_: LongWord; - const Screen: PScreen): Boolean; -function GetScreenDrawInfo(Screen : PScreen) : PDrawInfo; -procedure HelpControl(Win: PWindow; Flags: LongWord); -procedure HideWindow(Window: PWindow); -procedure InitRequester(Requester: PRequester); -function IntuiTextLength(const iText: PIntuiText): LongInt; -function ItemAddress(const menuStrip: pMenu; menuNumber: LongWord): PMenuItem; -function IsWindowVisible(Window: PWindow): LongWord; -procedure LendMenus(FromWindow: PWindow; ToWindow: PWindow); -function LockIBase(LockNumber: LongWord): LongWord; -function LockPubScreen(const Name: PChar): PScreen; -function LockPubScreenList: PList; -function MakeClass(const classID : PChar;const superClassID : PChar;const superClassPtr : PIClass; instanceSize : LongWord; Flags : LongWord) : PIClass; -function MakeScreen(Screen: PScreen): LongInt; -function ModifyIDCMP(Window: PWindow; Flags: LongWord): Boolean; -procedure ModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; - Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; - HorizBody: LongWord; VertBody: LongWord); -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: LongWord; HorizPot: LongWord; - VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; NumGad: LongInt); -function NewObjectA(ClassPtr : PIClass;const classID : PChar;const tagList : PTagItem) : Pointer; -function NextObject(ObjectPtrPtr: Pointer): PIClass; -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: LongWord); -procedure OnGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); -procedure OnMenu(Window: PWindow; MenuNumber: LongWord); -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: LongWord; -function PointInImage(point : LongWord; Image : PImage) : Boolean; -procedure PrintIText(Rp: PRastPort; - const IText: PIntuiText; Left: LongInt; Top: LongInt); -function PubScreenStatus(Screen: PScreen; StatusFlags: LongWord): Word; -function QueryOverscan(DisplayID: LongWord; Rect: pRectangle; - OScanType: LongInt): LongInt; -procedure RefreshGadgets(Gadgets: PGadget; Window: PWindow; Requester: PRequester); -procedure RefreshGList(Gadgets: PGadget; Window: PWindow; - Requester: PRequester; NumGad: LongInt); -procedure RefreshWindowFrame(Window: PWindow); -procedure ReleaseGIRPort(Rp: PRastPort); -function RemakeDisplay: LongInt; -procedure RemoveClass(ClassPtr: PIClass); -function RemoveGadget(Window: PWindow; Gadget: PGadget): Word; -function RemoveGList(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt): Word; -procedure ReportMouse(flag: LongInt; Window: PWindow); -function Request(Requester: PRequester; Window: PWindow): Boolean; -function ResetMenuStrip(Window : PWindow; menu : pMenu) : Boolean; -function RethinkDisplay: LongInt; -procedure ScreenDepth(Screen: PScreen; Flags: LongWord; Reserved: Pointer); -procedure ScreenPosition(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt); -procedure ScreenToBack(Screen: PScreen); -procedure ScreenToFront(Screen: PScreen); -procedure ScrollWindowRaster(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt); -procedure ScrollWindowRasterNoFill(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word); -procedure SendIntuiMessage(Window: PWindow; IMsg: PIntuiMessage); -function SetAttrsA(obj: Pointer; const TagList: PTagItem): LongWord; -procedure SetDefaultPubScreen(const Name: PChar); -procedure SetDefaultScreenFont(TextFont: PTextFont); -function SetDMRequest(Window: PWindow; Requester: PRequester): Boolean; -function SetEditHook(hook: PHook): PHook; -function SetGadgetAttrsA(Gadget : PGadget; Window : PWindow; Requester : PRequester;const TagList : PTagItem) : LongWord; -function SetMenuStrip(Window: PWindow; menu: pMenu): Boolean; -function SetMouseQueue(Window: PWindow; queueLength: LongWord): LongInt; -procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; - Width: LongInt; XOffset: LongInt; YOffset: LongInt); -function SetPointerBounds(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem): LongWord; -function SetPrefs(const Preferences: PPreferences; Size: LongInt; - Inform: LongInt): PPreferences; -function SetPubScreenModes(modes: LongWord): Word; -procedure SetWindowPointerA(Win : PWindow;const Taglist : PTagItem); -procedure SetWindowTitles(Window: PWindow; const WindowTitle: PChar; - const ScreenTitle: PChar); -procedure ShowTitle(Screen: PScreen; showIt: LongInt); -procedure ShowWindow(Window: PWindow); -procedure SizeWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); -function StartScreenNotifyTagList(Tags: PTagItem): Pointer; -function SysReqHandler(Window : PWindow; IdcmpPtr : PLongWord; waitInput : LongInt) : LongInt; -function TimedDisplayAlert(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord): Boolean; -procedure UnlockIBase(LockNumber: LongWord); -procedure UnlockPubScreen(const Name: PChar; Screen: PScreen); -procedure UnlockPubScreenList; -function ViewAddress: PView; -function ViewPortAddress(const Window: PWindow): PViewPort; -function WBenchToBack: Boolean; -function WBenchToFront: Boolean; -procedure WindowAction(Window: PWindow; Action: LongWord; Tags: PTagItem); -function WindowLimits(Window: PWindow; WidthMin: LongInt; HeightMin: LongInt; - WidthMax: LongWord; HeightMax: LongWord): Boolean; -procedure WindowToBack(Window: PWindow); -procedure WindowToFront(Window: PWindow); -procedure ZipWindow(Window: PWindow); - -function SetAttrs(Obj: Pointer; const Tags: array of const): LongWord; - -function OCLASS(O: Pointer): PIClass; - -function Has_Children(Win: PWindow): Boolean; -function Is_Children(Win: PWindow): Boolean; - -{ Intuition macros } -{ -function INST_DATA (Cl: PIClass; O: P_Object): Pointer; -function SIZEOF_INSTANCE (Cl: PIClass): LongInt; -function BASEOBJECT (O: P_Object): Pointer; -function _OBJ(O: P_Object): P_Object; -function __OBJECT (O: Pointer): P_Object; -function OCLASS (O: Pointer): PIClass; -function SHIFTITEM (N: SmallInt): Word; -function SHIFTMENU (N: SmallInt): Word; -function SHIFTSUB (N: SmallInt): Word; -function FULLMENUNUM (Menu, Item, Sub: SmallInt): Word; -function IM_BGPEN (Im: PImage): Byte; -function IM_BOX (Im: PImage): PIBox; -function IM_FGPEN (Im: PImage): Byte; -function GADGET_BOX (G: PGadget): PIBox; -function CUSTOM_HOOK (Gadget: PGadget): PHook; -function ITEMNUM(N : Word): Word; -function MENUNUM(N : Word): Word; -function SUBNUM(N : Word): Word; } - -//function DisplayAlert(AlertNumber : LongWord;const String_ : string; Height : LongWord) : Boolean; -//function LockPubScreen(const Name : string) : PScreen; -//function MakeClass(const ClassID : string;const superClassID : PChar;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; -//function MakeClass(const ClassID : PChar;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; -//function MakeClass(const ClassID : string;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : 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 : LongWord;const String_ : string; Height : LongWord; Time : LongWord) : Boolean; -//PROCEDURE UnlockPubScreen(const Name : string; Screen : PScreen); - -implementation - -uses - tagsarray, longarray; - - -{ -function INST_DATA (Cl: PIClass; O: P_Object): Pointer; -begin - INST_DATA := Pointer(LongInt(O) + Cl^.cl_InstOffset); -end; - -function SIZEOF_INSTANCE (Cl: PIClass): LongInt; -begin - SIZEOF_INSTANCE := Cl^.cl_InstOffset + Cl^.cl_InstSize + sizeof(T_Object); -end; - -function BASEOBJECT (O: P_Object): Pointer; -begin - BASEOBJECT := Pointer(LongInt(O) + sizeof(T_Object)); -end; - -function _OBJ(O: P_Object): P_Object; -begin - _OBJ := P_Object(O); -END; - -function __OBJECT (O: Pointer): P_Object; -begin - __OBJECT := P_Object(LongInt(O) - sizeof(T_Object)) -end; - -function OCLASS (O: Pointer): PIClass; -var - Obj: P_Object; -begin - Obj := P_Object(LongInt(O) - sizeof(T_Object)); - OCLASS := Obj^.o_Class; -end; - -function SHIFTITEM (N: SmallInt): Word; -begin - SHIFTITEM := (N and $3f) shl 5 -end; - -function SHIFTMENU (N: SmallInt): Word; -begin - SHIFTMENU := N and $1f -end; - -function SHIFTSUB (N: SmallInt): Word; -begin - SHIFTSUB := (N and $1f) shl 11 -end; - -function FULLMENUNUM (Menu, Item, Sub: SmallInt): Word; -begin - FULLMENUNUM := ((Sub and $1f) shl 11) or - ((Item and $3f) shl 5) or - (Menu and $1f) -end; -} - - -{ The next functons _BGPEN AND _FGPEN aren't a full replacement of the - C macros because the C preprocessor makes it possible to set the - A/BPen values of the Image class objects as well. This can't work - in pascal, of course! -} -{ -function IM_BGPEN (Im: PImage): Byte; -begin - IM_BGPEN := Im^.PlaneOnOff; -end; - -function IM_BOX (Im: PImage): PIBox; -begin - IM_BOX := PIBox(@Im^.LeftEdge); -END; - -function IM_FGPEN (Im: PImage): Byte; -begin - IM_FGPEN := Im^.PlanePick; -end; - -function GADGET_BOX (G: PGadget): PIBox; -begin - GADGET_BOX := PIBox(@G^.LeftEdge); -end; - -function CUSTOM_HOOK (Gadget: PGadget): PHook; -begin - CUSTOM_HOOK := PHook(Gadget^.MutualExclude); -end; - -function ITEMNUM( N : Word): Word; -begin - ITEMNUM := (N shr 5) and $3F -end; - -function MENUNUM( N : Word): Word; -begin - MENUNUM := N and $1f -end; - -function SUBNUM( N : Word): Word; -begin - SUBNUM := (N shr 11) and $1f -end;} - - - - -{ -function DisplayAlert(AlertNumber : LongWord;const String_ : string; Height : LongWord) : Boolean; -begin - DisplayAlert := DisplayAlert(AlertNumber,pas2c(String_),Height); -end; - -function LockPubScreen(const Name : string) : PScreen; -begin - LockPubScreen := LockPubScreen(pas2c(Name)); -end; - -function MakeClass(const ClassID : string;const superClassID : PChar;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; -begin - MakeClass := MakeClass(pas2c(ClassID),superClassID,SuperClassPtr,InstanceSize,Flags); -end; - -function MakeClass(const ClassID : PChar;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; -begin - MakeClass := MakeClass(ClassID,pas2c(superClassID),SuperClassPtr,InstanceSize,Flags); -end; - -function MakeClass(const ClassID : string;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; -begin - MakeClass := MakeClass(pas2c(ClassID),pas2c(superClassID),SuperClassPtr,InstanceSize,Flags); -end; - -function NewObjectA(ClassPtr : PIClass;const ClassID : string;const TagList : PTagItem) : Pointer; -begin - NewObjectA := NewObjectA(ClassPtr,pas2c(ClassID),Taglist); -end; - -PROCEDURE SetDefaultPubScreen(const Name : string); -begin - SetDefaultPubScreen(pas2c(Name)); -end; - -PROCEDURE SetWindowTitles(Window : PWindow;const WindowTitle : string;const ScreenTitle : PChar); -begin - SetWindowTitles(Window,pas2c(WindowTitle),ScreenTitle); -end; - -PROCEDURE SetWindowTitles(Window : PWindow;const WindowTitle : PChar;const ScreenTitle : string); -begin - SetWindowTitles(Window,WindowTitle,pas2c(ScreenTitle)); -end; - -PROCEDURE SetWindowTitles(Window : PWindow;const WindowTitle : string;const ScreenTitle : string); -begin - SetWindowTitles(Window,pas2c(WindowTitle),pas2c(ScreenTitle)); -end; - -function TimedDisplayAlert(AlertNumber : LongWord;const String_ : string; Height : LongWord; Time : LongWord) : Boolean; -begin - TimedDisplayAlert := TimedDisplayAlert(AlertNumber,pas2c(String_),Height,Time); -end; - -PROCEDURE UnlockPubScreen(const Name : string; Screen : PScreen); -begin - UnlockPubScreen(pas2c(Name),Screen); -end; - } -var - IntuitionBase: Pointer; - - -function AddGadget(Window: PWindow; Gadget: PGadget; Position: LongWord): Word; -type - TLocalCall = function(Window: PWindow; Gadget: PGadget; Position: LongWord; - Base: Pointer): Word; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 7)); - AddGadget := Call(Window, Gadget, Position, IntuitionBase); -end; - -function ClearDMRequest(Window: PWindow): Boolean; -type - TLocalCall = function(Window: PWindow; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 8)); - Result := Call(Window, IntuitionBase); -end; - -procedure ClearMenuStrip(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 9)); - Call(Window, IntuitionBase); -end; - -procedure ClearPointer(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 10)); - Call(Window, IntuitionBase); -end; - -procedure CloseScreen(Screen: PScreen); -type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 11)); - Call(Screen, IntuitionBase); -end; - -procedure CloseWindow(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 12)); - Call(Window, IntuitionBase); -end; - -function CloseWorkBench: Boolean; -type - TLocalCall = function(Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 13)); - Result := Call(IntuitionBase); -end; - -procedure CurrentTime(var Seconds: LongWord; var Micros: LongWord); -type - TLocalCall = procedure(var Seconds: LongWord; var Micros: LongWord; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 14)); - Call(Seconds, Micros, IntuitionBase); -end; - -function DisplayAlert(AlertNumber: LongWord; - const String_: PChar; Height: LongWord): Boolean; -type - TLocalCall = function(AlertNumber: LongWord; - const String_: PChar; Height: LongWord; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 15)); - Result := Call(AlertNumber, String_, Height, IntuitionBase); -end; - -procedure DisplayBeep(Screen: PScreen); -type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 16)); - Call(Screen, IntuitionBase); -end; - -function DoubleClick(SSeconds: LongWord; SMicros: LongWord; - CSeconds: LongWord; CMicros: LongWord): Boolean; -type - TLocalCall = function(SSeconds: LongWord; SMicros: LongWord; - CSeconds: LongWord; CMicros: LongWord; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 17)); - Result := Call(SSeconds, SMicros, CSeconds, CMicros, IntuitionBase); -end; - -procedure DrawBorder(Rp: PRastPort; - const Border: PBorder; LeftOffset: LongInt; TopOffset: LongInt); -type - TLocalCall = procedure(Rp: PRastPort; - const Border: PBorder; LeftOffset: LongInt; TopOffset: LongInt; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 18)); - Call(Rp, Border, LeftOffset, TopOffset, IntuitionBase); -end; - -procedure DrawImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; - TopOffset: LongInt); -type - TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; - TopOffset: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 19)); - Call(Rp, Image, LeftOffset, TopOffset, IntuitionBase); -end; - -procedure EndRequest(Requester: PRequester; Window: PWindow); -type - TLocalCall = procedure(Requester: PRequester; Window: PWindow; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 20)); - Call(Requester, Window, IntuitionBase); -end; - -function GetDefPrefs(Preferences: PPreferences; Size: LongInt): PPreferences; -type - TLocalCall = function(Preferences: PPreferences; Size: LongInt; - Base: Pointer): PPreferences; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 21)); - Result := Call(Preferences, Size, IntuitionBase); -end; - -function GetPrefs(Preferences: PPreferences; Size: LongInt): PPreferences; -type - TLocalCall = function(Preferences: PPreferences; Size: LongInt; - Base: Pointer): PPreferences; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 22)); - Result := Call(Preferences, Size, IntuitionBase); -end; - -procedure InitRequester(Requester: PRequester); -type - TLocalCall = procedure(Requester: PRequester; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 23)); - Call(Requester, IntuitionBase); -end; - -function ItemAddress(const MenuStrip: PMenu; MenuNumber: LongWord): PMenuItem; -type - TLocalCall = function(const MenuStrip: PMenu; MenuNumber: LongWord; - Base: Pointer): PMenuItem; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 24)); - Result := Call(MenuStrip, MenuNumber, IntuitionBase); -end; - -function ModifyIDCMP(Window: PWindow; Flags: LongWord): Boolean; -type - TLocalCall = function(Window: PWindow; Flags: LongWord; Base: Pointer): Boolean; - stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 25)); - Result := Call(Window, Flags, IntuitionBase); -end; - -procedure ModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; - Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; - HorizBody: LongWord; VertBody: LongWord); -type - TLocalCall = procedure(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Flags: LongWord; HorizPot: LongWord; - VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 26)); - Call(Gadget, Window, Requester, Flags, HorizPot, VertPot, HorizBody, - VertBody, IntuitionBase); -end; - -procedure MoveScreen(Screen: PScreen; Dx: LongInt; Dy: LongInt); -type - TLocalCall = procedure(Screen: PScreen; Dx: LongInt; Dy: LongInt; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 27)); - Call(Screen, Dx, Dy, IntuitionBase); -end; - -procedure MoveWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); -type - TLocalCall = procedure(Window: PWindow; Dx: LongInt; Dy: LongInt; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 28)); - Call(Window, Dx, Dy, IntuitionBase); -end; - -procedure OffGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); -type - TLocalCall = procedure(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 29)); - Call(Gadget, Window, Requester, IntuitionBase); -end; - -procedure OffMenu(Window: PWindow; MenuNumber: LongWord); -type - TLocalCall = procedure(Window: PWindow; MenuNumber: LongWord; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 30)); - Call(Window, MenuNumber, IntuitionBase); -end; - -procedure OnGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); -type - TLocalCall = procedure(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 31)); - Call(Gadget, Window, Requester, IntuitionBase); -end; - -procedure OnMenu(Window: PWindow; MenuNumber: LongWord); -type - TLocalCall = procedure(Window: PWindow; MenuNumber: LongWord; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 32)); - Call(Window, MenuNumber, IntuitionBase); -end; - -function OpenScreen(const NewScreen: PNewScreen): PScreen; -type - TLocalCall = function(const NewScreen: PNewScreen; Base: Pointer): PScreen; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 33)); - Result := Call(NewScreen, IntuitionBase); -end; - -function OpenWindow(const NewWindow: PNewWindow): PWindow; -type - TLocalCall = function(const NewWindow: PNewWindow; Base: Pointer): PWindow; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 34)); - Result := Call(NewWindow, IntuitionBase); -end; - -function OpenWorkBench: LongWord; -type - TLocalCall = function(Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 35)); - Result := Call(IntuitionBase); -end; - -procedure PrintIText(Rp: PRastPort; - const IText: PIntuiText; Left: LongInt; Top: LongInt); -type - TLocalCall = procedure(Rp: PRastPort; - const IText: PIntuiText; Left: LongInt; Top: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 36)); - Call(Rp, IText, Left, Top, IntuitionBase); -end; - -procedure RefreshGadgets(gadgets: PGadget; Window: PWindow; Requester: PRequester); -type - TLocalCall = procedure(gadgets: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 37)); - Call(gadgets, Window, Requester, IntuitionBase); -end; - -function RemoveGadget(Window: PWindow; Gadget: PGadget): Word; -type - TLocalCall = function(Window: PWindow; Gadget: PGadget; Base: Pointer): Word; - stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 38)); - Result := Call(Window, Gadget, IntuitionBase); -end; - -procedure ReportMouse(flag: LongInt; Window: PWindow); -type - TLocalCall = procedure(flag: LongInt; Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 39)); - Call(flag, Window, IntuitionBase); -end; - -function Request(Requester: PRequester; Window: PWindow): Boolean; -type - TLocalCall = function(Requester: PRequester; Window: PWindow; - Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 40)); - Result := Call(Requester, Window, IntuitionBase); -end; - -procedure ScreenToBack(Screen: PScreen); -type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 41)); - Call(Screen, IntuitionBase); -end; - -procedure ScreenToFront(Screen: PScreen); -type - TLocalCall = procedure(Screen: PScreen; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 42)); - Call(Screen, IntuitionBase); -end; - -function SetDMRequest(Window: PWindow; Requester: PRequester): Boolean; -type - TLocalCall = function(Window: PWindow; Requester: PRequester; - Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 43)); - Result := Call(Window, Requester, IntuitionBase); -end; - -function SetMenuStrip(Window: PWindow; Menu: pMenu): Boolean; -type - TLocalCall = function(Window: PWindow; Menu: pMenu; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 44)); - Result := Call(Window, Menu, IntuitionBase); -end; - -procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; - Width: LongInt; XOffset: LongInt; YOffset: LongInt); -type - TLocalCall = procedure(Window: PWindow; Pointer_: PWord; Height: LongInt; - Width: LongInt; XOffset: LongInt; YOffset: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 45)); - Call(Window, Pointer_, Height, Width, XOffset, YOffset, IntuitionBase); -end; - -procedure SetWindowTitles(Window: PWindow; const WindowTitle: PChar; - const ScreenTitle: PChar); -type - TLocalCall = procedure(Window: PWindow; const WindowTitle: PChar; - const ScreenTitle: PChar; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 46)); - Call(Window, WindowTitle, ScreenTitle, IntuitionBase); -end; - -procedure ShowTitle(Screen: PScreen; showIt: LongInt); -type - TLocalCall = procedure(Screen: PScreen; showIt: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 47)); - Call(Screen, showit, IntuitionBase); -end; - -procedure SizeWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); -type - TLocalCall = procedure(Window: PWindow; Dx: LongInt; Dy: LongInt; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 48)); - Call(Window, Dx, Dy, IntuitionBase); -end; - -function ViewAddress: PView; -type - TLocalCall = function(Base: Pointer): PView; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 49)); - Result := Call(IntuitionBase); -end; - -function ViewPortAddress(const Window: PWindow): PViewPort; -type - TLocalCall = function(Window: PWindow; Base: Pointer): PViewPort; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 50)); - Result := Call(Window, IntuitionBase); -end; - -procedure WindowToBack(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 51)); - Call(Window, IntuitionBase); -end; - -procedure WindowToFront(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 52)); - Call(Window, IntuitionBase); -end; - -function WindowLimits(Window: PWindow; WidthMin: LongInt; HeightMin: LongInt; - WidthMax: LongWord; HeightMax: LongWord): Boolean; -type - TLocalCall = function(Window: PWindow; WidthMin: LongInt; - HeightMin: LongInt; WidthMax: LongWord; HeightMax: LongWord; - Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 53)); - Result := Call(Window, WidthMin, HeightMin, WidthMax, HeightMax, IntuitionBase); -end; - -function SetPrefs(const Preferences: PPreferences; Size: LongInt; - Inform: LongInt): PPreferences; -type - TLocalCall = function(const Preferences: PPreferences; Size: LongInt; - Inform: LongInt; Base: Pointer): PPreferences; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 54)); - Result := Call(Preferences, Size, Inform, IntuitionBase); -end; - -function IntuiTextLength(const IText: PIntuiText): LongInt; -type - TLocalCall = function(const IText: PIntuiText; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 55)); - Result := Call(IText, IntuitionBase); -end; - -function WBenchToBack: Boolean; -type - TLocalCall = function(Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 56)); - Result := Call(IntuitionBase); -end; - -function WBenchToFront: Boolean; -type - TLocalCall = function(Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 57)); - Result := Call(IntuitionBase); -end; - -function AutoRequest(Window: PWindow; const Body: PIntuiText; - const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; - NFlag: LongWord; Width: LongWord; Height: LongWord): Boolean; -type - TLocalCall = function(Window: PWindow; const Body: PIntuiText; - const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; - NFlag: LongWord; Width: LongWord; Height: LongWord; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 58)); - Result := Call(Window, Body, PosText, NegText, PFlag, NFlag, Width, - Height, IntuitionBase); -end; - -procedure BeginRefresh(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 59)); - Call(Window, IntuitionBase); -end; - -function BuildSysRequest(Window: PWindow; const Body: PIntuiText; - const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; - Width: LongWord; Height: LongWord): PWindow; -type - TLocalCall = function(Window: PWindow; const Body: PIntuiText; - const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; - Width: LongWord; Height: LongWord; Base: Pointer): PWindow; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 60)); - Result := Call(Window, Body, PosText, NegText, Flags, Width, Height, IntuitionBase); -end; - -procedure EndRefresh(Window: PWindow; Complete: Boolean); -type - TLocalCall = procedure(Window: PWindow; Complete: Boolean; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 61)); - Call(Window, Complete, IntuitionBase); -end; - -procedure FreeSysRequest(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 62)); - Call(Window, IntuitionBase); -end; - -function MakeScreen(Screen: PScreen): LongInt; -type - TLocalCall = function(Screen: PScreen; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 63)); - Result := Call(Screen, IntuitionBase); -end; - -function RemakeDisplay: LongInt; -type - TLocalCall = function(Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 64)); - Result := Call(IntuitionBase); -end; - -function RethinkDisplay: LongInt; -type - TLocalCall = function(Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 65)); - Result := Call(IntuitionBase); -end; - -function AllocRemember(var RememberKey: PRemember; Size: LongWord; - Flags: LongWord): Pointer; -type - TLocalCall = function(var RememberKey: PRemember; Size: LongWord; - Flags: LongWord; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 66)); - Result := Call(RememberKey, Size, Flags, IntuitionBase); -end; - -procedure AlohaWorkbench(MsgPort: PMsgPort); -type - TLocalCall = procedure(MsgPort: PMsgPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 67)); - Call(MsgPort, IntuitionBase); -end; - -procedure FreeRemember(var RememberKey: PRemember; ReallyForget: LongInt); -type - TLocalCall = procedure(var RememberKey: PRemember; ReallyForget: LongInt; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 68)); - Call(RememberKey, ReallyForget, IntuitionBase); -end; - -function LockIBase(LockNumber: LongWord): LongWord; -type - TLocalCall = function(LockNumber: LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 69)); - Result := Call(LockNumber, IntuitionBase); -end; - -procedure UnlockIBase(LockNumber: LongWord); -type - TLocalCall = procedure(LockNumber: LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 70)); - Call(LockNumber, IntuitionBase); -end; - -function GetScreenData(buffer: Pointer; Size: LongWord; type_: LongWord; - const Screen: PScreen): Boolean; -type - TLocalCall = function(buffer: Pointer; Size: LongWord; type_: LongWord; - const Screen: PScreen; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 71)); - Result := Call(buffer, Size, type_, Screen, IntuitionBase); -end; - -procedure RefreshGList(gadgets: PGadget; Window: PWindow; - Requester: PRequester; NumGad: LongInt); -type - TLocalCall = procedure(gadgets: PGadget; Window: PWindow; - Requester: PRequester; NumGad: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 72)); - Call(gadgets, Window, Requester, NumGad, IntuitionBase); -end; - -function AddGList(Window: PWindow; Gadget: PGadget; Position: LongWord; - NumGad: LongInt; Requester: PRequester): Word; -type - TLocalCall = function(Window: PWindow; Gadget: PGadget; Position: LongWord; - NumGad: LongInt; Requester: PRequester; Base: Pointer): Word; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 73)); - Result := Call(Window, Gadget, Position, NumGad, Requester, IntuitionBase); -end; - -function RemoveGList(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt): Word; -type - TLocalCall = function(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt; - Base: Pointer): Word; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 74)); - Result := Call(RemPtr, Gadget, NumGad, IntuitionBase); -end; - -procedure ActivateWindow(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 75)); - Call(Window, IntuitionBase); -end; - -procedure RefreshWindowFrame(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 76)); - Call(Window, IntuitionBase); -end; - -function ActivateGadget(gadgets: PGadget; Window: PWindow; - Requester: PRequester): Boolean; -type - TLocalCall = function(gadgets: PGadget; Window: PWindow; - Requester: PRequester; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 77)); - Result := Call(gadgets, Window, Requester, IntuitionBase); -end; - -procedure NewModifyProp(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Flags: LongWord; HorizPot: LongWord; - VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; NumGad: LongInt); -type - TLocalCall = procedure(Gadget: PGadget; Window: PWindow; - Requester: PRequester; Flags: LongWord; HorizPot: LongWord; - VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; - NumGad: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 78)); - Call(Gadget, Window, Requester, Flags, HorizPot, VertPot, HorizBody, - VertBody, NumGad, IntuitionBase); -end; - -function QueryOverscan(DisplayID: LongWord; Rect: pRectangle; - OScanType: LongInt): LongInt; -type - TLocalCall = function(DisplayID: LongWord; Rect: pRectangle; - OScanType: LongInt; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 79)); - Result := Call(DisplayID, Rect, OScanType, IntuitionBase); -end; - -procedure MoveWindowInFrontOf(Window: PWindow; BehindWindow: PWindow); -type - TLocalCall = procedure(Window: PWindow; BehindWindow: PWindow; - Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 80)); - Call(Window, BehindWindow, IntuitionBase); -end; - -procedure ChangeWindowBox(Window: PWindow; Left: LongInt; Top: LongInt; - Width: LongInt; Height: LongInt); -type - TLocalCall = procedure(Window: PWindow; Left: LongInt; Top: LongInt; - Width: LongInt; Height: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 81)); - Call(Window, Left, Top, Width, Height, IntuitionBase); -end; - -function SetEditHook(hook: PHook): PHook; -type - TLocalCall = function(hook: PHook; Base: Pointer): PHook; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 82)); - Result := Call(hook, IntuitionBase); -end; - -function SetMouseQueue(Window: PWindow; queueLength: LongWord): LongInt; -type - TLocalCall = function(Window: PWindow; queueLength: LongWord; - Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 83)); - Result := Call(Window, queueLength, IntuitionBase); -end; - -procedure ZipWindow(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 84)); - Call(Window, IntuitionBase); -end; - -function LockPubScreen(const Name: PChar): PScreen; -type - TLocalCall = function(const Name: PChar; Base: Pointer): PScreen; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 85)); - Result := Call(Name, IntuitionBase); -end; - -procedure UnlockPubScreen(const Name: PChar; Screen: PScreen); -type - TLocalCall = procedure(const Name: PChar; Screen: PScreen; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 86)); - Call(Name, Screen, IntuitionBase); -end; - -function LockPubScreenList: pList; -type - TLocalCall = function(Base: Pointer): pList; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 87)); - Result := Call(IntuitionBase); -end; - -procedure UnlockPubScreenList; -type - TLocalCall = procedure(Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 88)); - Call(IntuitionBase); -end; - -function NextPubScreen(const Screen: PScreen; Namebuf: PChar): PChar; -type - TLocalCall = function(const Screen: PScreen; Namebuf: PChar; - Base: Pointer): PChar; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 89)); - Result := Call(Screen, Namebuf, IntuitionBase); -end; - -procedure SetDefaultPubScreen(const Name: PChar); -type - TLocalCall = procedure(const Name: PChar; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 90)); - Call(Name, IntuitionBase); -end; - -function SetPubScreenModes(modes: LongWord): Word; -type - TLocalCall = function(modes: LongWord; Base: Pointer): Word; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 91)); - Result := Call(modes, IntuitionBase); -end; - -function PubScreenStatus(Screen: PScreen; StatusFlags: LongWord): Word; -type - TLocalCall = function(Screen: PScreen; StatusFlags: LongWord; - Base: Pointer): Word; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 92)); - Result := Call(Screen, StatusFlags, IntuitionBase); -end; - -function ObtainGIRPort(GInfo: PGadgetInfo): PRastPort; -type - TLocalCall = function(GInfo: PGadgetInfo; Base: Pointer): PRastPort; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 93)); - Result := Call(GInfo, IntuitionBase); -end; - -procedure ReleaseGIRPort(Rp: PRastPort); -type - TLocalCall = procedure(Rp: PRastPort; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 94)); - Call(Rp, IntuitionBase); -end; - -procedure GadgetMouse(Gadget: PGadget; GInfo: PGadgetInfo; mousePoint: psmallint); -type - TLocalCall = procedure(Gadget: PGadget; GInfo: PGadgetInfo; - mousePoint: psmallint; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 95)); - Call(Gadget, GInfo, mousePoint, IntuitionBase); -end; - -function SetIPrefs(Data: Pointer; Length: LongWord; Typ: LongWord): LongWord; -type - TLocalCall = function(Data: Pointer; Length: LongWord; Typ: LongWord; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 96)); - Result := Call(Data, Length, Typ, IntuitionBase); -end; - -procedure GetDefaultPubScreen(NameBuffer: PChar); -type - TLocalCall = procedure(NameBuffer: PChar; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 97)); - Call(NameBuffer, IntuitionBase); -end; - -function EasyRequestArgs(Window: PWindow; - const easyStruct: PEasyStruct; IdcmpPtr: PLongWord; const args: Pointer): LongInt; -type - TLocalCall = function(Window: PWindow; - const easyStruct: PEasyStruct; IdcmpPtr: PLongWord; - const args: Pointer; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 98)); - EasyRequestArgs := Call(Window, easyStruct, IdcmpPtr, args, IntuitionBase); -end; - -function BuildEasyRequestArgs(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer): PWindow; -type - TLocalCall = function(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer; Base: Pointer): PWindow; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 99)); - Result := Call(Window, EasyStruct, Idcmp, Args, IntuitionBase); -end; - -function SysReqHandler(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt): LongInt; -type - TLocalCall = function(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 100)); - Result := Call(Window, IdcmpPtr, WaitInput, IntuitionBase); -end; - -function OpenWindowTagList(const NewWindow: PNewWindow; - const TagList: PTagItem): PWindow; -type - TOpenWindowTagList = function(const NewWindow: PNewWindow; - const TagList: PTagItem; Base: Pointer): PWindow; stdcall; -var - Call: TOpenWindowTagList; -begin - Call := TOpenWindowTagList(GetLibAdress(IntuitionBase, 101)); - OpenWindowTagList := Call(NewWindow, TagList, IntuitionBase); -end; - -function OpenScreenTagList(const NewScreen: PNewScreen;const tagList: PTagItem): PScreen; -type - TLocalCall = function(const NewScreen: PNewScreen;const tagList: PTagItem; Base: Pointer): PScreen; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 102)); - Result := Call(NewScreen, tagList, IntuitionBase); -end; - -procedure DrawImageState(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo); -type - TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 103)); - Call(Rp, Image, LeftOffset, TopOffset, State, DrawInfo, IntuitionBase); -end; - -function PointInImage(Point: LongWord; Image: PImage): Boolean; -type - TLocalCall = function(Point: LongWord; Image: PImage; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 104)); - Result := Call(Point, Image, IntuitionBase); -end; - -procedure EraseImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt); -type - TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 105)); - Call(Rp, Image, LeftOffset, TopOffset, IntuitionBase); -end; - -function NewObjectA(ClassPtr: PIClass;const ClassID: PChar;const TagList: PTagItem): Pointer; -type - TLocalCall = function(ClassPtr: PIClass;const ClassID: PChar; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 106)); - Result := Call(ClassPtr, ClassID, IntuitionBase); -end; - -procedure DisposeObject(Obj: Pointer); -type - TLocalCall = procedure(Obj: Pointer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 107)); - Call(Obj, IntuitionBase); -end; - -function SetAttrsA(Obj: Pointer; const TagList: PTagItem): LongWord; -type - TLocalCall = function(Obj: Pointer; - const TagList: PTagItem; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 108)); - Result := Call(Obj, TagList, IntuitionBase); -end; - -function GetAttr(attrID: LongWord; Obj: Pointer; storagePtr: PLongWord): LongWord; -type - TLocalCall = function(attrID: LongWord; Obj: Pointer; storagePtr: PLongWord; - Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 109)); - Result := Call(attrID, Obj, storagePtr, IntuitionBase); -end; - -function SetGadgetAttrsA(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem): LongWord; -type - TLocalCall = function(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 110)); - Result := Call(Gadget, Window, Requester, TagList, IntuitionBase); -end; - -function NextObject(ObjectPtrPtr: Pointer): PIClass; -type - TLocalCall = function(ObjectPtrPtr: Pointer; Base: Pointer): PIClass; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 111)); - Result := Call(ObjectPtrPtr, IntuitionBase); -end; - -function FindClass(ClassID: PChar): PIClass; -type - TLocalCall = function(ClassID: PChar; Base: Pointer): PIClass; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 112)); - Result := Call(ClassID, IntuitionBase); -end; - -function MakeClass(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord): PIClass; -type - TLocalCall = function(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord; Base: Pointer): PIClass; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 113)); - Result := Call(ClassID, SuperClassID, SuperClassPtr, InstanceSize, Flags, IntuitionBase); -end; - -procedure AddClass(ClassPtr: PIClass); -type - TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 114)); - Call(ClassPtr, IntuitionBase); -end; - -function GetScreenDrawInfo(Screen : PScreen) : PDrawInfo; -type - TLocalCall = function(Screen: PScreen; Base: Pointer): PDrawInfo; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 115)); - Result := Call(Screen, IntuitionBase); -end; - -procedure FreeScreenDrawInfo(Screen : PScreen; DrawInfo : PDrawInfo); -type - TLocalCall = procedure(Screen : PScreen; DrawInfo : PDrawInfo; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 116)); - Call(Screen, DrawInfo, IntuitionBase); -end; - -function ResetMenuStrip(Window: PWindow; Menu: PMenu) : Boolean; -type - TLocalCall = function(Window: PWindow; Menu: PMenu; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 117)); - Result := Call(Window, Menu, IntuitionBase); -end; - -procedure RemoveClass(ClassPtr : PIClass); -type - TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 118)); - Call(ClassPtr, IntuitionBase); -end; - -function FreeClass(ClassPtr : PIClass) : Boolean; -type - TLocalCall = function(ClassPtr : PIClass; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 119)); - Result := Call(ClassPtr, IntuitionBase); -end; - -function AllocScreenBuffer(Sc: PScreen; Bm: PBitMap; Flags: LongWord): PScreenBuffer; -type - TLocalCall = function(Sc: PScreen; Bm: PBitMap; Flags: LongWord; Base: Pointer): PScreenBuffer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 128)); - Result := Call(Sc, Bm, Flags, IntuitionBase); -end; - -procedure FreeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer); -type - TLocalCall = procedure(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 129)); - Call(Sc, Sb, IntuitionBase); -end; - -function ChangeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer): LongWord; -type - TLocalCall = function(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 130)); - Result := Call(Sc, Sb, IntuitionBase); -end; - -procedure ScreenDepth(Screen: PScreen; Flags: LongWord; Reserved: Pointer); -type - TLocalCall = procedure(Screen: PScreen; Flags: LongWord; Reserved: Pointer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 131)); - Call(Screen, Flags, Reserved, IntuitionBase); -end; - -procedure ScreenPosition(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt); -type - TLocalCall = procedure(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 132)); - Call(Screen, Flags, X1, Y1, X2, Y2, IntuitionBase); -end; - -procedure ScrollWindowRaster(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt); -type - TLocalCall = procedure(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 133)); - Call(Win, Dx, Dy, XMin, YMin, XMax, YMax, IntuitionBase); -end; - -procedure LendMenus(FromWindow: PWindow; ToWindow: PWindow); -type - TLocalCall = procedure(FromWindow: PWindow; ToWindow: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 134)); - Call(FromWindow, ToWindow, IntuitionBase); -end; - -function DoGadgetMethodA(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg): LongWord; -type - TLocalCall = function(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 135)); - Result := Call(Gad, Win, Req, Message, IntuitionBase); -end; - -procedure SetWindowPointerA(Win: PWindow;const Taglist: PTagItem); -type - TLocalCall = procedure(Win: PWindow;const Taglist: PTagItem; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 136)); - Call(Win, Taglist, IntuitionBase); -end; - -function TimedDisplayAlert(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord): Boolean; -type - TLocalCall = function(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 137)); - Result := Call(AlertNumber, String_, Height, Time, IntuitionBase); -end; - -procedure HelpControl(Win: PWindow; Flags: LongWord); -type - TLocalCall = procedure(Win: PWindow; Flags: LongWord; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 138)); - Call(Win, Flags, IntuitionBase); -end; - -function IsWindowVisible(Window: PWindow): LongWord; -type - TLocalCall = function(Window: PWindow; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 139)); - Result := Call(Window, IntuitionBase); -end; - -procedure ShowWindow(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 140)); - Call(Window, IntuitionBase); -end; - -procedure HideWindow(Window: PWindow); -type - TLocalCall = procedure(Window: PWindow; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 141)); - Call(Window, IntuitionBase); -end; - -function ChangeWindowShape(Window: PWindow; NewShape: PRegion; CallBack: PHook): PRegion; -type - TLocalCall = function(Window: PWindow; NewShape: PRegion; CallBack: PHook; Base: Pointer): PRegion; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 143)); - Result := Call(Window, NewShape, CallBack, IntuitionBase); -end; - -procedure SetDefaultScreenFont(TextFont: PTextFont); -type - TLocalCall = procedure(TextFont: PTextFont; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 144)); - Call(TextFont, IntuitionBase); -end; - -function DoNotify(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate): Pointer; -type - TLocalCall = function(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 145)); - Result := Call(Cl, O, Ic, Msg, IntuitionBase); -end; - -procedure FreeICData(ICData: Pointer); -type - TLocalCall = procedure(ICData: Pointer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 146)); - Call(ICData, IntuitionBase); -end; - -function AllocIntuiMessage(Window: PWindow): PIntuiMessage; -type - TLocalCall = function(Window: PWindow; Base: Pointer): PIntuiMessage; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 148)); - Result := Call(Window, IntuitionBase); -end; - -procedure FreeIntuiMessage(IMsg: PIntuiMessage); -type - TLocalCall = procedure(IMsg: PIntuiMessage; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 149)); - Call(IMsg, IntuitionBase); -end; - -procedure SendIntuiMessage(Window: PWindow; IMsg: PIntuiMessage); -type - TLocalCall = procedure(Window: PWindow; IMsg: PIntuiMessage; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 151)); - Call(Window, IMsg, IntuitionBase); -end; - -procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); -type - TLocalCall = procedure(ID: LongWord; Decor: PNewDecorator; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 153)); - Call(ID, Decor, IntuitionBase); -end; - -procedure WindowAction(Window: PWindow; Action: LongWord; Tags: PTagItem); -type - TLocalCall = procedure(Window: PWindow; Action: LongWord; Tags: PTagItem; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 157)); - Call(Window, Action, Tags, IntuitionBase); -end; - -procedure ScrollWindowRasterNoFill(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word); -type - TLocalCall = procedure(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 159)); - Call(Window, Dx, Dy, XMin, YMin, XMax, YMax, IntuitionBase); -end; - -function SetPointerBounds(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem): LongWord; -type - TLocalCall = function(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem; Base: Pointer): LongWord; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 160)); - Result := Call(Screen, Rect, Reserved, Tags, IntuitionBase); -end; - -function StartScreenNotifyTagList(Tags: PTagItem): Pointer; -type - TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 161)); - Result := Call(Tags, IntuitionBase); -end; - -function EndScreenNotify(Notify: Pointer): Boolean; -type - TLocalCall = function(Notify: Pointer; Base: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 162)); - Result := Call(Notify, IntuitionBase); -end; - -function GetMonitorList(Tags: PTagItem): Pointer; -type - TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 163)); - Result := Call(Tags, IntuitionBase); -end; - -procedure FreeMonitorList(Obj: Pointer); -type - TLocalCall = procedure(Obj: Pointer; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(IntuitionBase, 163)); - Call(Obj, IntuitionBase); -end; - -function SetAttrs(Obj: Pointer; const Tags: array of const): LongWord; -begin - SetAttrs := SetAttrsA(Obj, readintags(Tags)); -end; - -function OCLASS(O: Pointer): PIClass; -var - Obj: P_Object; -begin - Obj := P_Object(PtrUInt(O) - sizeof(T_Object)); - OCLASS := Obj^.o_Class; -end; - - -function Has_Children(Win: PWindow): Boolean; -begin - Result := Assigned(Win^.FirstChild); -end; - -function Is_Children(Win: PWindow): Boolean; -begin - Result := Assigned(Win^.Parent2); -end; - - - -initialization - IntuitionBase := OpenLibrary('intuition.library', 36); - -finalization - CloseLibrary(IntuitionBase); - -end. (* UNIT INTUITION *) diff --git a/packages/arosunits/src/keymap.pas b/packages/arosunits/src/keymap.pas deleted file mode 100644 index 16db018d6f..0000000000 --- a/packages/arosunits/src/keymap.pas +++ /dev/null @@ -1,170 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{ - Keymap.resource definitions and console.device key map definitions -} - -{ - History: - - Added the defines use_amiga_smartlink and - use_auto_openlib. Implemented autoopening - of the library. - 14 Jan 2003. - - Changed integer > SmallInt, - cardinal > longword. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se Nils Sjoholm -} - -unit Keymap; - -INTERFACE - -{$mode objfpc} - -uses exec, inputevent; - -Type - - PKeyMap = ^TKeyMap; - TKeyMap = record - km_LoKeyMapTypes : Pointer; - km_LoKeyMap : Pointer; - km_LoCapsable : Pointer; - km_LoRepeatable : Pointer; - km_HiKeyMapTypes : Pointer; - km_HiKeyMap : Pointer; - km_HiCapsable : Pointer; - km_HiRepeatable : Pointer; - end; - - - pKeymapNode = ^TKeyMapNode; - TKeyMapNode = record - kn_Node : TNode; { including name of Keymap } - kn_KeyMap : TKeyMap; - end; - -{ the structure of Keymap.resource } - - pKeyMapResource = ^TKeyMapResource; - TKeyMapResource = record - kr_Node : TNode; - kr_List : tList; { a list of KeyMapNodes } - end; - - -Const - -{ Key Map Types } - - KC_NOQUAL = 0; - KC_VANILLA = 7; { note that SHIFT+ALT+CTRL is VANILLA } - KCB_SHIFT = 0; - KCF_SHIFT = $01; - KCB_ALT = 1; - KCF_ALT = $02; - KCB_CONTROL = 2; - KCF_CONTROL = $04; - KCB_DOWNUP = 3; - KCF_DOWNUP = $08; - - KCB_DEAD = 5; { may be dead or modified by dead key: } - KCF_DEAD = $20; { use dead prefix bytes } - - KCB_STRING = 6; - KCF_STRING = $40; - - KCB_NOP = 7; - KCF_NOP = $80; - - -{ Dead Prefix Bytes } - - DPB_MOD = 0; - DPF_MOD = $01; - DPB_DEAD = 3; - DPF_DEAD = $08; - - DP_2DINDEXMASK = $0f; { mask for index for 1st of two dead keys } - DP_2DFACSHIFT = 4; { shift for factor for 1st of two dead keys } - -var KeyMapBase : pLibrary; - -const - KEYMAPNAME : PChar = 'Keymap.library'; - -function AskKeyMapDefault : PKeyMap; -function MapANSI(TheString : PChar; Count : LongInt; Buffer : PChar; Length : LongInt; KeyMap : PKeyMap) : LongInt; -function MapRawKey(Event : PInputEvent; Buffer : PChar; Length : LongInt; KeyMap : PKeyMap) : SmallInt; -procedure SetKeyMapDefault(KeyMap : PKeyMap); - -implementation - -function AskKeyMapDefault : PKeyMap; -type - TLocalCall = function(Base: Pointer): PKeyMap; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(KeyMapBase, 6)); - Result := Call(KeyMapBase); -end; - -function MapANSI(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap): LongInt; -type - TLocalCall = function(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(KeyMapBase, 8)); - Result := Call(TheString, Count, Buffer, Length, KeyMap, KeyMapBase); -end; - -function MapRawKey(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap) : SmallInt; -type - TLocalCall = function(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): SmallInt; stdcall; -var -Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(KeyMapBase, 7)); - Result := Call(Event, Buffer, Length, KeyMap, KeyMapBase); -end; - -procedure SetKeyMapDefault(KeyMap: PKeyMap); -type - TLocalCall = procedure(KeyMap: PKeyMap; Base: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(KeyMapBase, 5)); - Call(KeyMap, KeyMapBase); -end; - -initialization - KeyMapBase := OpenLibrary('keymap.library', 0); - -finalization - CloseLibrary(KeyMapBase); - -end. (* UNIT KEYMAP *) - - - diff --git a/packages/arosunits/src/layers.pas b/packages/arosunits/src/layers.pas deleted file mode 100644 index 7d41e8f2ea..0000000000 --- a/packages/arosunits/src/layers.pas +++ /dev/null @@ -1,568 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - History: - - Added the defines use_amiga_smartlink and - use_auto_openlib. Implemented autoopening - of the library. - 14 Jan 2003. - - Update for AmigaOS 3.9. - Changed start code for unit. - 06 Feb 2003. - - Changed integer > smallint, - cardinal > longword. - 09 Feb 2003. - - nils.sjoholm@mailbox.swipnet.se -} - -UNIT layers; - -INTERFACE -USES exec, agraphics, utility; - -const - - LAYERSIMPLE = 1; - LAYERSMART = 2; - LAYERSUPER = 4; - LAYERUPDATING = $10; - LAYERBACKDROP = $40; - LAYERREFRESH = $80; - LAYER_CLIPRECTS_LOST = $100; { during BeginUpdate } - { or during layerop } - { this happens if out of memory } - LMN_REGION = -1; - -type - pLayer_Info = ^tLayer_Info; - tLayer_Info = record - top_layer : pLayer; - check_lp : pLayer; { !! Private !! } - obs : pClipRect; - FreeClipRects : pClipRect; { !! Private !! } - PrivateReserve1, { !! Private !! } - PrivateReserve2 : Longint; { !! Private !! } - Lock : tSignalSemaphore; { !! Private !! } - gs_Head : tMinList; { !! Private !! } - PrivateReserve3 : smallint; { !! Private !! } - PrivateReserve4 : Pointer; { !! Private !! } - Flags : WORD; - fatten_count : Shortint; { !! Private !! } - LockLayersCount : Shortint; { !! Private !! } - PrivateReserve5 : smallint; { !! Private !! } - BlankHook, { !! Private !! } - LayerInfo_extra : Pointer; { !! Private !! } - end; - -const - NEWLAYERINFO_CALLED = 1; - -{ - * LAYERS_NOBACKFILL is the value needed to get no backfill hook - * LAYERS_BACKFILL is the value needed to get the default backfill hook - } - LAYERS_NOBACKFILL = 1; - LAYERS_BACKFILL = 0; - - LAYERSNAME : PChar = 'layers.library'; - -VAR LayersBase : pLibrary; -{ -FUNCTION BeginUpdate(l : pLayer) : LONGINT; -FUNCTION BehindLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -FUNCTION CreateBehindHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -FUNCTION CreateBehindLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -FUNCTION CreateUpfrontHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -FUNCTION CreateUpfrontLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -FUNCTION DeleteLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -PROCEDURE DisposeLayerInfo(li : pLayer_Info); -PROCEDURE DoHookClipRects(hook : pHook; rport : pRastPort;const rect : pRectangle); -PROCEDURE EndUpdate(layer : pLayer; flag : ULONG); -FUNCTION FattenLayerInfo(li : pLayer_Info) : LONGINT; -PROCEDURE InitLayers(li : pLayer_Info); -FUNCTION InstallClipRegion(layer : pLayer;const region : pRegion) : pRegion; -FUNCTION InstallLayerHook(layer : pLayer; hook : pHook) : pHook; -FUNCTION InstallLayerInfoHook(li : pLayer_Info;const hook : pHook) : pHook; -PROCEDURE LockLayer(dummy : LONGINT; layer : pLayer); -PROCEDURE LockLayerInfo(li : pLayer_Info); -PROCEDURE LockLayers(li : pLayer_Info); -FUNCTION MoveLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -FUNCTION MoveLayerInFrontOf(layer_to_move : pLayer; other_layer : pLayer) : LONGINT; -FUNCTION MoveSizeLayer(layer : pLayer; dx : LONGINT; dy : LONGINT; dw : LONGINT; dh : LONGINT) : LONGINT; -FUNCTION NewLayerInfo : pLayer_Info; -PROCEDURE ScrollLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT); -FUNCTION SizeLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -PROCEDURE SortLayerCR(layer : pLayer; dx : LONGINT; dy : LONGINT); -PROCEDURE SwapBitsRastPortClipRect(rp : pRastPort; cr : pClipRect); -PROCEDURE ThinLayerInfo(li : pLayer_Info); -PROCEDURE UnlockLayer(layer : pLayer); -PROCEDURE UnlockLayerInfo(li : pLayer_Info); -PROCEDURE UnlockLayers(li : pLayer_Info); -FUNCTION UpfrontLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -FUNCTION WhichLayer(li : pLayer_Info; x : LONGINT; y : LONGINT) : pLayer; -} -{Here we read how to compile this unit} -{You can remove this include and use a define instead} - -{This is a variable that knows how the unit is compiled} -var - LAYERSIsCompiledHow : longint; - -IMPLEMENTATION - - -{ - -FUNCTION BeginUpdate(l : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L l,A0 - MOVEA.L LayersBase,A6 - JSR -078(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION BehindLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -054(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateBehindHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L hook,A3 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -192(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateBehindLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -042(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateUpfrontHookLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; hook : pHook; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L hook,A3 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -186(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION CreateUpfrontLayer(li : pLayer_Info; bm : pBitMap; x0 : LONGINT; y0 : LONGINT; x1 : LONGINT; y1 : LONGINT; flags : LONGINT; bm2 : pBitMap) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L bm,A1 - MOVE.L x0,D0 - MOVE.L y0,D1 - MOVE.L x1,D2 - MOVE.L y1,D3 - MOVE.L flags,D4 - MOVEA.L bm2,A2 - MOVEA.L LayersBase,A6 - JSR -036(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION DeleteLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -090(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE DisposeLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -150(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE DoHookClipRects(hook : pHook; rport : pRastPort;const rect : pRectangle); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L hook,A0 - MOVEA.L rport,A1 - MOVEA.L rect,A2 - MOVEA.L LayersBase,A6 - JSR -216(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE EndUpdate(layer : pLayer; flag : ULONG); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVE.L flag,D0 - MOVEA.L LayersBase,A6 - JSR -084(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION FattenLayerInfo(li : pLayer_Info) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -156(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE InitLayers(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -030(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION InstallClipRegion(layer : pLayer;const region : pRegion) : pRegion; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVEA.L region,A1 - MOVEA.L LayersBase,A6 - JSR -174(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION InstallLayerHook(layer : pLayer; hook : pHook) : pHook; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVEA.L hook,A1 - MOVEA.L LayersBase,A6 - JSR -198(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION InstallLayerInfoHook(li : pLayer_Info;const hook : pHook) : pHook; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L hook,A1 - MOVEA.L LayersBase,A6 - JSR -204(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE LockLayer(dummy : LONGINT; layer : pLayer); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -096(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE LockLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -120(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE LockLayers(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -108(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION MoveLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -060(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MoveLayerInFrontOf(layer_to_move : pLayer; other_layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer_to_move,A0 - MOVEA.L other_layer,A1 - MOVEA.L LayersBase,A6 - JSR -168(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION MoveSizeLayer(layer : pLayer; dx : LONGINT; dy : LONGINT; dw : LONGINT; dh : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVE.L dw,D2 - MOVE.L dh,D3 - MOVEA.L LayersBase,A6 - JSR -180(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION NewLayerInfo : pLayer_Info; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L LayersBase,A6 - JSR -144(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE ScrollLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -072(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION SizeLayer(dummy : LONGINT; layer : pLayer; dx : LONGINT; dy : LONGINT) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -066(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE SortLayerCR(layer : pLayer; dx : LONGINT; dy : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVE.L dx,D0 - MOVE.L dy,D1 - MOVEA.L LayersBase,A6 - JSR -210(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE SwapBitsRastPortClipRect(rp : pRastPort; cr : pClipRect); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L rp,A0 - MOVEA.L cr,A1 - MOVEA.L LayersBase,A6 - JSR -126(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE ThinLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -162(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnlockLayer(layer : pLayer); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L layer,A0 - MOVEA.L LayersBase,A6 - JSR -102(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnlockLayerInfo(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -138(A6) - MOVEA.L (A7)+,A6 - END; -END; - -PROCEDURE UnlockLayers(li : pLayer_Info); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVEA.L LayersBase,A6 - JSR -114(A6) - MOVEA.L (A7)+,A6 - END; -END; - -FUNCTION UpfrontLayer(dummy : LONGINT; layer : pLayer) : LONGINT; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L dummy,A0 - MOVEA.L layer,A1 - MOVEA.L LayersBase,A6 - JSR -048(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -FUNCTION WhichLayer(li : pLayer_Info; x : LONGINT; y : LONGINT) : pLayer; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L li,A0 - MOVE.L x,D0 - MOVE.L y,D1 - MOVEA.L LayersBase,A6 - JSR -132(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; -} - - - - -END. (* UNIT LAYERS *) - - - diff --git a/packages/arosunits/src/longarray.pas b/packages/arosunits/src/longarray.pas deleted file mode 100644 index b3f1fe2a9e..0000000000 --- a/packages/arosunits/src/longarray.pas +++ /dev/null @@ -1,73 +0,0 @@ -{ - 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 - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{ - History: - - A simple unit that helps to build array of longint. - Uses array of const so don't forget to use - $mode objfpc. - - 05 Nov 2002. - - nils.sjoholm@mailbox.swipnet.se -} - -unit longarray; - -{$mode objfpc} - -interface - -function readinlongs(const args : array of const): pointer; - -implementation - -uses pastoc; -type - TMyArgs = array of LongInt; - PMyArgs = ^TMyArgs; - -var - argarray : PMyArgs;//array [0..20] of longint; - -function readinlongs(const args : array of const): pointer; -var - i : longint; - -begin - - for i := 0 to High(args) do begin - case args[i].vtype of - vtinteger : argarray^[i] := longint(args[i].vinteger); - vtpchar : argarray^[i] := longint(args[i].vpchar); - vtchar : argarray^[i] := longint(args[i].vchar); - vtpointer : argarray^[i] := longint(args[i].vpointer); - vtstring : argarray^[i] := longint(pas2c(args[i].vstring^)); - vtboolean : argarray^[i] := longint(byte(args[i].vboolean)); - end; - end; - readinlongs := @(argarray^[0]); -end; - -initialization - New(argarray); - SetLength(argarray^, 200); -finalization - SetLength(argarray^, 0); - Dispose(argarray); -end. - diff --git a/packages/arosunits/src/mui.pas b/packages/arosunits/src/mui.pas index bd3d2aff06..4bca5a484a 100644 --- a/packages/arosunits/src/mui.pas +++ b/packages/arosunits/src/mui.pas @@ -3872,7 +3872,7 @@ end; FUNCTION MUI_NewObjectA(class_ : pCHar; tags : pTagItem) : pObject_; type - TLocalCall = function(class_ : pCHar; tags : pTagItem; Base: Pointer): pObject_; stdcall; + TLocalCall = function(class_ : pCHar; tags : pTagItem; Base: Pointer): pObject_; cdecl; var Call: TLocalCall; begin @@ -3882,7 +3882,7 @@ end; PROCEDURE MUI_DisposeObject(obj : pObject_); type - TLocalCall = procedure(obj : pObject_; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3892,7 +3892,7 @@ end; FUNCTION MUI_RequestA(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER) : LONGINT; type - TLocalCall = function(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(app : POINTER; win : POINTER; flags : LONGBITS; title : pCHar; gadgets : pChar; format : pChar; params : POINTER; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -3902,7 +3902,7 @@ end; FUNCTION MUI_AllocAslRequest(typ : ULONG; tags : pTagItem) : POINTER; type - TLocalCall = function(typ : ULONG; tags : pTagItem; Base: Pointer): POINTER; stdcall; + TLocalCall = function(typ : ULONG; tags : pTagItem; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -3912,7 +3912,7 @@ end; FUNCTION MUI_AslRequest(req : POINTER; tags : pTagItem) : BOOLEAN; type - TLocalCall = function(req : POINTER; tags : pTagItem; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(req : POINTER; tags : pTagItem; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -3922,7 +3922,7 @@ end; PROCEDURE MUI_FreeAslRequest(req : POINTER); type - TLocalCall = procedure(req : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(req : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3932,7 +3932,7 @@ end; FUNCTION MUI_Error : LONGINT; type - TLocalCall = function(Base: Pointer): LONGINT; stdcall; + TLocalCall = function(Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -3942,7 +3942,7 @@ end; FUNCTION MUI_SetError(errnum : LONGINT) : LONGINT; type - TLocalCall = function(errnum : LONGINT; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(errnum : LONGINT; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -3952,7 +3952,7 @@ end; FUNCTION MUI_GetClass(name : pChar) : pIClass; type - TLocalCall = function(name : pChar; Base: Pointer): pIClass; stdcall; + TLocalCall = function(name : pChar; Base: Pointer): pIClass; cdecl; var Call: TLocalCall; begin @@ -3962,7 +3962,7 @@ end; PROCEDURE MUI_FreeClass(cl : pIClass); type - TLocalCall = procedure(cl : pIClass; Base: Pointer); stdcall; + TLocalCall = procedure(cl : pIClass; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3972,7 +3972,7 @@ end; PROCEDURE MUI_RequestIDCMP(obj : pObject_; flags : ULONG); type - TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3982,7 +3982,7 @@ end; PROCEDURE MUI_RejectIDCMP(obj : pObject_; flags : ULONG); type - TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -3992,7 +3992,7 @@ end; PROCEDURE MUI_Redraw(obj : pObject_; flags : ULONG); type - TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(obj : pObject_; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4002,7 +4002,7 @@ end; FUNCTION MUI_CreateCustomClass(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER) : pMUI_CustomClass; type - TLocalCall = function(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER; LibBase: Pointer): pMUI_CustomClass; stdcall; + TLocalCall = function(base : pLibrary; supername : pChar; supermcc : pMUI_CustomClass; datasize : LONGINT; dispatcher : POINTER; LibBase: Pointer): pMUI_CustomClass; cdecl; var Call: TLocalCall; begin @@ -4012,7 +4012,7 @@ end; FUNCTION MUI_DeleteCustomClass(mcc : pMUI_CustomClass) : BOOLEAN; type - TLocalCall = function(mcc : pMUI_CustomClass; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(mcc : pMUI_CustomClass; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4022,7 +4022,7 @@ end; FUNCTION MUI_MakeObjectA(typ : LONGINT; params : pULONG) : pObject_; type - TLocalCall = function(typ : LONGINT; params : pULONG; Base: Pointer): pObject_; stdcall; + TLocalCall = function(typ : LONGINT; params : pULONG; Base: Pointer): pObject_; cdecl; var Call: TLocalCall; begin @@ -4032,7 +4032,7 @@ end; FUNCTION MUI_Layout(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG) : BOOLEAN; type - TLocalCall = function(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(obj : pObject_; l : LONGINT; t : LONGINT; w : LONGINT; h : LONGINT; flags : ULONG; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4042,7 +4042,7 @@ end; FUNCTION MUI_ObtainPen(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG) : LONGINT; type - TLocalCall = function(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG; Base: Pointer): LONGINT; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; spec : pMUI_PenSpec; flags : ULONG; Base: Pointer): LONGINT; cdecl; var Call: TLocalCall; begin @@ -4052,7 +4052,7 @@ end; PROCEDURE MUI_ReleasePen(mri : pMUI_RenderInfo; pen : LONGINT); type - TLocalCall = procedure(mri : pMUI_RenderInfo; pen : LONGINT; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; pen : LONGINT; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4062,7 +4062,7 @@ end; FUNCTION MUI_AddClipping(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint) : POINTER; type - TLocalCall = function(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint; Base: Pointer): POINTER; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; l : smallint; t : smallint; w : smallint; h : smallint; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -4072,7 +4072,7 @@ end; PROCEDURE MUI_RemoveClipping(mri : pMUI_RenderInfo; h : POINTER); type - TLocalCall = procedure(mri : pMUI_RenderInfo; h : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; h : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4082,7 +4082,7 @@ end; FUNCTION MUI_AddClipRegion(mri : pMUI_RenderInfo; region : pRegion) : POINTER; type - TLocalCall = function(mri : pMUI_RenderInfo; region : pRegion; Base: Pointer): POINTER; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; region : pRegion; Base: Pointer): POINTER; cdecl; var Call: TLocalCall; begin @@ -4092,7 +4092,7 @@ end; PROCEDURE MUI_RemoveClipRegion(mri : pMUI_RenderInfo; region : POINTER); type - TLocalCall = procedure(mri : pMUI_RenderInfo; region : POINTER; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; region : POINTER; Base: Pointer); cdecl; var Call: TLocalCall; begin @@ -4102,7 +4102,7 @@ end; FUNCTION MUI_BeginRefresh(mri : pMUI_RenderInfo; flags : ULONG) : BOOLEAN; type - TLocalCall = function(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer): BOOLEAN; stdcall; + TLocalCall = function(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer): BOOLEAN; cdecl; var Call: TLocalCall; begin @@ -4112,7 +4112,7 @@ end; PROCEDURE MUI_EndRefresh(mri : pMUI_RenderInfo; flags : ULONG); type - TLocalCall = procedure(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer); stdcall; + TLocalCall = procedure(mri : pMUI_RenderInfo; flags : ULONG; Base: Pointer); cdecl; var Call: TLocalCall; begin diff --git a/packages/arosunits/src/pastoc.pas b/packages/arosunits/src/pastoc.pas deleted file mode 100644 index 1b89378749..0000000000 --- a/packages/arosunits/src/pastoc.pas +++ /dev/null @@ -1,131 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 2000-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} -{ - History: - - Added the define use_amiga_smartlink. - 13 Jan 2003. - - nils.sjoholm@mailbox.swipnet.se Nils Sjoholm -} - -unit PasToC; - - -interface - -function Pas2C(var s : String): PChar; - -implementation - -const - MEMF_ANY = %000000000000000000000000; { * Any type of memory will do * } - MEMF_PUBLIC = %000000000000000000000001; - - MEMF_CLEAR = %000000010000000000000000; - -Type - - ULONG = Longint; - - pRemember = ^tRemember; - tRemember = record - NextRemember : pRemember; - RememberSize : ULONG; - Memory : Pointer; - end; - -var - myrememberkey : pRemember; - remember_exit : pointer; - -{FUNCTION fpcAllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER; -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L rememberKey,A0 - MOVE.L size,D0 - MOVE.L flags,D1 - MOVEA.L _IntuitionBase,A6 - JSR -396(A6) - MOVEA.L (A7)+,A6 - MOVE.L D0,@RESULT - END; -END; - -PROCEDURE fpcFreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT); -BEGIN - ASM - MOVE.L A6,-(A7) - MOVEA.L rememberKey,A0 - MOVE.L reallyForget,D0 - MOVEA.L _IntuitionBase,A6 - JSR -408(A6) - MOVEA.L (A7)+,A6 - END; -END; } - -Function StringPcharCopy(Dest: PChar; Source: String):PChar; -var - counter : byte; -Begin - counter := 0; - { if empty pascal string } - { then setup and exit now } - if Source = '' then - Begin - Dest[0] := #0; - StringPCharCopy := Dest; - exit; - end; - for counter:=1 to length(Source) do - begin - Dest[counter-1] := Source[counter]; - end; - { terminate the string } - Dest[counter] := #0; - StringPcharCopy:=Dest; -end; - -function Pas2C(var s : string): PChar; -var - themem : Pointer; -begin - s := s + #0; - Pas2C := @(s[1]); - {//themem := fpcAllocRemember(myrememberkey,length(s)+1, MEMF_CLEAR or MEMF_PUBLIC); - GetMem(TheMem,length(s)+1); - if themem = nil then begin - writeln('Can''t allocate memory for string'); - halt(20); - end else begin - StringPCharCopy(themem,s); - Pas2C := themem; - end;} -end; - -procedure ReleasePasToC; -begin - //ExitProc := remember_exit; - //FreeMem(myrememberkey); - //fpcFreeRemember(myrememberkey,1); -end; - -begin - myrememberkey := nil; - remember_exit := ExitProc; - ExitProc := @ReleasePasToC; -end. diff --git a/packages/arosunits/src/tagsarray.pas b/packages/arosunits/src/tagsarray.pas deleted file mode 100644 index a8cc12fee1..0000000000 --- a/packages/arosunits/src/tagsarray.pas +++ /dev/null @@ -1,117 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 2002 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{ - History: - - First version of this unit. - Just use this unit when you want to - use taglist. - - 09 Nov 2002 - - nils.sjoholm@mailbox.swipnet.se -} - -unit tagsarray; -{$mode objfpc} - - -interface - -uses Exec, Utility; - -type - TTagsList= array of ttagitem; - PMyTags= ^TTagsList; - - -function readintags(const args : array of const): pTagItem; -procedure AddTags(var Taglist: TTagsList; const args: array of const); -function GetTagPtr(TagList: TTagsList): pTagItem; - -implementation - -uses pastoc; - -var - mytags : PMyTags;//array [0..200] of ttagitem; - - -procedure AddTags(var Taglist: TTagsList; const args: array of const); -var - i: LongInt; - ii: LongInt; -begin - ii := Length(TagList); - SetLength(TagList, Length(TagList) + (Length(args) DIV 2)); - for i := 0 to High(args) do - begin - if (not Odd(i)) then - begin - TagList[ii].ti_tag := longint(Args[i].vinteger); - end else - begin - case Args[i].vtype of - vtinteger : TagList[ii].ti_data := longint(Args[i].vinteger); - vtboolean : TagList[ii].ti_data := longint(byte(Args[i].vboolean)); - vtpchar : TagList[ii].ti_data := longint(Args[i].vpchar); - vtchar : TagList[ii].ti_data := longint(Args[i].vchar); - vtstring : TagList[ii].ti_data := longint(pas2c(Args[i].vstring^)); - vtpointer : TagList[ii].ti_data := longint(Args[i].vpointer); - end; - inc(ii); - end; - end; -end; - -function GetTagPtr(TagList: TTagsList): pTagItem; -begin - AddTags(TagList, [TAG_END, TAG_END]); - GetTagPtr := @(TagList[0]); -end; - -function readintags(const args : array of const): pTagItem; -var - i : longint; - ii : longint; -begin - ii := 0; - for i := 0 to high(args) do begin - if (not odd(i)) then begin - mytags^[ii].ti_tag := longint(Args[i].vinteger); - end else begin - case Args[i].vtype of - vtinteger : mytags^[ii].ti_data := longint(Args[i].vinteger); - vtboolean : mytags^[ii].ti_data := longint(byte(Args[i].vboolean)); - vtpchar : mytags^[ii].ti_data := longint(Args[i].vpchar); - vtchar : mytags^[ii].ti_data := longint(Args[i].vchar); - vtstring : mytags^[ii].ti_data := longint(pas2c(Args[i].vstring^)); - vtpointer : mytags^[ii].ti_data := longint(Args[i].vpointer); - end; - inc(ii); - end; - end; - readintags := @(mytags^[0]); -end; - -initialization - New(MyTags); - SetLength(MyTags^, 200); -finalization - SetLength(MyTags^, 0); - Dispose(MyTags); -end. diff --git a/packages/arosunits/src/timer.pas b/packages/arosunits/src/timer.pas deleted file mode 100644 index b464303d1c..0000000000 --- a/packages/arosunits/src/timer.pas +++ /dev/null @@ -1,145 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{ - History: - Removed the var for all functions. - 06 Sep 2000. - - Added the define use_amiga_smartlink. - 13 Jan 2003. - - nils.sjoholm@mailbox.swipnet.se - -} - -unit timer; - -INTERFACE - -uses exec; - -Const - -{ unit defintions } - UNIT_MICROHZ = 0; - UNIT_VBLANK = 1; - UNIT_ECLOCK = 2; - UNIT_WAITUNTIL = 3; - UNIT_WAITECLOCK = 4; - - TIMERNAME : PChar = 'timer.device'; - -Type - - ptimeval = ^ttimeval; - ttimeval = record - tv_secs : ULONG; - tv_micro : ULONG; - end; - - ptimerequest = ^ttimerequest; - ttimerequest = record - tr_node : tIORequest; - tr_time : ttimeval; - end; - - pEClockVal = ^tEClockVal; - tEClockVal = record - ev_hi : ULONG; - ev_lo : ULONG; - end; - - -Const - -{ IO_COMMAND to use for adding a timer } - TR_ADDREQUEST = CMD_NONSTD; - TR_GETSYSTIME = CMD_NONSTD + 1; - TR_SETSYSTIME = CMD_NONSTD + 2; - -{ To use any of the routines below, TimerBase must be set to point - to the timer.device, either by calling CreateTimer or by pulling - the device pointer from a valid TimeRequest, i.e. - - TimerBase := TimeRequest.io_Device; - - _after_ you have called OpenDevice on the timer. - } - -var - TimerBase : Pointer; - -Procedure AddTime( Dest, Source : ptimeval); -Function CmpTime( Dest, Source : ptimeval) : ULONG; -Procedure SubTime( Dest, Source : ptimeval); -function ReadEClock(Dest : pEClockVal): longint; -procedure GetSysTime( Dest : ptimeval); - -IMPLEMENTATION - -Procedure AddTime(Dest, Source: ptimeval); -type - TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(TimerBase, 7)); - Call(Dest, Source, TimerBase); -end; - -Function CmpTime( Dest, Source : ptimeval) : ULONG; -type - TLocalCall = function(Dest, Source : ptimeval; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(TimerBase, 9)); - CmpTime := Call(Dest, Source, TimerBase); -end; - -Procedure SubTime( Dest, Source : ptimeval); -type - TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(TimerBase, 8)); - Call(Dest, Source, TimerBase); -end; - -function ReadEClock(Dest : pEClockVal): longint; -type - TLocalCall = function(Dest : pEClockVal; LibBase: Pointer): longint; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(TimerBase, 10)); - ReadEClock := Call(Dest, TimerBase); -end; - -procedure GetSysTime(Dest: ptimeval); -type - TLocalCall = procedure(Dest: ptimeval; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(TimerBase, 11)); - Call(Dest, TimerBase); -end; - - -end. diff --git a/packages/arosunits/src/utility.pas b/packages/arosunits/src/utility.pas deleted file mode 100644 index 68c2a7e1fb..0000000000 --- a/packages/arosunits/src/utility.pas +++ /dev/null @@ -1,772 +0,0 @@ -{ - This file is part of the Free Pascal run time library. - - A file in Amiga system run time library. - Copyright (c) 1998-2003 by Nils Sjoholm - member of the Amiga RTL development team. - - See the file COPYING.FPC, included in this distribution, - for details about the copyright. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - - **********************************************************************} - -{ - History: - - Added functions and procedures with array of const. - For use with fpc 1.0.7. Thay are in systemvartags. - 11 Nov 2002. - - - 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 -} - - -unit utility; - -{$mode objfpc} - -INTERFACE -uses exec; - - -Type - pClockData = ^tClockData; - tClockData = record - sec : Word; - min : Word; - hour : Word; - mday : Word; - month : Word; - year : Word; - wday : Word; - END; - - pHook = ^tHook; - tHook = record - h_MinNode : tMinNode; - h_Entry : Pointer; { assembler entry point } - h_SubEntry : Pointer; { often HLL entry point } - h_Data : Pointer; { owner specific } - END; - -{ - * Hook calling conventions: - * A0 - pointer to hook data structure itself - * A1 - pointer to parameter structure ("message") typically - * beginning with a longword command code, which makes - * sense in the context in which the hook is being used. - * A2 - Hook specific address data ("object," e.g, GadgetInfo) - * - * Control will be passed to the routine h_Entry. For many - * High-Level Languages (HLL), this will be an assembly language - * stub which pushes registers on the stack, does other setup, - * and then calls the function at h_SubEntry. - * - * The C standard receiving code is: - * CDispatcher( hook, object, message ) - * struct Hook *hook; - * APTR object; - * APTR message; - * - * NOTE that register natural order differs from this convention - * for C parameter order, which is A0,A2,A1. - * - * The assembly language stub for "vanilla" C parameter conventions - * could be: - - _hookEntry: - move.l a1,-(sp) ; push message packet pointer - move.l a2,-(sp) ; push object pointer - move.l a0,-(sp) ; push hook pointer - move.l h_SubEntry(a0),a0 ; fetch C entry point ... - jsr (a0) ; ... and call it - lea 12(sp),sp ; fix stack - rts - - * with this function as your interface stub, you can write - * a Hook setup function as: - - SetupHook( hook, c_function, userdata ) - struct Hook *hook; - ULONG (*c_function)(); - VOID *userdata; - - ULONG (*hookEntry)(); - - hook->h_Entry = hookEntry; - hook->h_SubEntry = c_function; - hook->h_Data = userdata; - - - * with Lattice C pragmas, you can put the C function in the - * h_Entry field directly if you declare the function: - -ULONG __saveds __asm -CDispatcher( register __a0 struct Hook *hook, - register __a2 VOID *object, - register __a1 ULONG *message ); - * - ***} - - { Namespace definitions } - - -Type -{ The named object structure } - pNamedObject = ^tNamedObject; - tNamedObject = record - no_Object : Pointer; { Your pointer, for whatever you want } - END; - -const -{ Tags for AllocNamedObject() } - ANO_NameSpace = 4000; { Tag to define namespace } - ANO_UserSpace = 4001; { tag to define userspace } - ANO_Priority = 4002; { tag to define priority } - ANO_Flags = 4003; { tag to define flags } - -{ Flags for tag ANO_Flags } - NSB_NODUPS = 0; - NSB_CASE = 1; - - NSF_NODUPS = 1; { Default allow duplicates } - NSF_CASE = 2; { Default to caseless... } - - - { Control attributes for Pack/UnpackStructureTags() } - - -{ PackTable definition: - * - * The PackTable is a simple array of LONGWORDS that are evaluated by - * PackStructureTags() and UnpackStructureTags(). - * - * The table contains compressed information such as the tag offset from - * the base tag. The tag offset has a limited range so the base tag is - * defined in the first longword. - * - * After the first longword, the fields look as follows: - * - * +--------- 1 = signed, 0 = unsigned (for bits, 1=inverted boolean) - * | - * | +------ 00 = Pack/Unpack, 10 = Pack, 01 = Unpack, 11 = special - * | / \ - * | | | +-- 00 = Byte, 01 = Integer, 10 = Long, 11 = Bit - * | | | / \ - * | | | | | /----- For bit operations: 1 = TAG_EXISTS is TRUE - * | | | | | | - * | | | | | | /-------------------- Tag offset from base tag value - * | | | | | | | \ - * m n n o o p q q q q q q q q q q r r r s s s s s s s s s s s s s - * \ | | | - * Bit offset (for bit operations) ----/ | | - * \ | - * Offset into data structure -----------------------------------/ - * - * A -1 longword signifies that the next longword will be a new base tag - * - * A 0 longword signifies that it is the end of the pack table. - * - * What this implies is that there are only 13-bits of address offset - * and 10 bits for tag offsets from the base tag. For most uses this - * should be enough, but when this is not, either multiple pack tables - * or a pack table with extra base tags would be able to do the trick. - * The goal here was to make the tables small and yet flexible enough to - * handle most cases. - } - -const - PSTB_SIGNED =31; - PSTB_UNPACK =30; { Note that these are active low... } - PSTB_PACK =29; { Note that these are active low... } - PSTB_EXISTS =26; { Tag exists bit true flag hack... } - - PSTF_SIGNED = $80000000; - PSTF_UNPACK = $40000000; - PSTF_PACK = $20000000; - - PSTF_EXISTS = $4000000; - - -{***************************************************************************} - - - PKCTRL_PACKUNPACK = $00000000; - PKCTRL_PACKONLY = $40000000; - PKCTRL_UNPACKONLY = $20000000; - - PKCTRL_BYTE = $80000000; - PKCTRL_WORD = $88000000; - PKCTRL_LONG = $90000000; - - PKCTRL_UBYTE = $00000000; - PKCTRL_UWORD = $08000000; - PKCTRL_ULONG = $10000000; - - PKCTRL_BIT = $18000000; - PKCTRL_FLIPBIT = $98000000; - - -{***************************************************************************} - - -{ Macros used by the next batch of macros below. Normally, you don't use - * this batch directly. Then again, some folks are wierd - } - - - -{***************************************************************************} - - -{ Some handy dandy macros to easily create pack tables - * - * Use PACK_STARTTABLE() at the start of a pack table. You pass it the - * base tag value that will be handled in the following chunk of the pack - * table. - * - * PACK_ENDTABLE() is used to mark the end of a pack table. - * - * PACK_NEWOFFSET() lets you change the base tag value used for subsequent - * entries in the table - * - * PACK_ENTRY() lets you define an entry in the pack table. You pass it the - * base tag value, the tag of interest, the type of the structure to use, - * the field name in the structure to affect and control bits (combinations of - * the various PKCTRL_XXX bits) - * - * PACK_BYTEBIT() lets you define a bit-control entry in the pack table. You - * pass it the same data as PACK_ENTRY, plus the flag bit pattern this tag - * affects. This macro should be used when the field being affected is byte - * sized. - * - * PACK_WORDBIT() lets you define a bit-control entry in the pack table. You - * pass it the same data as PACK_ENTRY, plus the flag bit pattern this tag - * affects. This macro should be used when the field being affected is Integer - * sized. - * - * PACK_LONGBIT() lets you define a bit-control entry in the pack table. You - * pass it the same data as PACK_ENTRY, plus the flag bit pattern this tag - * affects. This macro should be used when the field being affected is longword - * sized. - * - * EXAMPLE: - * - * ULONG packTable[] = - * ( - * PACK_STARTTABLE(GA_Dummy), - * PACK_ENTRY(GA_Dummy,GA_Left,Gadget,LeftEdge,PKCTRL_WORD|PKCTRL_PACKUNPACK), - * PACK_ENTRY(GA_Dummy,GA_Top,Gadget,TopEdge,PKCTRL_WORD|PKCTRL_PACKUNPACK), - * PACK_ENTRY(GA_Dummy,GA_Width,Gadget,Width,PKCTRL_UWORD|PKCTRL_PACKUNPACK), - * PACK_ENTRY(GA_Dummy,GA_Height,Gadget,Height,PKCTRL_UWORD|PKCTRL_PACKUNPACK), - * PACK_WORDBIT(GA_Dummy,GA_RelVerify,Gadget,Activation,PKCTRL_BIT|PKCTRL_PACKUNPACK,GACT_RELVERIFY) - * PACK_ENDTABLE - * ); - } - - -{ ======================================================================= } -{ ==== TagItem ========================================================== } -{ ======================================================================= } -{ This data type may propagate through the system for more general use. - * In the meantime, it is used as a general mechanism of extensible data - * arrays for parameter specification and property inquiry (coming soon - * to a display controller near you). - * - * In practice, an array (or chain of arrays) of TagItems is used. - } -Type - Tag = LongWord; - pTag = ^Tag; - - pTagItem = ^tTagItem; - tTagItem = record - ti_Tag : Tag; - ti_Data : LongWord; - END; - - ppTagItem = ^pTagItem; - -{ ---- system tag values ----------------------------- } -CONST - TAG_DONE = 0; { terminates array of TagItems. ti_Data unused } - TAG_END = TAG_DONE; - TAG_IGNORE = 1; { ignore this item, not END of array } - TAG_MORE = 2; { ti_Data is pointer to another array of TagItems - * note that this tag terminates the current array - } - TAG_SKIP = 3; { skip this AND the next ti_Data items } - -{ differentiates user tags from control tags } - TAG_USER = $80000000; { differentiates user tags from system tags} - -{* If the TAG_USER bit is set in a tag number, it tells utility.library that - * the tag is not a control tag (like TAG_DONE, TAG_IGNORE, TAG_MORE) and is - * instead an application tag. "USER" means a client of utility.library in - * general, including system code like Intuition or ASL, it has nothing to do - * with user code. - *} - - -{ Tag filter logic specifiers for use with FilterTagItems() } - TAGFILTER_AND = 0; { exclude everything but filter hits } - TAGFILTER_NOT = 1; { exclude only filter hits } - -{ Mapping types for use with MapTags() } - MAP_REMOVE_NOT_FOUND = 0; { remove tags that aren't in mapList } - MAP_KEEP_NOT_FOUND = 1; { keep tags that aren't in mapList } - - - -Type - pUtilityBase = ^tUtilityBase; - tUtilityBase = record - ub_LibNode : tLibrary; - ub_Language : Byte; - ub_Reserved : Byte; - END; - -function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean; -function AllocateTagItems(num : ULONG) : 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 CallHookPktA(h : pHook;obj, paramPkt : APTR) : ULONG; -function CallHookPkt(h : pHook;obj : Pointer; const tags : Array Of Const) : LongWord; -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;const TagList : pTagItem) : ULONG; -function GetUniqueID : ULONG; -procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG); -function NamedObjectName(Obj : pNamedObject) : STRPTR; -function NextTagItem(Item : ppTagItem) : 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); -function SDivMod32( dividend , divisor : LongInt) : LongInt; -function SMult32(Arg1, Arg2 : LongInt) : LongInt; -function SMult64(Arg1, Arg2 : LongInt) : LongInt; -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(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG; - - -IMPLEMENTATION - -uses - tagsarray,longarray; - -function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean; -type - TLocalCall = function(nameSpace,obj : pNamedObject; LibBase: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 37)); - AddNamedObject := Call(nameSpace,obj, AOS_UtilityBase); -end; - -function AllocateTagItems(num : ULONG) : pTagItem; -type - TLocalCall = function(num : ULONG; LibBase: Pointer): pTagItem; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 11)); - AllocateTagItems := Call(num, AOS_UtilityBase); -end; - -function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject; -type - TLocalCall = function(const name : STRPTR;const TagList : pTagItem; LibBase: Pointer): pNamedObject; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 38)); - AllocNamedObjectA := Call(name, TagList, AOS_UtilityBase); -end; - -procedure Amiga2Date(amigatime : ULONG;resultat : pClockData); -type - TLocalCall = procedure(amigatime : ULONG;resultat : pClockData; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 20)); - Call(amigatime, resultat, AOS_UtilityBase); -end; - -procedure ApplyTagChanges(TagList : pTagItem;const ChangeList : pTagItem); -type - TLocalCall = procedure(TagList : pTagItem;const ChangeList : pTagItem; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 31)); - Call(TagList, ChangeList, AOS_UtilityBase); -end; - -function AttemptRemNamedObject(obj : pNamedObject) : LongInt; -type - TLocalCall = function(obj : pNamedObject; LibBase: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 39)); - AttemptRemNamedObject := Call(obj, AOS_UtilityBase); -end; - -function CallHookPktA(h : pHook;obj, paramPkt : APTR) : ULONG; -type - TLocalCall = function(h : pHook;obj, paramPkt : APTR; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 17)); - CallHookPktA := Call(h, obj, paramPkt, AOS_UtilityBase); -end; - -function CallHookPkt(h : pHook;obj : Pointer; const tags : Array Of Const) : LongWord; -begin - CallHookPkt := CallHookPktA(h, obj , readinlongs(tags)); -end; - -function CheckDate(const date : pClockData) : ULONG; -type - TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 22)); - CheckDate := Call(date, AOS_UtilityBase); -end; - -function CloneTagItems(const tagList : pTagItem) : pTagItem; -type - TLocalCall = function(const tagList : pTagItem; LibBase: Pointer): pTagItem; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 12)); - CloneTagItems := Call(tagList, AOS_UtilityBase); -end; - -function Date2Amiga(const date : pClockData) : ULONG; -type - TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 21)); - Date2Amiga := Call(date, AOS_UtilityBase); -end; - -procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG); -type - TLocalCall = procedure(changelist, oldvalues : pTagItem;apply : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 9)); - Call(changelist, oldvalues, apply, AOS_UtilityBase); -end; - -function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG; -type - TLocalCall = function(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 16)); - FilterTagItems := Call(taglist, tagArray, logic, AOS_UtilityBase); -end; - -function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject; -type - TLocalCall = function(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject; LibBase: Pointer): pNamedObject; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 40)); - FindNamedObject := Call(nameSpace, name, lastobject, AOS_UtilityBase); -end; - -function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem; -type - TLocalCall = function(TagVal : Tag;const TagList : pTagItem; LibBase: Pointer): pTagItem; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 5)); - FindTagItem := Call(TagVal, TagList, AOS_UtilityBase); -end; - -procedure FreeNamedObject(Obj : pNamedObject); -type - TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 41)); - Call(Obj, AOS_UtilityBase); -end; - -procedure FreeTagItems(TagList : pTagItem); -type - TLocalCall = procedure(TagList : pTagItem; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 13)); - Call(TagList, AOS_UtilityBase); -end; - -function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG; -type - TLocalCall = function(tagval : Tag;default : ULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 6)); - GetTagData := Call(tagval, default, TagList, AOS_UtilityBase); -end; - -function GetUniqueID : ULONG; -type - TLocalCall = function(LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 45)); - GetUniqueID := Call(AOS_UtilityBase); -end; - -procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG); -type - TLocalCall = procedure(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 10)); - Call(TagList, maplist, IncludeMiss, AOS_UtilityBase); -end; - -function NamedObjectName(Obj : pNamedObject) : STRPTR; -type - TLocalCall = function(Obj : pNamedObject; LibBase: Pointer): STRPTR; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 42)); - NamedObjectName := Call(Obj, AOS_UtilityBase); -end; - -function NextTagItem(Item : ppTagItem) : pTagItem; -type - TLocalCall = function(Item : ppTagItem; LibBase: Pointer): pTagItem; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 8)); - NextTagItem := Call(Item, AOS_UtilityBase); -end; - -function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG; -type - TLocalCall = function(InitialFlags : ULONG;const TagList, boolmap : pTagItem; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 7)); - PackBoolTags := Call(InitialFlags, TagList, boolmap, AOS_UtilityBase); -end; - -function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG; -type - TLocalCall = function(packk: APTR;const packTable : pULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 35)); - PackStructureTags := Call(packk, packTable, TagList, AOS_UtilityBase); -end; - -procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem); -type - TLocalCall = procedure(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 14)); - Call(cloneTagItem, OriginalTagItems, AOS_UtilityBase); -end; - -procedure ReleaseNamedObject(Obj : pNamedObject); -type - TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 43)); - Call(Obj, AOS_UtilityBase); -end; - -procedure RemNamedObject(Obj : pNamedObject;Msg : pointer); -type - TLocalCall = procedure(Obj : pNamedObject;Msg : pointer; LibBase: Pointer); stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 44)); - Call(Obj, Msg, AOS_UtilityBase); -end; - -function SDivMod32(dividend , divisor : LongInt) : LongInt; -type - TLocalCall = function(dividend , divisor : LongInt; LibBase: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 25)); - SDivMod32 := Call(dividend , divisor, AOS_UtilityBase); -end; - -function SMult32(Arg1, Arg2 : LongInt) : LongInt; -type - TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 23)); - SMult32 := Call(Arg1, Arg2, AOS_UtilityBase); -end; - -function SMult64(Arg1, Arg2 : LongInt) : LongInt; -type - TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 33)); - SMult64 := Call(Arg1, Arg2, AOS_UtilityBase); -end; - -function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt; -type - TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR; LibBase: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 27)); - Stricmp := Call(Str1, Str2, AOS_UtilityBase); -end; - -function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt; -type - TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt; LibBase: Pointer): LongInt; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 28)); - Strnicmp := Call(Str1, Str2, len, AOS_UtilityBase); -end; - -function TagInArray(t : Tag;const TagArray : pULONG) : Boolean; -type - TLocalCall = function(t : Tag;const TagArray : pULONG; LibBase: Pointer): Boolean; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 15)); - TagInArray := Call(t, TagArray, AOS_UtilityBase); -end; - -function ToLower(c : ULONG) : Char; -type - TLocalCall = function(c : ULONG; LibBase: Pointer): Char; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 30)); - ToLower := Call(c, AOS_UtilityBase); -end; - -function ToUpper(c : ULONG) : Char; -type - TLocalCall = function(c : ULONG; LibBase: Pointer): Char; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 29)); - ToUpper := Call(c, AOS_UtilityBase); -end; - -function UDivMod32(dividend , divisor : ULONG) : ULONG; -type - TLocalCall = function(dividend , divisor : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 26)); - UDivMod32 := Call(dividend , divisor, AOS_UtilityBase); -end; - -function UMult32(Arg1, Arg2 : ULONG) : ULONG; -type - TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 24)); - UMult32 := Call(Arg1, Arg2, AOS_UtilityBase); -end; - -function UMult64(Arg1, Arg2 : ULONG) : ULONG; -type - TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 34)); - UMult64 := Call(Arg1, Arg2, AOS_UtilityBase); -end; - -function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG; -type - TLocalCall = function(const pac: APTR;const packTable: pULONG;TagList : pTagItem; LibBase: Pointer): ULONG; stdcall; -var - Call: TLocalCall; -begin - Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 36)); - UnpackStructureTags := Call(pac, packTable, TagList, AOS_UtilityBase); -end; - -end. diff --git a/rtl/aros/Makefile b/rtl/aros/Makefile index 71e72ea9a5..8d75683b3c 100755 --- a/rtl/aros/Makefile +++ b/rtl/aros/Makefile @@ -1,8 +1,8 @@ # -# Don't edit, this file is generated by FPCMake Version 2.0.0 [2011/08/07] +# Don't edit, this file is generated by FPCMake Version 2.0.0 [2013/01/13] # default: all -MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian i386-nativent i386-iphonesim i386-aros m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded powerpc-wii sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-solaris x86_64-darwin x86_64-win64 x86_64-embedded x86_64-aros arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded mipsel-linux +MAKEFILETARGETS=i386-aros BSDs = freebsd netbsd openbsd darwin UNIXs = linux $(BSDs) solaris qnx haiku LIMIT83fs = go32v2 os2 emx watcom @@ -303,982 +303,22 @@ override FPCOPT+=-Ur endif OBJPASDIR=$(RTL)/objpas GRAPHDIR=$(INC)/graph -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif ifeq ($(FULL_TARGET),i386-aros) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects fpintres exeinfo lineinfo -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_LOADERS+=prt0 +override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas iso7185 strings dos heaptrc ctypes sysutils fgl classes strutils math typinfo varutils fmtbcd charset ucomplex getopts matrix variants types rtlconsts sysconst dateutil objects pastoc longarray tagsarray exec amigados utility keymap timer inputevent layers intuition agraphics video keyboard mouse fpintres exeinfo lineinfo endif ifeq ($(FULL_TARGET),i386-aros) override TARGET_LOADERS+=prt0 endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_LOADERS+=prt0 -endif -ifeq ($(FULL_TARGET),i386-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-win32) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-os2) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-beos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-haiku) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-solaris) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-qnx) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-netware) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-emx) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-watcom) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-wince) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-symbian) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-nativent) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif ifeq ($(FULL_TARGET),i386-aros) override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil endif -ifeq ($(FULL_TARGET),m68k-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-atari) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-palmos) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-wince) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-gba) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-nds) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),arm-symbian) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),avr-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),armeb-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override TARGET_RSTS+=math rtlconsts varutils typinfo variants classes sysconst dateutil -endif -override INSTALL_FPCPACKAGE=y -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-win32) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-os2) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-beos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-haiku) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-solaris) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-qnx) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-netware) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-emx) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-watcom) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-wince) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-symbian) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-nativent) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-aros) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-atari) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-palmos) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-wince) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-gba) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-nds) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),arm-symbian) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),avr-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),armeb-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) -endif -ifeq ($(FULL_TARGET),i386-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-go32v2) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-win32) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-os2) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-freebsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-beos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-haiku) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-solaris) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-qnx) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-netware) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-openbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-wdosx) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-emx) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-watcom) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-netwlibc) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-wince) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-symbian) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-nativent) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),i386-iphonesim) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) +override INSTALL_FPCPACKAGE=y +ifeq ($(FULL_TARGET),i386-aros) +override COMPILER_INCLUDEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) endif ifeq ($(FULL_TARGET),i386-aros) override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) endif -ifeq ($(FULL_TARGET),m68k-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-freebsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-amiga) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-atari) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-openbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-palmos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),m68k-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-amiga) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-macos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-morphos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc-wii) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-netbsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-solaris) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),sparc-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-freebsd) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-solaris) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-win64) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),x86_64-aros) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-palmos) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-wince) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-gba) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-nds) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),arm-symbian) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc64-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc64-darwin) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),powerpc64-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),avr-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),armeb-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),armeb-embedded) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif -ifeq ($(FULL_TARGET),mipsel-linux) -override COMPILER_SOURCEDIR+=$(INC) $(PROCINC) $(CPU_TARGET) $(COMMON) -endif ifdef REQUIRE_UNITSDIR override UNITSDIR+=$(REQUIRE_UNITSDIR) endif diff --git a/rtl/aros/Makefile.fpc b/rtl/aros/Makefile.fpc index 7b82a3bb3b..cca171e47c 100644 --- a/rtl/aros/Makefile.fpc +++ b/rtl/aros/Makefile.fpc @@ -12,8 +12,11 @@ units=$(SYSTEMUNIT) objpas macpas iso7185 strings \ sysutils fgl classes strutils math typinfo varutils fmtbcd \ charset ucomplex getopts matrix \ variants types rtlconsts sysconst dateutil objects \ + pastoc longarray tagsarray exec amigados utility keymap \ + timer inputevent layers \ + intuition agraphics video keyboard mouse \ fpintres exeinfo lineinfo -# \ +# # exec timer doslib utility hardware inputevent graphics layers \ # intuition aboxlib mui \ # these can be moved to packages later diff --git a/rtl/aros/agraphics.pas b/rtl/aros/agraphics.pas new file mode 100644 index 0000000000..949dc8dd6a --- /dev/null +++ b/rtl/aros/agraphics.pas @@ -0,0 +1,4338 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + + { + History: + + Found bugs in, + WritePixelArray8, + WritePixelLine8, + ReadPixelArray8, + ReadPixelLine8, + WriteChunkyPixels. + They all had one argument(array_) defined as pchar, + should be pointer, fixed. + 20 Aug 2000. + + InitTmpRas had wrong define for the buffer arg. + Changed from pchar to PLANEPTR. + 23 Aug 2000. + + Compiler had problems with Text, changed to GText. + 24 Aug 2000. + + Added functions and procedures with array of const. + For use with fpc 1.0.7. They are in systemvartags. + 11 Nov 2002. + + Added the defines use_amiga_smartlink and + use_auto_openlib. + 13 Jan 2003. + + Update for AmifaOS 3.9. + Changed start code for unit. + Bugs in ChangeSprite, GetRGB32, LoadRGB32, + LoadRGB4 and PolyDraw, fixed. + 01 Feb 2003. + + Changed integer > smallint, + cardinal > longword. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se + +} + +unit agraphics; + +{$mode objfpc} + +INTERFACE + +uses exec, {hardware,} utility; + + +const + + BITSET = $8000; + BITCLR = 0; + +type + + PBltNode = ^TBltNode; + TBltNode = record + m: PBltNode; + _function: Pointer; + stat: Byte; + BlitSize: SmallInt; + BeamSync: SmallInt; + Cleanup: Pointer; + end; + + pRectangle = ^tRectangle; + tRectangle = record + MinX,MinY : Word; + MaxX,MaxY : Word; + end; + + pRect32 = ^tRect32; + tRect32 = record + MinX,MinY : Longint; + MaxX,MaxY : Longint; + end; + + pPoint = ^tPoint; + tPoint = record + x,y : Word; + end; + + PLANEPTR = Pointer; + + pBitMap = ^tBitMap; + tBitMap = record + BytesPerRow : Word; + Rows : Word; + Flags : Byte; + Depth : Byte; + pad : Word; + Planes : Array [0..7] of PLANEPTR; + end; +{* flags for AllocBitMap, etc. *} +const + BMB_CLEAR = 0; + BMB_DISPLAYABLE = 1; + BMB_INTERLEAVED = 2; + BMB_STANDARD = 3; + BMB_MINPLANES = 4; + + BMF_CLEAR = (1 shl BMB_CLEAR); + BMF_DISPLAYABLE = (1 shl BMB_DISPLAYABLE); + BMF_INTERLEAVED = (1 shl BMB_INTERLEAVED); + BMF_STANDARD = (1 shl BMB_STANDARD); + BMF_MINPLANES = (1 shl BMB_MINPLANES); + +{* the following are for GetBitMapAttr() *} + BMA_HEIGHT = 0; + BMA_DEPTH = 4; + BMA_WIDTH = 8; + BMA_FLAGS = 12; + + +TYPE + + pRegionRectangle = ^tRegionRectangle; + tRegionRectangle = record + Next, Prev : pRegionRectangle; + bounds : tRectangle; + END; + + pRegion = ^tRegion; + tRegion = record + bounds : tRectangle; + RegionRectangle : pRegionRectangle; + END; + +{ structures used by and constructed by windowlib.a } +{ understood by rom software } +type + pClipRect = ^tClipRect; //checked 20.12.2012 ALB + tClipRect = record + Next : pClipRect; { roms used to find next ClipRect } + prev : pClipRect; { ignored by roms, used by windowlib } + lobs : Pointer; { ignored by roms, used by windowlib (LayerPtr)} + BitMap : pBitMap; + bounds : tRectangle; { set up by windowlib, used by roms } + _p1, + _p2 : Pointer; { system reserved } + reserved : Longint; { system use } + Flags : Longint; { only exists in layer allocation } + end; + + pLayer = ^tLayer; //checked 20.12.2012 ALB + tLayer = record + front, + back : pLayer; { ignored by roms } + ClipRect : pClipRect; { read by roms to find first cliprect } + rp : Pointer; { (RastPortPtr) ignored by roms, I hope } + bounds : tRectangle; { ignored by roms } + reserved : Array [0..3] of Byte; + priority : Word; { system use only } + Flags : Word; { obscured ?, Virtual BitMap? } + SuperBitMap : pBitMap; + SuperClipRect : pClipRect; { super bitmap cliprects if + VBitMap != 0} + { else damage cliprect list for refresh } + Window : Pointer; { reserved for user interface use } + Scroll_X, + Scroll_Y : Word; + cr, + cr2, + crnew : pClipRect; { used by dedice } + SuperSaveClipRects : pClipRect; { preallocated cr's } + cliprects : pClipRect; { system use during refresh } + LayerInfo : Pointer; { points to head of the list } + Lock : tSignalSemaphore; + BackFill : pHook; + reserved1 : ULONG; + ClipRegion : Pointer; + saveClipRects : Pointer; { used to back out when in trouble} + Width, + Height : smallint; + reserved2 : Array [0..17] of Byte; + { this must stay here } + DamageList : Pointer; { list of rectangles to refresh + through } + end; + + tChangeLayerShapeMsg = record //checked 20.12.2012 ALB + NewShape: pRegion; + ClipRect: pClipRect; + shape: pRegion; + end; + + tCollectPixelsLayerMsg = record //checked 20.12.2012 ALB + xSrc: LongInt; + ySrc: LongInt; + width: LongInt; + height: LongInt; + xDest: LongInt; + yDest: LongInt; + bm: pBitmap; + layer: pLayer; + minterm: ULONG; + end; + + tShapeHookMsg = record //checked 20.12.2012 ALB + Action: LongInt; + Layer: pLayer; + ActualShape: pRegion; + NewBounds: TRectangle; + OldBounds: TRectangle; + end; + +const + +{ internal cliprect flags } + + CR_NEEDS_NO_CONCEALED_RASTERS = 1; + CR_NEEDS_NO_LAYERBLIT_DAMAGE = 2; + + +{ defines for code values for getcode } + + ISLESSX = 1; + ISLESSY = 2; + ISGRTRX = 4; + ISGRTRY = 8; + + +{------ Font Styles ------------------------------------------------} + + FS_NORMAL = 0; { normal text (no style bits set) } + FSB_EXTENDED = 3; { extended face (wider than normal) } + FSF_EXTENDED = 8; + FSB_ITALIC = 2; { italic (slanted 1:2 right) } + FSF_ITALIC = 4; + FSB_BOLD = 1; { bold face text (ORed w/ shifted) } + FSF_BOLD = 2; + FSB_UNDERLINED = 0; { underlined (under baseline) } + FSF_UNDERLINED = 1; + + FSB_COLORFONT = 6; { this uses ColorTextFont structure } + FSF_COLORFONT = $40; + FSB_TAGGED = 7; { the TextAttr is really an TTextAttr, } + FSF_TAGGED = $80; + + +{------ Font Flags -------------------------------------------------} + FPB_ROMFONT = 0; { font is in rom } + FPF_ROMFONT = 1; + FPB_DISKFONT = 1; { font is from diskfont.library } + FPF_DISKFONT = 2; + FPB_REVPATH = 2; { designed path is reversed (e.g. left) } + FPF_REVPATH = 4; + FPB_TALLDOT = 3; { designed for hires non-interlaced } + FPF_TALLDOT = 8; + FPB_WIDEDOT = 4; { designed for lores interlaced } + FPF_WIDEDOT = 16; + FPB_PROPORTIONAL = 5; { character sizes can vary from nominal } + FPF_PROPORTIONAL = 32; + FPB_DESIGNED = 6; { size is "designed", not constructed } + FPF_DESIGNED = 64; + FPB_REMOVED = 7; { the font has been removed } + FPF_REMOVED = 128; + +{***** TextAttr node, matches text attributes in RastPort *********} + +type + + pTextAttr = ^tTextAttr; + tTextAttr = record + ta_Name : STRPTR; { name of the font } + ta_YSize : Word; { height of the font } + ta_Style : Byte; { intrinsic font style } + ta_Flags : Byte; { font preferences and flags } + end; + + pTTextAttr = ^tTTextAttr; + tTTextAttr = record + tta_Name : STRPTR; { name of the font } + tta_YSize : Word; { height of the font } + tta_Style : Byte; { intrinsic font style } + tta_Flags : Byte; { font preferences AND flags } + tta_Tags : pTagItem; { extended attributes } + end; + +{***** Text Tags **************************************************} +CONST + TA_DeviceDPI = (1+TAG_USER); { Tag value is Point union: } + { Hi Longint XDPI, Lo Longint YDPI } + + MAXFONTMATCHWEIGHT = 32767; { perfect match from WeighTAMatch } + + + +{***** TextFonts node *********************************************} +Type + + pTextFont = ^tTextFont; + tTextFont = record + tf_Message : tMessage; { reply message for font removal } + { font name in LN \ used in this } + tf_YSize : Word; { font height | order to best } + tf_Style : Byte; { font style | match a font } + tf_Flags : Byte; { preferences and flags / request. } + tf_XSize : Word; { nominal font width } + tf_Baseline : Word; { distance from the top of char to baseline } + tf_BoldSmear : Word; { smear to affect a bold enhancement } + + tf_Accessors : Word; { access count } + + tf_LoChar : Byte; { the first character described here } + tf_HiChar : Byte; { the last character described here } + tf_CharData : Pointer; { the bit character data } + + tf_Modulo : Word; { the row modulo for the strike font data } + tf_CharLoc : Pointer; { ptr to location data for the strike font } + { 2 words: bit offset then size } + tf_CharSpace : Pointer; { ptr to words of proportional spacing data } + tf_CharKern : Pointer; { ptr to words of kerning data } + end; + + +{----- tfe_Flags0 (partial definition) ----------------------------} +CONST + TE0B_NOREMFONT = 0; { disallow RemFont for this font } + TE0F_NOREMFONT = $01; + +Type + + pTextFontExtension = ^tTextFontExtension; + tTextFontExtension = record { this structure is read-only } + tfe_MatchWord : Word; { a magic cookie for the extension } + tfe_Flags0 : Byte; { (system private flags) } + tfe_Flags1 : Byte; { (system private flags) } + tfe_BackPtr : pTextFont; { validation of compilation } + tfe_OrigReplyPort : pMsgPort; { original value in tf_Extension } + tfe_Tags : pTagItem; { Text Tags for the font } + tfe_OFontPatchS, { (system private use) } + tfe_OFontPatchK : Pointer; { (system private use) } + { this space is reserved for future expansion } + END; + +{***** ColorTextFont node *****************************************} +{----- ctf_Flags --------------------------------------------------} +CONST + CT_COLORMASK = $000F; { mask to get to following color styles } + CT_COLORFONT = $0001; { color map contains designer's colors } + CT_GREYFONT = $0002; { color map describes even-stepped } + { brightnesses from low to high } + CT_ANTIALIAS = $0004; { zero background thru fully saturated char } + + CTB_MAPCOLOR = 0; { map ctf_FgColor to the rp_FgPen IF it's } + CTF_MAPCOLOR = $0001; { is a valid color within ctf_Low..ctf_High } + +{----- ColorFontColors --------------------------------------------} +Type + pColorFontColors = ^tColorFontColors; + tColorFontColors = record + cfc_Reserved, { *must* be zero } + cfc_Count : Word; { number of entries in cfc_ColorTable } + cfc_ColorTable : Pointer; { 4 bit per component color map packed xRGB } + END; + +{----- ColorTextFont ----------------------------------------------} + + pColorTextFont = ^tColorTextFont; + tColorTextFont = record + ctf_TF : tTextFont; + ctf_Flags : Word; { extended flags } + ctf_Depth, { number of bit planes } + ctf_FgColor, { color that is remapped to FgPen } + ctf_Low, { lowest color represented here } + ctf_High, { highest color represented here } + ctf_PlanePick, { PlanePick ala Images } + ctf_PlaneOnOff : Byte; { PlaneOnOff ala Images } + ctf_ColorFontColors : pColorFontColors; { colors for font } + ctf_CharData : Array[0..7] of APTR; {pointers to bit planes ala tf_CharData } + END; + +{***** TextExtent node ********************************************} + + pTextExtent = ^tTextExtent; + tTextExtent = record + te_Width, { same as TextLength } + te_Height : Word; { same as tf_YSize } + te_Extent : tRectangle; { relative to CP } + END; + + +const + + COPPER_MOVE = 0; { pseude opcode for move #XXXX,dir } + COPPER_WAIT = 1; { pseudo opcode for wait y,x } + CPRNXTBUF = 2; { continue processing with next buffer } + CPR_NT_LOF = $8000; { copper instruction only for Longint frames } + CPR_NT_SHT = $4000; { copper instruction only for long frames } + CPR_NT_SYS = $2000; { copper user instruction only } +type + +{ Note: The combination VWaitAddr and HWaitAddr replace a three way + union in C. The three possibilities are: + + nxtList : CopListPtr; or + + VWaitPos : Longint; + HWaitPos : Longint; or + + DestAddr : Longint; + DestData : Longint; +} + + pCopIns = ^tCopIns; + tCopIns = record + OpCode : smallint; { 0 = move, 1 = wait } + VWaitAddr : smallint; { vertical or horizontal wait position } + HWaitData : smallint; { destination Pointer or data to send } + end; + +{ structure of cprlist that points to list that hardware actually executes } + + pcprlist = ^tcprlist; + tcprlist = record + Next : pcprlist; + start : psmallint; { start of copper list } + MaxCount : smallint; { number of long instructions } + end; + + pCopList = ^tCopList; + tCopList = record + Next : pCopList; { next block for this copper list } + CopList : pCopList; { system use } + ViewPort : Pointer; { system use } + CopIns : pCopIns; { start of this block } + CopPtr : pCopIns; { intermediate ptr } + CopLStart : psmallint; { mrgcop fills this in for Long Frame} + CopSStart : psmallint; { mrgcop fills this in for Longint Frame} + Count : smallint; { intermediate counter } + MaxCount : smallint; { max # of copins for this block } + DyOffset : smallint; { offset this copper list vertical waits } + SLRepeat : Word; + Flags : Word; + end; + + pUCopList = ^tUCopList; + tUCopList = record + Next : pUCopList; + FirstCopList : pCopList; { head node of this copper list } + CopList : pCopList; { node in use } + end; + + pcopinit = ^tcopinit; + tcopinit = record + vsync_hblank : array [0..1] of word; + diagstrt : Array [0..11] of word; + fm0 : array [0..1] of word; + diwstart : array [0..9] of word; + bplcon2 : array [0..1] of word; + sprfix : array [0..(2*8)] of word; + sprstrtup : Array [0..(2*8*2)] of Word; + wait14 : array [0..1] of word; + norm_hblank : array [0..1] of word; + jump : array [0..1] of word; + wait_forever : array [0..5] of word; + sprstop : Array [0..7] of Word; + end; + + + + pAreaInfo = ^tAreaInfo; + tAreaInfo = record + VctrTbl : Pointer; { ptr to start of vector table } + VctrPtr : Pointer; { ptr to current vertex } + FlagTbl : Pointer; { ptr to start of vector flag table } + FlagPtr : Pointer; { ptrs to areafill flags } + Count : smallint; { number of vertices in list } + MaxCount : smallint; { AreaMove/Draw will not allow Count>MaxCount} + FirstX, + FirstY : smallint; { first point for this polygon } + end; + + pTmpRas = ^tTmpRas; + tTmpRas = record + RasPtr : Pointer; + Size : Longint; + end; + +{ unoptimized for 32bit alignment of pointers } + + pGelsInfo = ^tGelsInfo; + tGelsInfo = record + sprRsrvd : Shortint; { flag of which sprites to reserve from + vsprite system } + Flags : Byte; { system use } + gelHead, + gelTail : Pointer; { (VSpritePtr) dummy vSprites for list management} + + { pointer to array of 8 WORDS for sprite available lines } + + nextLine : Pointer; + + { pointer to array of 8 pointers for color-last-assigned to vSprites } + + lastColor : Pointer; + collHandler : Pointer; { (collTablePtr) Pointeres of collision routines } + leftmost, + rightmost, + topmost, + bottommost : smallint; + firstBlissObj, + lastBlissObj : Pointer; { system use only } + end; + + pRastPort = ^tRastPort; + tRastPort = record + Layer : pLayer; { LayerPtr } + BitMap : pBitMap; { BitMapPtr } + AreaPtrn : Pointer; { ptr to areafill pattern } + TmpRas : pTmpRas; + AreaInfo : pAreaInfo; + GelsInfo : pGelsInfo; + Mask : Byte; { write mask for this raster } + FgPen : Shortint; { foreground pen for this raster } + BgPen : Shortint; { background pen } + AOlPen : Shortint; { areafill outline pen } + DrawMode : Shortint; { drawing mode for fill, lines, and text } + AreaPtSz : Shortint; { 2^n words for areafill pattern } + linpatcnt : Shortint; { current line drawing pattern preshift } + dummy : Shortint; + Flags : Word; { miscellaneous control bits } + LinePtrn : Word; { 16 bits for textured lines } + cp_x, + cp_y : smallint; { current pen position } + minterms : Array [0..7] of Byte; + PenWidth : smallint; + PenHeight : smallint; + Font : pTextFont; { (TextFontPtr) current font Pointer } + AlgoStyle : Byte; { the algorithmically generated style } + TxFlags : Byte; { text specific flags } + TxHeight : Word; { text height } + TxWidth : Word; { text nominal width } + TxBaseline : Word; { text baseline } + TxSpacing : smallint; { text spacing (per character) } + RP_User : Pointer; + longreserved : Array [0..1] of ULONG; + wordreserved : Array [0..6] of Word; { used to be a node } + reserved : Array [0..7] of Byte; { for future use } + end; + +const + +{ drawing modes } + + JAM1 = 0; { jam 1 color into raster } + JAM2 = 1; { jam 2 colors into raster } + COMPLEMENT = 2; { XOR bits into raster } + INVERSVID = 4; { inverse video for drawing modes } + +{ these are the flag bits for RastPort flags } + + FRST_DOT = $01; { draw the first dot of this line ? } + ONE_DOT = $02; { use one dot mode for drawing lines } + DBUFFER = $04; { flag set when RastPorts are double-buffered } + + { only used for bobs } + + AREAOUTLINE = $08; { used by areafiller } + NOCROSSFILL = $20; { areafills have no crossovers } + +{ there is only one style of clipping: raster clipping } +{ this preserves the continuity of jaggies regardless of clip window } +{ When drawing into a RastPort, if the ptr to ClipRect is nil then there } +{ is no clipping done, this is dangerous but useful for speed } + + +Const + CleanUp = $40; + CleanMe = CleanUp; + + BltClearWait = 1; { Waits for blit to finish } + BltClearXY = 2; { Use Row/Bytes per row method } + + { Useful minterms } + + StraightCopy = $C0; { Vanilla copy } + InvertAndCopy = $30; { Invert the source before copy } + InvertDest = $50; { Forget source, invert dest } + + + { mode coercion definitions } + +const +{ These flags are passed (in combination) to CoerceMode() to determine the + * type of coercion required. + } + +{ Ensure that the mode coerced to can display just as many colours as the + * ViewPort being coerced. + } + PRESERVE_COLORS = 1; + +{ Ensure that the mode coerced to is not interlaced. } + AVOID_FLICKER = 2; + +{ Coercion should ignore monitor compatibility issues. } + IGNORE_MCOMPAT = 4; + + + BIDTAG_COERCE = 1; { Private } + +const + +{ VSprite flags } +{ user-set VSprite flags: } + + SUSERFLAGS = $00FF; { mask of all user-settable VSprite-flags } + VSPRITE_f = $0001; { set if VSprite, clear if Bob } + { VSPRITE had to be changed for name conflict } + SAVEBACK = $0002; { set if background is to be saved/restored } + OVERLAY = $0004; { set to mask image of Bob onto background } + MUSTDRAW = $0008; { set if VSprite absolutely must be drawn } + +{ system-set VSprite flags: } + + BACKSAVED = $0100; { this Bob's background has been saved } + BOBUPDATE = $0200; { temporary flag, useless to outside world } + GELGONE = $0400; { set if gel is completely clipped (offscreen) } + VSOVERFLOW = $0800; { VSprite overflow (if MUSTDRAW set we draw!) } + +{ Bob flags } +{ these are the user flag bits } + + BUSERFLAGS = $00FF; { mask of all user-settable Bob-flags } + SAVEBOB = $0001; { set to not erase Bob } + BOBISCOMP = $0002; { set to identify Bob as AnimComp } + +{ these are the system flag bits } + + BWAITING = $0100; { set while Bob is waiting on 'after' } + BDRAWN = $0200; { set when Bob is drawn this DrawG pass} + BOBSAWAY = $0400; { set to initiate removal of Bob } + BOBNIX = $0800; { set when Bob is completely removed } + SAVEPRESERVE = $1000; { for back-restore during double-buffer} + OUTSTEP = $2000; { for double-clearing if double-buffer } + +{ defines for the animation procedures } + + ANFRACSIZE = 6; + ANIMHALF = $0020; + RINGTRIGGER = $0001; + + +{ UserStuff definitions + * the user can define these to be a single variable or a sub-structure + * if undefined by the user, the system turns these into innocuous variables + * see the manual for a thorough definition of the UserStuff definitions + * + } + +type + + VUserStuff = smallint; { Sprite user stuff } + BUserStuff = smallint; { Bob user stuff } + AUserStuff = smallint; { AnimOb user stuff } + +{********************** GEL STRUCTURES **********************************} + + pVSprite = ^tVSprite; + tVSprite = record + +{ --------------------- SYSTEM VARIABLES ------------------------------- } +{ GEL linked list forward/backward pointers sorted by y,x value } + + NextVSprite : pVSprite; + PrevVSprite : pVSprite; + +{ GEL draw list constructed in the order the Bobs are actually drawn, then + * list is copied to clear list + * must be here in VSprite for system boundary detection + } + + DrawPath : pVSprite; { pointer of overlay drawing } + ClearPath : pVSprite; { pointer for overlay clearing } + +{ the VSprite positions are defined in (y,x) order to make sorting + * sorting easier, since (y,x) as a long Longint + } + + OldY, OldX : smallint; { previous position } + +{ --------------------- COMMON VARIABLES --------------------------------- } + + Flags : smallint; { VSprite flags } + + +{ --------------------- USER VARIABLES ----------------------------------- } +{ the VSprite positions are defined in (y,x) order to make sorting + * sorting easier, since (y,x) as a long Longint + } + + Y, X : smallint; { screen position } + + Height : smallint; + Width : smallint; { number of words per row of image data } + Depth : smallint; { number of planes of data } + + MeMask : smallint; { which types can collide with this VSprite} + HitMask : smallint; { which types this VSprite can collide with} + + ImageData : Pointer; { pointer to VSprite image } + +{ borderLine is the one-dimensional logical OR of all + * the VSprite bits, used for fast collision detection of edge + } + + BorderLine : Pointer; { logical OR of all VSprite bits } + CollMask : Pointer; { similar to above except this is a matrix } + +{ pointer to this VSprite's color definitions (not used by Bobs) } + + SprColors : Pointer; + + VSBob : Pointer; { (BobPtr) points home if this VSprite + is part of a Bob } + +{ planePick flag: set bit selects a plane from image, clear bit selects + * use of shadow mask for that plane + * OnOff flag: if using shadow mask to fill plane, this bit (corresponding + * to bit in planePick) describes whether to fill with 0's or 1's + * There are two uses for these flags: + * - if this is the VSprite of a Bob, these flags describe how the Bob + * is to be drawn into memory + * - if this is a simple VSprite and the user intends on setting the + * MUSTDRAW flag of the VSprite, these flags must be set too to describe + * which color registers the user wants for the image + } + + PlanePick : Shortint; + PlaneOnOff : Shortint; + + VUserExt : VUserStuff; { user definable: see note above } + end; + + + + +{ dBufPacket defines the values needed to be saved across buffer to buffer + * when in double-buffer mode + } + + pDBufPacket = ^tDBufPacket; + tDBufPacket = record + BufY, + BufX : Word; { save other buffers screen coordinates } + BufPath : pVSprite; { carry the draw path over the gap } + +{ these pointers must be filled in by the user } +{ pointer to other buffer's background save buffer } + + BufBuffer : Pointer; + end; + + + + + + pBob = ^tBob; + tBob = record +{ blitter-objects } + +{ --------------------- SYSTEM VARIABLES --------------------------------- } + +{ --------------------- COMMON VARIABLES --------------------------------- } + + Flags : smallint; { general purpose flags (see definitions below) } + +{ --------------------- USER VARIABLES ----------------------------------- } + + SaveBuffer : Pointer; { pointer to the buffer for background save } + +{ used by Bobs for "cookie-cutting" and multi-plane masking } + + ImageShadow : Pointer; + +{ pointer to BOBs for sequenced drawing of Bobs + * for correct overlaying of multiple component animations + } + Before : pBob; { draw this Bob before Bob pointed to by before } + After : pBob; { draw this Bob after Bob pointed to by after } + + BobVSprite : pVSprite; { this Bob's VSprite definition } + + BobComp : Pointer; { (AnimCompPtr) pointer to this Bob's AnimComp def } + + DBuffer : Pointer; { pointer to this Bob's dBuf packet } + + BUserExt : BUserStuff; { Bob user extension } + end; + + pAnimComp = ^tAnimComp; + tAnimComp = record + +{ --------------------- SYSTEM VARIABLES --------------------------------- } + +{ --------------------- COMMON VARIABLES --------------------------------- } + + Flags : smallint; { AnimComp flags for system & user } + +{ timer defines how long to keep this component active: + * if set non-zero, timer decrements to zero then switches to nextSeq + * if set to zero, AnimComp never switches + } + + Timer : smallint; + +{ --------------------- USER VARIABLES ----------------------------------- } +{ initial value for timer when the AnimComp is activated by the system } + + TimeSet : smallint; + +{ pointer to next and previous components of animation object } + + NextComp : pAnimComp; + PrevComp : pAnimComp; + +{ pointer to component component definition of next image in sequence } + + NextSeq : pAnimComp; + PrevSeq : pAnimComp; + + AnimCRoutine : Pointer; { Pointer of special animation procedure } + + YTrans : smallint; { initial y translation (if this is a component) } + XTrans : smallint; { initial x translation (if this is a component) } + + HeadOb : Pointer; { AnimObPtr } + + AnimBob : pBob; + end; + + pAnimOb = ^tAnimOb; + tAnimOb = record + +{ --------------------- SYSTEM VARIABLES --------------------------------- } + + NextOb, + PrevOb : pAnimOb; + +{ number of calls to Animate this AnimOb has endured } + + Clock : Longint; + + AnOldY, + AnOldX : smallint; { old y,x coordinates } + +{ --------------------- COMMON VARIABLES --------------------------------- } + + AnY, + AnX : smallint; { y,x coordinates of the AnimOb } + +{ --------------------- USER VARIABLES ----------------------------------- } + + YVel, + XVel : smallint; { velocities of this object } + YAccel, + XAccel : smallint; { accelerations of this object } + + RingYTrans, + RingXTrans : smallint; { ring translation values } + + AnimORoutine : Pointer; { Pointer of special animation + procedure } + + HeadComp : pAnimComp; { pointer to first component } + + AUserExt : AUserStuff; { AnimOb user extension } + end; + + ppAnimOb = ^pAnimOb; + + +{ ************************************************************************ } + +const + + B2NORM = 0; + B2SWAP = 1; + B2BOBBER = 2; + +{ ************************************************************************ } + +type + +{ a structure to contain the 16 collision procedure addresses } + + collTable = Array [0..15] of Pointer; + pcollTable = ^collTable; + +const + +{ These bit descriptors are used by the GEL collide routines. + * These bits are set in the hitMask and meMask variables of + * a GEL to describe whether or not these types of collisions + * can affect the GEL. BNDRY_HIT is described further below; + * this bit is permanently assigned as the boundary-hit flag. + * The other bit GEL_HIT is meant only as a default to cover + * any GEL hitting any other; the user may redefine this bit. + } + + BORDERHIT = 0; + +{ These bit descriptors are used by the GEL boundry hit routines. + * When the user's boundry-hit routine is called (via the argument + * set by a call to SetCollision) the first argument passed to + * the user's routine is the Pointer of the GEL involved in the + * boundry-hit, and the second argument has the appropriate bit(s) + * set to describe which boundry was surpassed + } + + TOPHIT = 1; + BOTTOMHIT = 2; + LEFTHIT = 4; + RIGHTHIT = 8; + +Type + pExtendedNode = ^tExtendedNode; + tExtendedNode = record + xln_Succ, + xln_Pred : pNode; + xln_Type : Byte; + xln_Pri : Shortint; + xln_Name : STRPTR; + xln_Subsystem : Byte; + xln_Subtype : Byte; + xln_Library : Longint; + xln_Init : Pointer; + END; + +CONST + SS_GRAPHICS = $02; + + VIEW_EXTRA_TYPE = 1; + VIEWPORT_EXTRA_TYPE = 2; + SPECIAL_MONITOR_TYPE = 3; + MONITOR_SPEC_TYPE = 4; + +type + +{ structure used by AddTOFTask } + + pIsrvstr = ^tIsrvstr; + tIsrvstr = record + is_Node : tNode; + Iptr : pIsrvstr; { passed to srvr by os } + code : Pointer; + ccode : Pointer; + Carg : Pointer; + end; + +Type + pAnalogSignalInterval = ^tAnalogSignalInterval; + tAnalogSignalInterval = record + asi_Start, + asi_Stop : Word; + END; + + pSpecialMonitor = ^tSpecialMonitor; + tSpecialMonitor = record + spm_Node : tExtendedNode; + spm_Flags : Word; + do_monitor, + reserved1, + reserved2, + reserved3 : Pointer; + hblank, + vblank, + hsync, + vsync : tAnalogSignalInterval; + END; + + + pMonitorSpec = ^tMonitorSpec; + tMonitorSpec = record + ms_Node : tExtendedNode; + ms_Flags : Word; + ratioh, + ratiov : Longint; + total_rows, + total_colorclocks, + DeniseMaxDisplayColumn, + BeamCon0, + min_row : Word; + ms_Special : pSpecialMonitor; + ms_OpenCount : Word; + ms_transform, + ms_translate, + ms_scale : Pointer; + ms_xoffset, + ms_yoffset : Word; + ms_LegalView : tRectangle; + ms_maxoscan, { maximum legal overscan } + ms_videoscan : Pointer; { video display overscan } + DeniseMinDisplayColumn : Word; + DisplayCompatible : ULONG; + DisplayInfoDataBase : tList; + DisplayInfoDataBaseSemaphore : tSignalSemaphore; + ms_MrgCop, + ms_LoadView, + ms_KillView : Longint; + END; + +const + TO_MONITOR = 0; + FROM_MONITOR = 1; + STANDARD_XOFFSET = 9; + STANDARD_YOFFSET = 0; + + MSB_REQUEST_NTSC = 0; + MSB_REQUEST_PAL = 1; + MSB_REQUEST_SPECIAL = 2; + MSB_REQUEST_A2024 = 3; + MSB_DOUBLE_SPRITES = 4; + MSF_REQUEST_NTSC = 1; + MSF_REQUEST_PAL = 2; + MSF_REQUEST_SPECIAL = 4; + MSF_REQUEST_A2024 = 8; + MSF_DOUBLE_SPRITES = 16; + + +{ obsolete, v37 compatible definitions follow } + REQUEST_NTSC = 1; + REQUEST_PAL = 2; + REQUEST_SPECIAL = 4; + REQUEST_A2024 = 8; + + DEFAULT_MONITOR_NAME : PChar = 'default.monitor'; + NTSC_MONITOR_NAME : PChar = 'ntsc.monitor'; + PAL_MONITOR_NAME : PChar = 'pal.monitor'; + STANDARD_MONITOR_MASK = ( REQUEST_NTSC OR REQUEST_PAL ) ; + + STANDARD_NTSC_ROWS = 262; + STANDARD_PAL_ROWS = 312; + STANDARD_COLORCLOCKS = 226; + STANDARD_DENISE_MAX = 455; + STANDARD_DENISE_MIN = 93 ; + STANDARD_NTSC_BEAMCON = $0000; + //STANDARD_PAL_BEAMCON = DISPLAYPAL ; + + //SPECIAL_BEAMCON = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE); + + MIN_NTSC_ROW = 21 ; + MIN_PAL_ROW = 29 ; + STANDARD_VIEW_X = $81 ; + STANDARD_VIEW_Y = $2C ; + STANDARD_HBSTRT = $06 ; + STANDARD_HSSTRT = $0B ; + STANDARD_HSSTOP = $1C ; + STANDARD_HBSTOP = $2C ; + STANDARD_VBSTRT = $0122; + STANDARD_VSSTRT = $02A6; + STANDARD_VSSTOP = $03AA; + STANDARD_VBSTOP = $1066; + + VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2); + VGA_TOTAL_ROWS = (STANDARD_NTSC_ROWS*2); + VGA_DENISE_MIN = 59 ; + MIN_VGA_ROW = 29 ; + VGA_HBSTRT = $08 ; + VGA_HSSTRT = $0E ; + VGA_HSSTOP = $1C ; + VGA_HBSTOP = $1E ; + VGA_VBSTRT = $0000; + VGA_VSSTRT = $0153; + VGA_VSSTOP = $0235; + VGA_VBSTOP = $0CCD; + + VGA_MONITOR_NAME : PChar = 'vga.monitor'; + +{ NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been + * implemented. + } + VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ; + VGA70_TOTAL_ROWS = 449; + VGA70_DENISE_MIN = 59; + MIN_VGA70_ROW = 35 ; + VGA70_HBSTRT = $08 ; + VGA70_HSSTRT = $0E ; + VGA70_HSSTOP = $1C ; + VGA70_HBSTOP = $1E ; + VGA70_VBSTRT = $0000; + VGA70_VSSTRT = $02A6; + VGA70_VSSTOP = $0388; + VGA70_VBSTOP = $0F73; + + //VGA70_BEAMCON = (SPECIAL_BEAMCON XOR VSYNCTRUE); + VGA70_MONITOR_NAME : PChar = 'vga70.monitor'; + + BROADCAST_HBSTRT = $01 ; + BROADCAST_HSSTRT = $06 ; + BROADCAST_HSSTOP = $17 ; + BROADCAST_HBSTOP = $27 ; + BROADCAST_VBSTRT = $0000; + BROADCAST_VSSTRT = $02A6; + BROADCAST_VSSTOP = $054C; + BROADCAST_VBSTOP = $1C40; + //BROADCAST_BEAMCON = ( LOLDIS OR CSBLANK ); + RATIO_FIXEDPART = 4; + RATIO_UNITY = 16; + + + +Type + pRasInfo = ^tRasInfo; + tRasInfo = record { used by callers to and InitDspC() } + Next : pRasInfo; { used for dualpf } + BitMap : pBitMap; + RxOffset, + RyOffset : smallint; { scroll offsets in this BitMap } + end; + + + pView = ^tView; + tView = record + ViewPort : Pointer; { ViewPortPtr } + LOFCprList : pcprlist; { used for interlaced and noninterlaced } + SHFCprList : pcprlist; { only used during interlace } + DyOffset, + DxOffset : smallint; { for complete View positioning } + { offsets are +- adjustments to standard #s } + Modes : WORD; { such as INTERLACE, GENLOC } + end; + +{ these structures are obtained via GfxNew } +{ and disposed by GfxFree } +Type + pViewExtra = ^tViewExtra; + tViewExtra = record + n : tExtendedNode; + View : pView; { backwards link } { view in C-Includes } + Monitor : pMonitorSpec; { monitors for this view } + TopLine : Word; + END; + + + pViewPort = ^tViewPort; + tViewPort = record + Next : pViewPort; + ColorMap : Pointer; { table of colors for this viewport } { ColorMapPtr } + { if this is nil, MakeVPort assumes default values } + DspIns : pCopList; { user by MakeView() } + SprIns : pCopList; { used by sprite stuff } + ClrIns : pCopList; { used by sprite stuff } + UCopIns : pUCopList; { User copper list } + DWidth, + DHeight : smallint; + DxOffset, + DyOffset : smallint; + Modes : Word; + SpritePriorities : Byte; { used by makevp } + reserved : Byte; + RasInfo : pRasInfo; + end; + + +{ this structure is obtained via GfxNew } +{ and disposed by GfxFree } + + pViewPortExtra = ^tViewPortExtra; + tViewPortExtra = record + n : tExtendedNode; + ViewPort : pViewPort; { backwards link } { ViewPort in C-Includes } + DisplayClip : tRectangle; { makevp display clipping information } + { These are added for V39 } + VecTable : Pointer; { Private } + DriverData : Array[0..1] of Pointer; + Flags : WORD; + Origin : Array[0..1] of tPoint; { First visible point relative to the DClip. + * One for each possible playfield. + } + cop1ptr, { private } + cop2ptr : ULONG; { private } + END; + + + pColorMap = ^tColorMap; + tColorMap = record + Flags : Byte; + CType : Byte; { This is "Type" in C includes } + Count : Word; + ColorTable : Pointer; + cm_vpe : pViewPortExtra; + LowColorBits : Pointer; + TransparencyPlane, + SpriteResolution, + SpriteResDefault, + AuxFlags : Byte; + cm_vp : pViewPort; { ViewPortPtr } + NormalDisplayInfo, + CoerceDisplayInfo : Pointer; + cm_batch_items : pTagItem; + VPModeID : ULONG; + PalExtra : Pointer; + SpriteBase_Even, + SpriteBase_Odd, + Bp_0_base, + Bp_1_base : Word; + end; + +{ if Type == 0 then ColorMap is V1.2/V1.3 compatible } +{ if Type != 0 then ColorMap is V36 compatible } +{ the system will never create other than V39 type colormaps when running V39 } + +CONST + COLORMAP_TYPE_V1_2 = $00; + COLORMAP_TYPE_V1_4 = $01; + COLORMAP_TYPE_V36 = COLORMAP_TYPE_V1_4; { use this definition } + COLORMAP_TYPE_V39 = $02; + + +{ Flags variable } + COLORMAP_TRANSPARENCY = $01; + COLORPLANE_TRANSPARENCY = $02; + BORDER_BLANKING = $04; + BORDER_NOTRANSPARENCY = $08; + VIDEOCONTROL_BATCH = $10; + USER_COPPER_CLIP = $20; + + +CONST + EXTEND_VSTRUCT = $1000; { unused bit in Modes field of View } + + +{ defines used for Modes in IVPargs } + +CONST + GENLOCK_VIDEO = $0002; + LACE = $0004; + SUPERHIRES = $0020; + PFBA = $0040; + EXTRA_HALFBRITE= $0080; + GENLOCK_AUDIO = $0100; + DUALPF = $0400; + HAM = $0800; + EXTENDED_MODE = $1000; + VP_HIDE = $2000; + SPRITES = $4000; + HIRES = $8000; + + VPF_A2024 = $40; + VPF_AGNUS = $20; + VPF_TENHZ = $20; + + BORDERSPRITES = $40; + + CMF_CMTRANS = 0; + CMF_CPTRANS = 1; + CMF_BRDRBLNK = 2; + CMF_BRDNTRAN = 3; + CMF_BRDRSPRT = 6; + + SPRITERESN_ECS = 0; +{ ^140ns, except in 35ns viewport, where it is 70ns. } + SPRITERESN_140NS = 1; + SPRITERESN_70NS = 2; + SPRITERESN_35NS = 3; + SPRITERESN_DEFAULT = -1; + +{ AuxFlags : } + CMAB_FULLPALETTE = 0; + CMAF_FULLPALETTE = 1; + CMAB_NO_INTERMED_UPDATE = 1; + CMAF_NO_INTERMED_UPDATE = 2; + CMAB_NO_COLOR_LOAD = 2; + CMAF_NO_COLOR_LOAD = 4; + CMAB_DUALPF_DISABLE = 3; + CMAF_DUALPF_DISABLE = 8; + +Type + pPaletteExtra = ^tPaletteExtra; + tPaletteExtra = record { structure may be extended so watch out! } + pe_Semaphore : tSignalSemaphore; { shared semaphore for arbitration } + pe_FirstFree, { *private* } + pe_NFree, { number of free colors } + pe_FirstShared, { *private* } + pe_NShared : WORD; { *private* } + pe_RefCnt : Pointer; { *private* } + pe_AllocList : Pointer; { *private* } + pe_ViewPort : pViewPort; { back pointer to viewport } + pe_SharableColors : WORD; { the number of sharable colors. } + end; +{ flags values for ObtainPen } +Const + PENB_EXCLUSIVE = 0; + PENB_NO_SETCOLOR = 1; + + PENF_EXCLUSIVE = 1; + PENF_NO_SETCOLOR = 2; + +{ obsolete names for PENF_xxx flags: } + + PEN_EXCLUSIVE = PENF_EXCLUSIVE; + PEN_NO_SETCOLOR = PENF_NO_SETCOLOR; + +{ precision values for ObtainBestPen : } + + PRECISION_EXACT = -1; + PRECISION_IMAGE = 0; + PRECISION_ICON = 16; + PRECISION_GUI = 32; + + +{ tags for ObtainBestPen: } + OBP_Precision = $84000000; + OBP_FailIfBad = $84000001; + +{ From V39, MakeVPort() will return an error if there is not enough memory, + * or the requested mode cannot be opened with the requested depth with the + * given bitmap (for higher bandwidth alignments). + } + + MVP_OK = 0; { you want to see this one } + MVP_NO_MEM = 1; { insufficient memory for intermediate workspace } + MVP_NO_VPE = 2; { ViewPort does not have a ViewPortExtra, and + * insufficient memory to allocate a temporary one. + } + MVP_NO_DSPINS = 3; { insufficient memory for intermidiate copper + * instructions. + } + MVP_NO_DISPLAY = 4; { BitMap data is misaligned for this viewport's + * mode and depth - see AllocBitMap(). + } + MVP_OFF_BOTTOM = 5; { PRIVATE - you will never see this. } + +{ From V39, MrgCop() will return an error if there is not enough memory, + * or for some reason MrgCop() did not need to make any copper lists. + } + + MCOP_OK = 0; { you want to see this one } + MCOP_NO_MEM = 1; { insufficient memory to allocate the system + * copper lists. + } + MCOP_NOP = 2; { MrgCop() did not merge any copper lists + * (eg, no ViewPorts in the list, or all marked as + * hidden). + } +Type + pDBufInfo = ^tDBufInfo; + tDBufInfo = record + dbi_Link1 : Pointer; + dbi_Count1 : ULONG; + dbi_SafeMessage : tMessage; { replied to when safe to write to old bitmap } + dbi_UserData1 : Pointer; { first user data } + + dbi_Link2 : Pointer; + dbi_Count2 : ULONG; + dbi_DispMessage : tMessage; { replied to when new bitmap has been displayed at least + once } + dbi_UserData2 : Pointer; { second user data } + dbi_MatchLong : ULONG; + dbi_CopPtr1, + dbi_CopPtr2, + dbi_CopPtr3 : Pointer; + dbi_BeamPos1, + dbi_BeamPos2 : WORD; + end; + + + + { include define file for graphics display mode IDs. } + + +const + + INVALID_ID = NOT 0; + +{ With all the new modes that are available under V38 and V39, it is highly + * recommended that you use either the asl.library screenmode requester, + * and/or the V39 graphics.library function BestModeIDA(). + * + * DO NOT interpret the any of the bits in the ModeID for its meaning. For + * example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced. + * Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_... + * flags to determine a ModeID's characteristics. The only exception to + * this rule is that bit 7 ($80) will always mean the ModeID is + * ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM. + } + +{ normal identifiers } + + MONITOR_ID_MASK = $FFFF1000; + + DEFAULT_MONITOR_ID = $00000000; + NTSC_MONITOR_ID = $00011000; + PAL_MONITOR_ID = $00021000; + +{ the following 22 composite keys are for Modes on the default Monitor. + * NTSC & PAL "flavors" of these particular keys may be made by or'ing + * the NTSC or PAL MONITOR_ID with the desired MODE_KEY... + * + * For example, to specifically open a PAL HAM interlaced ViewPort + * (or intuition screen), you would use the modeid of + * (PAL_MONITOR_ID OR HAMLACE_KEY) + } + + LORES_KEY = $00000000; + HIRES_KEY = $00008000; + SUPER_KEY = $00008020; + HAM_KEY = $00000800; + LORESLACE_KEY = $00000004; + HIRESLACE_KEY = $00008004; + SUPERLACE_KEY = $00008024; + HAMLACE_KEY = $00000804; + LORESDPF_KEY = $00000400; + HIRESDPF_KEY = $00008400; + SUPERDPF_KEY = $00008420; + LORESLACEDPF_KEY = $00000404; + HIRESLACEDPF_KEY = $00008404; + SUPERLACEDPF_KEY = $00008424; + LORESDPF2_KEY = $00000440; + HIRESDPF2_KEY = $00008440; + SUPERDPF2_KEY = $00008460; + LORESLACEDPF2_KEY = $00000444; + HIRESLACEDPF2_KEY = $00008444; + SUPERLACEDPF2_KEY = $00008464; + EXTRAHALFBRITE_KEY = $00000080; + EXTRAHALFBRITELACE_KEY = $00000084; +{ New for AA ChipSet (V39) } + HIRESHAM_KEY = $00008800; + SUPERHAM_KEY = $00008820; + HIRESEHB_KEY = $00008080; + SUPEREHB_KEY = $000080a0; + HIRESHAMLACE_KEY = $00008804; + SUPERHAMLACE_KEY = $00008824; + HIRESEHBLACE_KEY = $00008084; + SUPEREHBLACE_KEY = $000080a4; +{ Added for V40 - may be useful modes for some games or animations. } + LORESSDBL_KEY = $00000008; + LORESHAMSDBL_KEY = $00000808; + LORESEHBSDBL_KEY = $00000088; + HIRESHAMSDBL_KEY = $00008808; + + +{ VGA identifiers } + + VGA_MONITOR_ID = $00031000; + + VGAEXTRALORES_KEY = $00031004; + VGALORES_KEY = $00039004; + VGAPRODUCT_KEY = $00039024; + VGAHAM_KEY = $00031804; + VGAEXTRALORESLACE_KEY = $00031005; + VGALORESLACE_KEY = $00039005; + VGAPRODUCTLACE_KEY = $00039025; + VGAHAMLACE_KEY = $00031805; + VGAEXTRALORESDPF_KEY = $00031404; + VGALORESDPF_KEY = $00039404; + VGAPRODUCTDPF_KEY = $00039424; + VGAEXTRALORESLACEDPF_KEY = $00031405; + VGALORESLACEDPF_KEY = $00039405; + VGAPRODUCTLACEDPF_KEY = $00039425; + VGAEXTRALORESDPF2_KEY = $00031444; + VGALORESDPF2_KEY = $00039444; + VGAPRODUCTDPF2_KEY = $00039464; + VGAEXTRALORESLACEDPF2_KEY = $00031445; + VGALORESLACEDPF2_KEY = $00039445; + VGAPRODUCTLACEDPF2_KEY = $00039465; + VGAEXTRAHALFBRITE_KEY = $00031084; + VGAEXTRAHALFBRITELACE_KEY = $00031085; +{ New for AA ChipSet (V39) } + VGAPRODUCTHAM_KEY = $00039824; + VGALORESHAM_KEY = $00039804; + VGAEXTRALORESHAM_KEY = VGAHAM_KEY; + VGAPRODUCTHAMLACE_KEY = $00039825; + VGALORESHAMLACE_KEY = $00039805; + VGAEXTRALORESHAMLACE_KEY = VGAHAMLACE_KEY; + VGAEXTRALORESEHB_KEY = VGAEXTRAHALFBRITE_KEY; + VGAEXTRALORESEHBLACE_KEY = VGAEXTRAHALFBRITELACE_KEY; + VGALORESEHB_KEY = $00039084; + VGALORESEHBLACE_KEY = $00039085; + VGAEHB_KEY = $000390a4; + VGAEHBLACE_KEY = $000390a5; +{ These ModeIDs are the scandoubled equivalents of the above, with the + * exception of the DualPlayfield modes, as AA does not allow for scandoubling + * dualplayfield. + } + VGAEXTRALORESDBL_KEY = $00031000; + VGALORESDBL_KEY = $00039000; + VGAPRODUCTDBL_KEY = $00039020; + VGAEXTRALORESHAMDBL_KEY = $00031800; + VGALORESHAMDBL_KEY = $00039800; + VGAPRODUCTHAMDBL_KEY = $00039820; + VGAEXTRALORESEHBDBL_KEY = $00031080; + VGALORESEHBDBL_KEY = $00039080; + VGAPRODUCTEHBDBL_KEY = $000390a0; + +{ a2024 identifiers } + + A2024_MONITOR_ID = $00041000; + + A2024TENHERTZ_KEY = $00041000; + A2024FIFTEENHERTZ_KEY = $00049000; + +{ prototype identifiers (private) } + + PROTO_MONITOR_ID = $00051000; + + +{ These monitors and modes were added for the V38 release. } + + EURO72_MONITOR_ID = $00061000; + + EURO72EXTRALORES_KEY = $00061004; + EURO72LORES_KEY = $00069004; + EURO72PRODUCT_KEY = $00069024; + EURO72HAM_KEY = $00061804; + EURO72EXTRALORESLACE_KEY = $00061005; + EURO72LORESLACE_KEY = $00069005; + EURO72PRODUCTLACE_KEY = $00069025; + EURO72HAMLACE_KEY = $00061805; + EURO72EXTRALORESDPF_KEY = $00061404; + EURO72LORESDPF_KEY = $00069404; + EURO72PRODUCTDPF_KEY = $00069424; + EURO72EXTRALORESLACEDPF_KEY = $00061405; + EURO72LORESLACEDPF_KEY = $00069405; + EURO72PRODUCTLACEDPF_KEY = $00069425; + EURO72EXTRALORESDPF2_KEY = $00061444; + EURO72LORESDPF2_KEY = $00069444; + EURO72PRODUCTDPF2_KEY = $00069464; + EURO72EXTRALORESLACEDPF2_KEY = $00061445; + EURO72LORESLACEDPF2_KEY = $00069445; + EURO72PRODUCTLACEDPF2_KEY = $00069465; + EURO72EXTRAHALFBRITE_KEY = $00061084; + EURO72EXTRAHALFBRITELACE_KEY = $00061085; +{ New AA modes (V39) } + EURO72PRODUCTHAM_KEY = $00069824; + EURO72PRODUCTHAMLACE_KEY = $00069825; + EURO72LORESHAM_KEY = $00069804; + EURO72LORESHAMLACE_KEY = $00069805; + EURO72EXTRALORESHAM_KEY = EURO72HAM_KEY; + EURO72EXTRALORESHAMLACE_KEY = EURO72HAMLACE_KEY ; + EURO72EXTRALORESEHB_KEY = EURO72EXTRAHALFBRITE_KEY; + EURO72EXTRALORESEHBLACE_KEY = EURO72EXTRAHALFBRITELACE_KEY; + EURO72LORESEHB_KEY = $00069084; + EURO72LORESEHBLACE_KEY = $00069085; + EURO72EHB_KEY = $000690a4; + EURO72EHBLACE_KEY = $000690a5; +{ These ModeIDs are the scandoubled equivalents of the above, with the + * exception of the DualPlayfield modes, as AA does not allow for scandoubling + * dualplayfield. + } + EURO72EXTRALORESDBL_KEY = $00061000; + EURO72LORESDBL_KEY = $00069000; + EURO72PRODUCTDBL_KEY = $00069020; + EURO72EXTRALORESHAMDBL_KEY = $00061800; + EURO72LORESHAMDBL_KEY = $00069800; + EURO72PRODUCTHAMDBL_KEY = $00069820; + EURO72EXTRALORESEHBDBL_KEY = $00061080; + EURO72LORESEHBDBL_KEY = $00069080; + EURO72PRODUCTEHBDBL_KEY = $000690a0; + + + EURO36_MONITOR_ID = $00071000; + +{ Euro36 modeids can be ORed with the default modeids a la NTSC and PAL. + * For example, Euro36 SuperHires is + * (EURO36_MONITOR_ID OR SUPER_KEY) + } + + SUPER72_MONITOR_ID = $00081000; + +{ Super72 modeids can be ORed with the default modeids a la NTSC and PAL. + * For example, Super72 SuperHiresLace (80$600) is + * (SUPER72_MONITOR_ID OR SUPERLACE_KEY). + * The following scandoubled Modes are the exception: + } + SUPER72LORESDBL_KEY = $00081008; + SUPER72HIRESDBL_KEY = $00089008; + SUPER72SUPERDBL_KEY = $00089028; + SUPER72LORESHAMDBL_KEY = $00081808; + SUPER72HIRESHAMDBL_KEY = $00089808; + SUPER72SUPERHAMDBL_KEY = $00089828; + SUPER72LORESEHBDBL_KEY = $00081088; + SUPER72HIRESEHBDBL_KEY = $00089088; + SUPER72SUPEREHBDBL_KEY = $000890a8; + + +{ These monitors and modes were added for the V39 release. } + + DBLNTSC_MONITOR_ID = $00091000; + + DBLNTSCLORES_KEY = $00091000; + DBLNTSCLORESFF_KEY = $00091004; + DBLNTSCLORESHAM_KEY = $00091800; + DBLNTSCLORESHAMFF_KEY = $00091804; + DBLNTSCLORESEHB_KEY = $00091080; + DBLNTSCLORESEHBFF_KEY = $00091084; + DBLNTSCLORESLACE_KEY = $00091005; + DBLNTSCLORESHAMLACE_KEY = $00091805; + DBLNTSCLORESEHBLACE_KEY = $00091085; + DBLNTSCLORESDPF_KEY = $00091400; + DBLNTSCLORESDPFFF_KEY = $00091404; + DBLNTSCLORESDPFLACE_KEY = $00091405; + DBLNTSCLORESDPF2_KEY = $00091440; + DBLNTSCLORESDPF2FF_KEY = $00091444; + DBLNTSCLORESDPF2LACE_KEY = $00091445; + DBLNTSCHIRES_KEY = $00099000; + DBLNTSCHIRESFF_KEY = $00099004; + DBLNTSCHIRESHAM_KEY = $00099800; + DBLNTSCHIRESHAMFF_KEY = $00099804; + DBLNTSCHIRESLACE_KEY = $00099005; + DBLNTSCHIRESHAMLACE_KEY = $00099805; + DBLNTSCHIRESEHB_KEY = $00099080; + DBLNTSCHIRESEHBFF_KEY = $00099084; + DBLNTSCHIRESEHBLACE_KEY = $00099085; + DBLNTSCHIRESDPF_KEY = $00099400; + DBLNTSCHIRESDPFFF_KEY = $00099404; + DBLNTSCHIRESDPFLACE_KEY = $00099405; + DBLNTSCHIRESDPF2_KEY = $00099440; + DBLNTSCHIRESDPF2FF_KEY = $00099444; + DBLNTSCHIRESDPF2LACE_KEY = $00099445; + DBLNTSCEXTRALORES_KEY = $00091200; + DBLNTSCEXTRALORESHAM_KEY = $00091a00; + DBLNTSCEXTRALORESEHB_KEY = $00091280; + DBLNTSCEXTRALORESDPF_KEY = $00091600; + DBLNTSCEXTRALORESDPF2_KEY = $00091640; + DBLNTSCEXTRALORESFF_KEY = $00091204; + DBLNTSCEXTRALORESHAMFF_KEY = $00091a04; + DBLNTSCEXTRALORESEHBFF_KEY = $00091284; + DBLNTSCEXTRALORESDPFFF_KEY = $00091604; + DBLNTSCEXTRALORESDPF2FF_KEY = $00091644; + DBLNTSCEXTRALORESLACE_KEY = $00091205; + DBLNTSCEXTRALORESHAMLACE_KEY = $00091a05; + DBLNTSCEXTRALORESEHBLACE_KEY = $00091285; + DBLNTSCEXTRALORESDPFLACE_KEY = $00091605; + DBLNTSCEXTRALORESDPF2LACE_KEY = $00091645; + + DBLPAL_MONITOR_ID = $000a1000; + + DBLPALLORES_KEY = $000a1000; + DBLPALLORESFF_KEY = $000a1004; + DBLPALLORESHAM_KEY = $000a1800; + DBLPALLORESHAMFF_KEY = $000a1804; + DBLPALLORESEHB_KEY = $000a1080; + DBLPALLORESEHBFF_KEY = $000a1084; + DBLPALLORESLACE_KEY = $000a1005; + DBLPALLORESHAMLACE_KEY = $000a1805; + DBLPALLORESEHBLACE_KEY = $000a1085; + DBLPALLORESDPF_KEY = $000a1400; + DBLPALLORESDPFFF_KEY = $000a1404; + DBLPALLORESDPFLACE_KEY = $000a1405; + DBLPALLORESDPF2_KEY = $000a1440; + DBLPALLORESDPF2FF_KEY = $000a1444; + DBLPALLORESDPF2LACE_KEY = $000a1445; + DBLPALHIRES_KEY = $000a9000; + DBLPALHIRESFF_KEY = $000a9004; + DBLPALHIRESHAM_KEY = $000a9800; + DBLPALHIRESHAMFF_KEY = $000a9804; + DBLPALHIRESLACE_KEY = $000a9005; + DBLPALHIRESHAMLACE_KEY = $000a9805; + DBLPALHIRESEHB_KEY = $000a9080; + DBLPALHIRESEHBFF_KEY = $000a9084; + DBLPALHIRESEHBLACE_KEY = $000a9085; + DBLPALHIRESDPF_KEY = $000a9400; + DBLPALHIRESDPFFF_KEY = $000a9404; + DBLPALHIRESDPFLACE_KEY = $000a9405; + DBLPALHIRESDPF2_KEY = $000a9440; + DBLPALHIRESDPF2FF_KEY = $000a9444; + DBLPALHIRESDPF2LACE_KEY = $000a9445; + DBLPALEXTRALORES_KEY = $000a1200; + DBLPALEXTRALORESHAM_KEY = $000a1a00; + DBLPALEXTRALORESEHB_KEY = $000a1280; + DBLPALEXTRALORESDPF_KEY = $000a1600; + DBLPALEXTRALORESDPF2_KEY = $000a1640; + DBLPALEXTRALORESFF_KEY = $000a1204; + DBLPALEXTRALORESHAMFF_KEY = $000a1a04; + DBLPALEXTRALORESEHBFF_KEY = $000a1284; + DBLPALEXTRALORESDPFFF_KEY = $000a1604; + DBLPALEXTRALORESDPF2FF_KEY = $000a1644; + DBLPALEXTRALORESLACE_KEY = $000a1205; + DBLPALEXTRALORESHAMLACE_KEY = $000a1a05; + DBLPALEXTRALORESEHBLACE_KEY = $000a1285; + DBLPALEXTRALORESDPFLACE_KEY = $000a1605; + DBLPALEXTRALORESDPF2LACE_KEY = $000a1645; + + +{ Use these tags for passing to BestModeID() (V39) } + + SPECIAL_FLAGS = $100E; + { Original: + SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE; + ( Mu?te aufgrund eines Fehler in PCQ ge?ndert werden ) + } + + + BIDTAG_DIPFMustHave = $80000001; { mask of the DIPF_ flags the ModeID must have } + { Default - NULL } + BIDTAG_DIPFMustNotHave = $80000002; { mask of the DIPF_ flags the ModeID must not have } + { Default - SPECIAL_FLAGS } + BIDTAG_ViewPort = $80000003; { ViewPort for which a ModeID is sought. } + { Default - NULL } + BIDTAG_NominalWidth = $80000004; { \ together make the aspect ratio and } + BIDTAG_NominalHeight = $80000005; { / override the vp->Width/Height. } + { Default - SourceID NominalDimensionInfo, + * or vp->DWidth/Height, or (640 * 200), + * in that preferred order. + } + BIDTAG_DesiredWidth = $80000006; { \ Nominal Width and Height of the } + BIDTAG_DesiredHeight = $80000007; { / returned ModeID. } + { Default - same as Nominal } + BIDTAG_Depth = $80000008; { ModeID must support this depth. } + { Default - vp->RasInfo->BitMap->Depth or 1 } + BIDTAG_MonitorID = $80000009; { ModeID must use this monitor. } + { Default - use best monitor available } + BIDTAG_SourceID = $8000000a; { instead of a ViewPort. } + { Default - VPModeID(vp) if BIDTAG_ViewPort is + * specified, else leave the DIPFMustHave and + * DIPFMustNotHave values untouched. + } + BIDTAG_RedBits = $8000000b; { \ } + BIDTAG_BlueBits = $8000000c; { > Match up from the database } + BIDTAG_GreenBits = $8000000d; { / } + { Default - 4 } + BIDTAG_GfxPrivate = $8000000e; { Private } + + +const + +{ bplcon0 defines } + + MODE_640 = $8000; + PLNCNTMSK = $7; { how many bit planes? } + { 0 = none, 1->6 = 1->6, 7 = reserved } + PLNCNTSHFT = 12; { bits to shift for bplcon0 } + PF2PRI = $40; { bplcon2 bit } + COLORON = $0200; { disable color burst } + DBLPF = $400; + HOLDNMODIFY = $800; + INTERLACE = 4; { interlace mode for 400 } + +{ bplcon1 defines } + + PFA_FINE_SCROLL = $F; + PFB_FINE_SCROLL_SHIFT = 4; + PF_FINE_SCROLL_MASK = $F; + +{ display window start and stop defines } + + DIW_HORIZ_POS = $7F; { horizontal start/stop } + DIW_VRTCL_POS = $1FF; { vertical start/stop } + DIW_VRTCL_POS_SHIFT = $7; + +{ Data fetch start/stop horizontal position } + + DFTCH_MASK = $FF; + +{ vposr bits } + + VPOSRLOF = $8000; + + { include define file for displayinfo database } + +{ the "public" handle to a DisplayInfoRecord } +Type + + DisplayInfoHandle = APTR; + +{ datachunk type identifiers } + +CONST + DTAG_DISP = $80000000; + DTAG_DIMS = $80001000; + DTAG_MNTR = $80002000; + DTAG_NAME = $80003000; + DTAG_VEC = $80004000; { internal use only } + +Type + + pQueryHeader = ^tQueryHeader; + tQueryHeader = record + tructID, { datachunk type identifier } + DisplayID, { copy of display record key } + SkipID, { TAG_SKIP -- see tagitems.h } + Length : ULONG; { length of local data in double-longwords } + END; + + pDisplayInfo = ^tDisplayInfo; + tDisplayInfo = record + Header : tQueryHeader; + NotAvailable : Word; { IF NULL available, else see defines } + PropertyFlags : ULONG; { Properties of this mode see defines } + Resolution : tPoint; { ticks-per-pixel X/Y } + PixelSpeed : Word; { aproximation in nanoseconds } + NumStdSprites : Word; { number of standard amiga sprites } + PaletteRange : Word; { distinguishable shades available } + SpriteResolution : tPoint; { std sprite ticks-per-pixel X/Y } + pad : Array[0..3] of Byte; + RedBits : Byte; + GreenBits : Byte; + BlueBits : Byte; + pad2 : array [0..4] of Byte; + reserved : Array[0..1] of ULONG; { terminator } + END; + +{ availability } + +CONST + DI_AVAIL_NOCHIPS =$0001; + DI_AVAIL_NOMONITOR =$0002; + DI_AVAIL_NOTWITHGENLOCK =$0004; + +{ mode properties } + + DIPF_IS_LACE = $00000001; + DIPF_IS_DUALPF = $00000002; + DIPF_IS_PF2PRI = $00000004; + DIPF_IS_HAM = $00000008; + + DIPF_IS_ECS = $00000010; { note: ECS modes (SHIRES, VGA, AND ** + PRODUCTIVITY) do not support ** + attached sprites. ** + } + DIPF_IS_AA = $00010000; { AA modes - may only be available + ** if machine has correct memory + ** type to support required + ** bandwidth - check availability. + ** (V39) + } + DIPF_IS_PAL = $00000020; + DIPF_IS_SPRITES = $00000040; + DIPF_IS_GENLOCK = $00000080; + + DIPF_IS_WB = $00000100; + DIPF_IS_DRAGGABLE = $00000200; + DIPF_IS_PANELLED = $00000400; + DIPF_IS_BEAMSYNC = $00000800; + + DIPF_IS_EXTRAHALFBRITE = $00001000; + +{ The following DIPF_IS_... flags are new for V39 } + DIPF_IS_SPRITES_ATT = $00002000; { supports attached sprites } + DIPF_IS_SPRITES_CHNG_RES = $00004000; { supports variable sprite resolution } + DIPF_IS_SPRITES_BORDER = $00008000; { sprite can be displayed in the border } + DIPF_IS_SCANDBL = $00020000; { scan doubled } + DIPF_IS_SPRITES_CHNG_BASE = $00040000; + { can change the sprite base colour } + DIPF_IS_SPRITES_CHNG_PRI = $00080000; + { can change the sprite priority + ** with respect to the playfield(s). + } + DIPF_IS_DBUFFER = $00100000; { can support double buffering } + DIPF_IS_PROGBEAM = $00200000; { is a programmed beam-sync mode } + DIPF_IS_FOREIGN = $80000000; { this mode is not native to the Amiga } + +Type + pDimensionInfo =^tDimensionInfo; + tDimensionInfo = record + Header : tQueryHeader; + MaxDepth, { log2( max number of colors ) } + MinRasterWidth, { minimum width in pixels } + MinRasterHeight, { minimum height in pixels } + MaxRasterWidth, { maximum width in pixels } + MaxRasterHeight : Word; { maximum height in pixels } + Nominal, { "standard" dimensions } + MaxOScan, { fixed, hardware dependant } + VideoOScan, { fixed, hardware dependant } + TxtOScan, { editable via preferences } + StdOScan : tRectangle; { editable via preferences } + pad : Array[0..13] of Byte; + reserved : Array[0..1] of Longint; { terminator } + END; + + pMonitorInfo = ^tMonitorInfo; + tMonitorInfo = record + Header : tQueryHeader; + Mspc : pMonitorSpec; { pointer to monitor specification } + ViewPosition, { editable via preferences } + ViewResolution : tPoint; { standard monitor ticks-per-pixel } + ViewPositionRange : tRectangle; { fixed, hardware dependant } + TotalRows, { display height in scanlines } + TotalColorClocks, { scanline width in 280 ns units } + MinRow : Word; { absolute minimum active scanline } + Compatibility : smallint; { how this coexists with others } + pad : Array[0..31] of Byte; + MouseTicks : tPoint; + DefaultViewPosition : tPoint; + PreferredModeID : ULONG; + reserved : Array[0..1] of ULONG; { terminator } + END; + +{ monitor compatibility } + +CONST + MCOMPAT_MIXED = 0; { can share display with other MCOMPAT_MIXED } + MCOMPAT_SELF = 1; { can share only within same monitor } + MCOMPAT_NOBODY= -1; { only one viewport at a time } + + DISPLAYNAMELEN = 32; + +Type + pNameInfo = ^tNameInfo; + tNameInfo = record + Header : tQueryHeader; + Name : Array[0..DISPLAYNAMELEN-1] of Char; + reserved : Array[0..1] of ULONG; { terminator } + END; + + +{****************************************************************************} + +{ The following VecInfo structure is PRIVATE, for our use only + * Touch these, and burn! (V39) + } +Type + pVecInfo = ^tVecInfo; + tVecInfo = record + Header : tQueryHeader; + Vec : Pointer; + Data : Pointer; + vi_Type : WORD; { Type in C Includes } + pad : Array[0..2] of WORD; + reserved : Array[0..1] of ULONG; + end; + + +CONST + VTAG_END_CM = $00000000; + VTAG_CHROMAKEY_CLR = $80000000; + VTAG_CHROMAKEY_SET = $80000001; + VTAG_BITPLANEKEY_CLR = $80000002; + VTAG_BITPLANEKEY_SET = $80000003; + VTAG_BORDERBLANK_CLR = $80000004; + VTAG_BORDERBLANK_SET = $80000005; + VTAG_BORDERNOTRANS_CLR = $80000006; + VTAG_BORDERNOTRANS_SET = $80000007; + VTAG_CHROMA_PEN_CLR = $80000008; + VTAG_CHROMA_PEN_SET = $80000009; + VTAG_CHROMA_PLANE_SET = $8000000A; + VTAG_ATTACH_CM_SET = $8000000B; + VTAG_NEXTBUF_CM = $8000000C; + VTAG_BATCH_CM_CLR = $8000000D; + VTAG_BATCH_CM_SET = $8000000E; + VTAG_NORMAL_DISP_GET = $8000000F; + VTAG_NORMAL_DISP_SET = $80000010; + VTAG_COERCE_DISP_GET = $80000011; + VTAG_COERCE_DISP_SET = $80000012; + VTAG_VIEWPORTEXTRA_GET = $80000013; + VTAG_VIEWPORTEXTRA_SET = $80000014; + VTAG_CHROMAKEY_GET = $80000015; + VTAG_BITPLANEKEY_GET = $80000016; + VTAG_BORDERBLANK_GET = $80000017; + VTAG_BORDERNOTRANS_GET = $80000018; + VTAG_CHROMA_PEN_GET = $80000019; + VTAG_CHROMA_PLANE_GET = $8000001A; + VTAG_ATTACH_CM_GET = $8000001B; + VTAG_BATCH_CM_GET = $8000001C; + VTAG_BATCH_ITEMS_GET = $8000001D; + VTAG_BATCH_ITEMS_SET = $8000001E; + VTAG_BATCH_ITEMS_ADD = $8000001F; + VTAG_VPMODEID_GET = $80000020; + VTAG_VPMODEID_SET = $80000021; + VTAG_VPMODEID_CLR = $80000022; + VTAG_USERCLIP_GET = $80000023; + VTAG_USERCLIP_SET = $80000024; + VTAG_USERCLIP_CLR = $80000025; +{ The following tags are V39 specific. They will be ignored (returing error -3) by + earlier versions } + VTAG_PF1_BASE_GET = $80000026; + VTAG_PF2_BASE_GET = $80000027; + VTAG_SPEVEN_BASE_GET = $80000028; + VTAG_SPODD_BASE_GET = $80000029; + VTAG_PF1_BASE_SET = $8000002a; + VTAG_PF2_BASE_SET = $8000002b; + VTAG_SPEVEN_BASE_SET = $8000002c; + VTAG_SPODD_BASE_SET = $8000002d; + VTAG_BORDERSPRITE_GET = $8000002e; + VTAG_BORDERSPRITE_SET = $8000002f; + VTAG_BORDERSPRITE_CLR = $80000030; + VTAG_SPRITERESN_SET = $80000031; + VTAG_SPRITERESN_GET = $80000032; + VTAG_PF1_TO_SPRITEPRI_SET = $80000033; + VTAG_PF1_TO_SPRITEPRI_GET = $80000034; + VTAG_PF2_TO_SPRITEPRI_SET = $80000035; + VTAG_PF2_TO_SPRITEPRI_GET = $80000036; + VTAG_IMMEDIATE = $80000037; + VTAG_FULLPALETTE_SET = $80000038; + VTAG_FULLPALETTE_GET = $80000039; + VTAG_FULLPALETTE_CLR = $8000003A; + VTAG_DEFSPRITERESN_SET = $8000003B; + VTAG_DEFSPRITERESN_GET = $8000003C; + +{ all the following tags follow the new, rational standard for videocontrol tags: + * VC_xxx,state set the state of attribute 'xxx' to value 'state' + * VC_xxx_QUERY,&var get the state of attribute 'xxx' and store it into the longword + * pointed to by &var. + * + * The following are new for V40: + } + + VC_IntermediateCLUpdate = $80000080; + { default=true. When set graphics will update the intermediate copper + * lists on color changes, etc. When false, it won't, and will be faster. + } + VC_IntermediateCLUpdate_Query = $80000081; + + VC_NoColorPaletteLoad = $80000082; + { default = false. When set, graphics will only load color 0 + * for this ViewPort, and so the ViewPort's colors will come + * from the previous ViewPort's. + * + * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined. + } + VC_NoColorPaletteLoad_Query = $80000083; + + VC_DUALPF_Disable = $80000084; + { default = false. When this flag is set, the dual-pf bit + in Dual-Playfield screens will be turned off. Even bitplanes + will still come from the first BitMap and odd bitplanes + from the second BitMap, and both R[xy]Offsets will be + considered. This can be used (with appropriate palette + selection) for cross-fades between differently scrolling + images. + When this flag is turned on, colors will be loaded for + the viewport as if it were a single viewport of depth + depth1+depth2 } + VC_DUALPF_Disable_Query = $80000085; + + +const + + SPRITE_ATTACHED = $80; + +type + + pSimpleSprite = ^tSimpleSprite; + tSimpleSprite = record + posctldata : Pointer; + height : Word; + x,y : Word; { current position } + num : Word; + end; + + pExtSprite = ^tExtSprite; + tExtSprite = record + es_SimpleSprite : tSimpleSprite; { conventional simple sprite structure } + es_wordwidth : WORD; { graphics use only, subject to change } + es_flags : WORD; { graphics use only, subject to change } + end; + +const +{ tags for AllocSpriteData() } + SPRITEA_Width = $81000000; + SPRITEA_XReplication = $81000002; + SPRITEA_YReplication = $81000004; + SPRITEA_OutputHeight = $81000006; + SPRITEA_Attached = $81000008; + SPRITEA_OldDataFormat = $8100000a; { MUST pass in outputheight if using this tag } + +{ tags for GetExtSprite() } + GSTAG_SPRITE_NUM = $82000020; + GSTAG_ATTACHED = $82000022; + GSTAG_SOFTSPRITE = $82000024; + +{ tags valid for either GetExtSprite or ChangeExtSprite } + GSTAG_SCANDOUBLED = $83000000; { request "NTSC-Like" height if possible. } + + +Type + pBitScaleArgs = ^tBitScaleArgs; + tBitScaleArgs = record + bsa_SrcX, bsa_SrcY, { source origin } + bsa_SrcWidth, bsa_SrcHeight, { source size } + bsa_XSrcFactor, bsa_YSrcFactor, { scale factor denominators } + bsa_DestX, bsa_DestY, { destination origin } + bsa_DestWidth, bsa_DestHeight, { destination size result } + bsa_XDestFactor, bsa_YDestFactor : Word; { scale factor numerators } + bsa_SrcBitMap, { source BitMap } + bsa_DestBitMap : pBitMap; { destination BitMap } + bsa_Flags : ULONG; { reserved. Must be zero! } + bsa_XDDA, bsa_YDDA : Word; { reserved } + bsa_Reserved1, + bsa_Reserved2 : Longint; + END; + + { tag definitions for GetRPAttr, SetRPAttr } + +const + RPTAG_Font = $80000000; { get/set font } + RPTAG_APen = $80000002; { get/set apen } + RPTAG_BPen = $80000003; { get/set bpen } + RPTAG_DrMd = $80000004; { get/set draw mode } + RPTAG_OutlinePen = $80000005; { get/set outline pen. corrected case. } + RPTAG_WriteMask = $80000006; { get/set WriteMask } + RPTAG_MaxPen = $80000007; { get/set maxpen } + + RPTAG_DrawBounds = $80000008; { get only rastport draw bounds. pass &rect } + + + + + + +type + + pGfxBase = ^tGfxBase; + tGfxBase = record + LibNode : tLibrary; + ActiView : pView; { ViewPtr } + copinit : pcopinit; { (copinitptr) ptr to copper start up list } + cia : Pointer; { for 8520 resource use } + blitter : Pointer; { for future blitter resource use } + LOFlist : Pointer; + SHFlist : Pointer; + blthd, + blttl : Pointer;//pbltnode; + bsblthd, + bsblttl : Pointer; //pbltnode; { Previous four are (bltnodeptr) } + vbsrv, + timsrv, + bltsrv : tInterrupt; + TextFonts : tList; + DefaultFont : pTextFont; { TextFontPtr } + Modes : Word; { copy of current first bplcon0 } + VBlank : Shortint; + Debug : Shortint; + BeamSync : smallint; + system_bplcon0 : smallint; { it is ored into each bplcon0 for display } + SpriteReserved : Byte; + bytereserved : Byte; + Flags : Word; + BlitLock : smallint; + BlitNest : smallint; + + BlitWaitQ : tList; + BlitOwner : pTask; { TaskPtr } + TOF_WaitQ : tList; + DisplayFlags : Word; { NTSC PAL GENLOC etc} + + { Display flags are determined at power on } + + SimpleSprites : Pointer; { SimpleSpritePtr ptr } + MaxDisplayRow : Word; { hardware stuff, do not use } + MaxDisplayColumn : Word; { hardware stuff, do not use } + NormalDisplayRows : Word; + NormalDisplayColumns : Word; + + { the following are for standard non interlace, 1/2 wb width } + + NormalDPMX : Word; { Dots per meter on display } + NormalDPMY : Word; { Dots per meter on display } + LastChanceMemory : pSignalSemaphore; { SignalSemaphorePtr } + LCMptr : Pointer; + MicrosPerLine : Word; { 256 time usec/line } + MinDisplayColumn : Word; + ChipRevBits0 : Byte; + MemType : Byte; + crb_reserved : Array[0..3] of Byte; + monitor_id : Word; { normally null } + hedley : Array[0..7] of ULONG; + hedley_sprites : Array[0..7] of ULONG; { sprite ptrs for intuition mouse } + hedley_sprites1 : Array[0..7] of ULONG; { sprite ptrs for intuition mouse } + hedley_count : smallint; + hedley_flags : Word; + hedley_tmp : smallint; + hash_table : Pointer; + current_tot_rows : Word; + current_tot_cclks : Word; + hedley_hint : Byte; + hedley_hint2 : Byte; + nreserved : Array[0..3] of ULONG; + a2024_sync_raster : Pointer; + control_delta_pal : Word; + control_delta_ntsc : Word; + current_monitor : pMonitorSpec; + MonitorList : tList; + default_monitor : pMonitorSpec; + MonitorListSemaphore : pSignalSemaphore; + DisplayInfoDataBase : Pointer; + TopLine : Word; + ActiViewCprSemaphore : pSignalSemaphore; + UtilityBase : Pointer; { for hook AND tag utilities } + ExecBase : Pointer; { to link with rom.lib } + bwshifts : Pointer; + StrtFetchMasks, + StopFetchMasks, + Overrun, + RealStops : Pointer; + SpriteWidth, { current width (in words) of sprites } + SpriteFMode : WORD; { current sprite fmode bits } + SoftSprites, { bit mask of size change knowledgeable sprites } + arraywidth : Shortint; + DefaultSpriteWidth : WORD; { what width intuition wants } + SprMoveDisable : Shortint; + WantChips, + BoardMemType, + Bugs : Byte; + gb_LayersBase : Pointer; + ColorMask : ULONG; + IVector, + IData : Pointer; + SpecialCounter : ULONG; { special for double buffering } + DBList : Pointer; + MonitorFlags : WORD; + ScanDoubledSprites, + BP3Bits : Byte; + MonitorVBlank : tAnalogSignalInterval; + natural_monitor : pMonitorSpec; + ProgData : Pointer; + ExtSprites : Byte; + pad3 : Byte; + GfxFlags : WORD; + VBCounter : ULONG; + HashTableSemaphore : pSignalSemaphore; + HWEmul : Array[0..8] of Pointer; + end; + +const + + NTSC = 1; + GENLOC = 2; + PAL = 4; + TODA_SAFE = 8; + + BLITMSG_FAULT = 4; + +{ bits defs for ChipRevBits } + GFXB_BIG_BLITS = 0 ; + GFXB_HR_AGNUS = 0 ; + GFXB_HR_DENISE = 1 ; + GFXB_AA_ALICE = 2 ; + GFXB_AA_LISA = 3 ; + GFXB_AA_MLISA = 4 ; { internal use only. } + + GFXF_BIG_BLITS = 1 ; + GFXF_HR_AGNUS = 1 ; + GFXF_HR_DENISE = 2 ; + GFXF_AA_ALICE = 4 ; + GFXF_AA_LISA = 8 ; + GFXF_AA_MLISA = 16; { internal use only } + +{ Pass ONE of these to SetChipRev() } + SETCHIPREV_A = GFXF_HR_AGNUS; + SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE); + SETCHIPREV_AA = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS); + SETCHIPREV_BEST= $ffffffff; + +{ memory type } + BUS_16 = 0; + NML_CAS = 0; + BUS_32 = 1; + DBL_CAS = 2; + BANDWIDTH_1X = (BUS_16 OR NML_CAS); + BANDWIDTH_2XNML= BUS_32; + BANDWIDTH_2XDBL= DBL_CAS; + BANDWIDTH_4X = (BUS_32 OR DBL_CAS); + +{ GfxFlags (private) } + NEW_DATABASE = 1; + + GRAPHICSNAME : PChar = 'graphics.library'; + + +var + GfxBase : pLibrary; + +procedure AddAnimOb(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort); +procedure AddBob(bob : PBob; Rp : PRastPort); +function AddDisplayDriverA(P: Pointer; tags: PTagItem): LongInt; +procedure AddFont(TextFont : PTextFont); +procedure AddVSprite(VSprite : PVSprite; Rp : PRastPort); +function AllocBitMap(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap) : PBitMap; +function AllocDBufInfo(Vp : PViewPort) : PDBufInfo; +function AllocRaster(Width : LongWord; Height : LongWord) : PChar; +function AllocSpriteDataA(const Bm : PBitMap;const tags : PTagItem) : PExtSprite; +procedure AndRectRegion(region : PRegion;const rectangle : pRectangle); +function AndRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +procedure Animate(AnKey : PPAnimOb; Rp : PRastPort); +function AreaDraw(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; +function AreaEllipse(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word) : LongInt; +function AreaEnd(Rp : PRastPort) : LongInt; +function AreaMove(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; +procedure AskFont(Rp : PRastPort; textAttr : pTextAttr); +function AskSoftStyle(Rp : PRastPort) : LongWord; +function AttachPalExtra(cm : pColorMap; Vp : PViewPort) : LongInt; +function AttemptLockLayerRom(layer : pLayer) : BOOLEAN; +function BestModeIDA(const tags : PTagItem) : LongWord; +procedure BitMapScale(bitScaleArgs : pBitScaleArgs); +function BltBitMap(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar) : LongInt; +procedure BltBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); +procedure BltClear(memBlock : PChar; byteCount : LongWord; Flags : LongWord); +procedure BltMaskBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar); +procedure BltPattern(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord); +procedure BltTemplate(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt); +function CalcIVG(v : pView; Vp : PViewPort) : WORD; +procedure CBump(copList : pUCopList); +function ChangeExtSpriteA(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem) : LongInt; +procedure ChangeSprite(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD); +procedure ChangeVPBitMap(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo); +procedure ClearEOL(Rp : PRastPort); +function ClearRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +procedure ClearRegion(region : PRegion); +procedure ClearScreen(Rp : PRastPort); +procedure ClipBlit(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); +procedure CloseFont(TextFont : PTextFont); +function CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN; +procedure CMove(copList : pUCopList; destination : Pointer; data : LongInt); +function CoerceMode(Vp : PViewPort; monitorid : LongWord; Flags : LongWord) : LongWord; +procedure CopySBitMap(layer : pLayer); +function CreateRastPort(): PRastPort; +function CloneRastPort(Rp: PRastPort): PRastPort; +procedure DeinitRastPort(Rp: PRastPort); +procedure FreeRastPort(Rp: PRastPort); +procedure CWait(copList : pUCopList; v : LongInt; h : LongInt); +procedure DisownBlitter; +procedure DisposeRegion(region : PRegion); +procedure DoCollision(Rp : PRastPort); +procedure Draw(Rp : PRastPort; x : LongInt; y : LongInt); +procedure DrawEllipse(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt); +procedure DrawGList(Rp : PRastPort; Vp : PViewPort); +procedure EraseRect(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +function ExtendFont(font : PTextFont;const fontTags : PTagItem) : LongWord; +function FindColor(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt) : LongInt; +function FindDisplayInfo(displayID : LongWord) : Pointer; +function Flood(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt) : BOOLEAN; +procedure FontExtent(const font : PTextFont; fontExtent : pTextExtent); +procedure FreeBitMap(Bm : PBitMap); +procedure FreeColorMap(colorMap : pColorMap); +procedure FreeCopList(copList : pCopList); +procedure FreeCprList(cprList : pcprlist); +procedure FreeDBufInfo(dbi : PDBufInfo); +procedure FreeGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt); +procedure FreeRaster(p : PChar; Width : LongWord; Height : LongWord); +procedure FreeSprite(num : LongInt); +procedure FreeSpriteData(sp : PExtSprite); +procedure FreeVPortCopLists(Vp : PViewPort); +function GetAPen(Rp : PRastPort) : LongWord; +function GetBitMapAttr(const Bm : PBitMap; attrnum : LongWord) : LongWord; +function GetBPen(Rp : PRastPort) : LongWord; +function GetColorMap(entries : LongInt) : pColorMap; +function GetDisplayInfoData(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord) : LongWord; +function GetDrMd(Rp : PRastPort) : LongWord; +function GetExtSpriteA(ss : PExtSprite;const tags : PTagItem) : LongInt; +function GetGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt) : BOOLEAN; +function GetOutlinePen(Rp : PRastPort) : LongWord; +procedure GetRGB32(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pulong); +function GetRGB4(colorMap : pColorMap; entry : LongInt) : LongWord; +procedure GetRPAttrsA(const Rp : PRastPort;const tags : PTagItem); +function GetSprite(sprite : pSimpleSprite; num : LongInt) : smallint; +function GetVPModeID(const Vp : PViewPort) : LongInt; +procedure GfxAssociate(const associateNode : Pointer; gfxNodePtr : Pointer); +procedure GfxFree(gfxNodePtr : Pointer); +function GfxLookUp(const associateNode : Pointer) : Pointer; +function GfxNew(gfxNodeType : LongWord) : Pointer; +procedure InitArea(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt); +procedure InitBitMap(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt); +procedure InitGels(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo); +procedure InitGMasks(AnOb : PAnimOb); +procedure InitMasks(VSprite : PVSprite); +procedure InitRastPort(Rp : PRastPort); +function InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt) : pTmpRas; +procedure InitView(view : pView); +procedure InitVPort(Vp : PViewPort); +procedure LoadRGB32(Vp : PViewPort;const table : pULONG); +procedure LoadRGB4(Vp : PViewPort;const colors : pWord; count : LongInt); +procedure LoadView(view : pView); +procedure LockLayerRom(layer : pLayer); +function MakeVPort(view : pView; Vp : PViewPort) : LongWord; +function ModeNotAvailable(modeID : LongWord) : LongInt; +procedure Move(Rp : PRastPort; x : LongInt; y : LongInt); +procedure MoveSprite(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt); +function MrgCop(view : pView) : LongWord; +function NewRegion : PRegion; +function NextDisplayInfo(displayID : LongWord) : LongWord; +function ObtainBestPenA(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem) : LongInt; +function ObtainPen(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt) : LongWord; +function OpenFont(textAttr : pTextAttr) : PTextFont; +function OpenMonitor(const monitorName : PChar; displayID : LongWord) : pMonitorSpec; +function OrRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +function OrRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +procedure OwnBlitter; +procedure PolyDraw(Rp : PRastPort; count : LongInt;const polyTable : pLongint); +procedure QBlit(blit : pbltnode); +procedure QBSBlit(blit : pbltnode); +function ReadPixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongWord; +function ReadPixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; +function ReadPixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; +procedure RectFill(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +procedure ReleasePen(cm : pColorMap; n : LongWord); +procedure RemFont(TextFont : PTextFont); +procedure RemIBob(bob : PBob; Rp : PRastPort; Vp : PViewPort); +procedure RemVSprite(VSprite : PVSprite); +function ScalerDiv(factor : LongWord; numerator : LongWord; denominator : LongWord) : WORD; +procedure ScrollRaster(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +procedure ScrollRasterBF(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +procedure ScrollVPort(Vp : PViewPort); +procedure SetABPenDrMd(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord); +procedure SetAPen(Rp : PRastPort; pen : LongWord); +procedure SetBPen(Rp : PRastPort; pen : LongWord); +function SetChipRev(want : LongWord) : LongWord; +procedure SetCollision(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo); +procedure SetDrMd(Rp : PRastPort; drawMode : LongWord); +function SetFont(Rp : PRastPort;const TextFont : PTextFont) : LongInt; +procedure SetMaxPen(Rp : PRastPort; maxpen : LongWord); +function SetOutlinePen(Rp : PRastPort; pen : LongWord) : LongWord; +procedure SetRast(Rp : PRastPort; pen : LongWord); +procedure SetRGB32(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord); +procedure SetRGB32CM(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord); +procedure SetRGB4(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); +procedure SetRGB4CM(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); +procedure SetRPAttrsA(Rp : PRastPort;const tags : PTagItem); +function SetSoftStyle(Rp : PRastPort; style : LongWord; enable : LongWord) : LongWord; +function SetWriteMask(Rp : PRastPort; msk : LongWord) : LongWord; +procedure SortGList(Rp : PRastPort); +procedure StripFont(font : PTextFont); +procedure SyncSBitMap(layer : pLayer); +function GText(Rp : PRastPort;const string_ : PChar; count : LongWord) : LongInt; +function TextExtent(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent) : smallint; +function TextFit(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord) : LongWord; +function TextLength(Rp : PRastPort;const string_ : PChar; count : LongWord) : smallint; +function UCopperListInit(uCopList : pUCopList; n : LongInt) : pCopList; +procedure UnlockLayerRom(layer : pLayer); +function VBeamPos : LongInt; +function VideoControl(colorMap : pColorMap; tagarray : PTagItem) : BOOLEAN; +procedure WaitBlit; +procedure WaitBOVP(Vp : PViewPort); +procedure WaitTOF; +function WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem) : smallint; +procedure WriteChunkyPixels(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt); +function WritePixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; +function WritePixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; +function WritePixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; +function XorRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +function XorRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; + +{ gfxmacros } +(* +procedure BNDRYOFF (w: PRastPort); +procedure InitAnimate (animkey: PPAnimOb); +procedure SetAfPt(w: PRastPort;p: Pointer; n: Byte); +procedure SetDrPt(w: PRastPort;p: Word); +procedure SetOPen(w: PRastPort;c: Byte); +procedure SetWrMsk(w: PRastPort; m: Byte); + +procedure SafeSetOutlinePen(w : PRastPort; c : byte); +procedure SafeSetWriteMask( w : PRastPort ; m : smallint ) ; + +procedure OFF_DISPLAY (cust: pCustom); +procedure ON_DISPLAY (cust: pCustom); +procedure OFF_SPRITE (cust: pCustom); +procedure ON_SPRITE (cust: pCustom); +procedure OFF_VBLANK (cust: pCustom); +procedure ON_VBLANK (cust: pCustom); +*) + +IMPLEMENTATION +(* +procedure BNDRYOFF (w: PRastPort); +BEGIN + WITH w^ DO BEGIN + Flags := Flags AND (NOT AREAOUTLINE); + END; +END; + +procedure InitAnimate (animkey: PPAnimOb); +BEGIN + animkey^ := NIL; +END; + +procedure SetAfPt(w: PRastPort;p: Pointer; n: Byte); +BEGIN + WITH w^ DO + BEGIN + AreaPtrn := p; + AreaPtSz := n; + END; +END; + +procedure SetDrPt(w: PRastPort;p: Word); +BEGIN + WITH w^ DO + BEGIN + LinePtrn := p; + Flags := Flags OR FRST_DOT; + linpatcnt := 15; + END; +END; + +procedure SetOPen(w: PRastPort;c: Byte); +BEGIN + WITH w^ DO + BEGIN + AOlPen := c; + Flags := Flags OR AREAOUTLINE; + END; +END; + +{ This function is fine, but FOR OS39 the SetWriteMask() gfx function + should be prefered because it SHOULD operate WITH gfx boards as well. + At least I hope it does.... } +procedure SetWrMsk(w: PRastPort; m: Byte); +BEGIN + w^.Mask := m; +END; + +procedure SafeSetOutlinePen(w : PRastPort; c : byte); +begin + IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN begin + w^.AOlPen := c; + w^.Flags := w^.Flags OR AREAOUTLINE; + END ELSE begin + c := SetOutlinePen(w,c); + END; +END; + +procedure SafeSetWriteMask( w : PRastPort ; m : smallint ) ; + VAR x : smallint ; +BEGIN + IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m) + ELSE x := SetWriteMask( w, m ); +END; + +procedure OFF_DISPLAY (cust: pCustom); +BEGIN + cust^.dmacon := BITCLR OR DMAF_RASTER; +END; + +procedure ON_DISPLAY (cust: pCustom); +BEGIN + cust^.dmacon := BITSET OR DMAF_RASTER; +END; + +procedure OFF_SPRITE (cust: pCustom); +BEGIN + cust^.dmacon := BITCLR OR DMAF_SPRITE; +END; + +procedure ON_SPRITE (cust: pCustom); +BEGIN + cust^.dmacon := BITSET OR DMAF_SPRITE; +END; + +procedure OFF_VBLANK (cust: pCustom); +BEGIN + cust^.intena := BITCLR OR INTF_VERTB; +END; + +procedure ON_VBLANK (cust: pCustom); +BEGIN + cust^.intena := BITSET OR INTF_VERTB; +END; + +*) + +procedure AddAnimOb(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort); +type + TLocalCall = procedure(AnOb : PAnimOb; AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 26)); + Call(AnOb, AnKey, Rp, GfxBase); +end; + +procedure AddBob(bob : PBob; Rp : PRastPort); +type + TLocalCall = procedure(bob : PBob; Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 16)); + Call(bob, Rp, GfxBase); +end; + +function AddDisplayDriverA(P: Pointer; tags: PTagItem): LongInt; +type + TLocalCall = function(P: Pointer; tags: PTagItem; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 181)); + Result := Call(P, tags, GfxBase); +end; + +procedure AddFont(TextFont : PTextFont); +type + TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 80)); + Call(TextFont, GfxBase); +end; + +procedure AddVSprite(VSprite : PVSprite; Rp : PRastPort); +type + TLocalCall = procedure(VSprite : PVSprite; Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 17)); + Call(VSprite, Rp, GfxBase); +end; + +function AllocBitMap(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap): PBitMap; +type + TLocalCall = function(sizex : LongWord; Sizey : LongWord; Depth : LongWord; Flags : LongWord;const Friend_bitmap : PBitMap; Base: Pointer): PBitMap; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 153)); + Result := Call(sizex, Sizey, Depth, Flags, Friend_bitmap, GfxBase); +end; + +function AllocDBufInfo(Vp : PViewPort): PDBufInfo; +type + TLocalCall = function(Vp : PViewPort; Base: Pointer): PDBufInfo; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 161)); + Result := Call(Vp, GfxBase); +end; + +function AllocRaster(Width : LongWord; Height : LongWord) : PChar; +type + TLocalCall = function(Width : LongWord; Height : LongWord; Base: Pointer): PChar; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 82)); + Result := Call(Width, Height, GfxBase); +end; + +function AllocSpriteDataA(const Bm : PBitMap;const tags : PTagItem) : PExtSprite; +type + TLocalCall = function(const Bm : PBitMap;const tags : PTagItem; Base: Pointer): PExtSprite; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 170)); + Result := Call(Bm, tags, GfxBase); +end; + +procedure AndRectRegion(region : PRegion;const rectangle : pRectangle); +type + TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 84)); + Call(region, rectangle, GfxBase); +end; + +function AndRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +type + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 104)); + Result := Call(srcRegion, destRegion, GfxBase); +end; + +procedure AndRectRegionND(region : PRegion;const rectangle : pRectangle); +type + TLocalCall = procedure(region : PRegion;const rectangle : pRectangle; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 107)); + Call(region, rectangle, GfxBase); +end; + +function AndRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +type + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 108)); + Result := Call(srcRegion, destRegion, GfxBase); +end; + +procedure Animate(AnKey : PPAnimOb; Rp : PRastPort); +type + TLocalCall = procedure(AnKey : PPAnimOb; Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 27)); + Call(AnKey, Rp, GfxBase); +end; + +function AreaDraw(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; +type + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 43)); + Result := Call(Rp, x, y, GfxBase); +end; + +function AreaEllipse(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word) : LongInt; +type + TLocalCall = function(Rp : PRastPort; xCenter : word; yCenter : word; a : word; b : word; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 31)); + Result := Call(Rp, xCenter, yCenter, a, b, GfxBase); +end; + +function AreaEnd(Rp : PRastPort) : LongInt; +type + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 44)); + Result := Call(Rp, GfxBase); +end; + +function AreaMove(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; +type + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 42)); + Result := Call(Rp, x, y, GfxBase); +end; + +procedure AskFont(Rp : PRastPort; textAttr : pTextAttr); +type + TLocalCall = procedure(Rp : PRastPort; textAttr : pTextAttr; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 79)); + Call(Rp, textAttr, GfxBase); +end; + +function AskSoftStyle(Rp : PRastPort) : LongWord; +type + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 14)); + Result := Call(Rp, GfxBase); +end; + +function AttachPalExtra(cm : pColorMap; Vp : PViewPort) : LongInt; +type + TLocalCall = function(cm : pColorMap; Vp : PViewPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 139)); + Result := Call(cm, Vp, GfxBase); +end; + +function AttemptLockLayerRom(layer : pLayer) : BOOLEAN; +type + TLocalCall = function(layer : pLayer; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 109)); + Result := Call(layer, GfxBase); +end; + +function BestModeIDA(const tags : PTagItem) : LongWord; +type + TLocalCall = function(const tags : PTagItem; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 175)); + Result := Call(tags, GfxBase); +end; + +procedure BitMapScale(bitScaleArgs : pBitScaleArgs); +type + TLocalCall = procedure(bitScaleArgs : pBitScaleArgs; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 113)); + Call(bitScaleArgs, GfxBase); +end; + +function BltBitMap(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar) : LongInt; +type + TLocalCall = function(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destBitMap : PBitMap; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; mask : LongWord; tempA : PChar; Base: Pointer): LongInt ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 5)); + Result := Call(srcBitMap, xSrc, ySrc, destBitMap, xDest, yDest, xSize, ySize, minterm, mask, tempA, GfxBase); +end; + +procedure BltBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); +type + TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 101)); + Call(srcBitMap, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, GfxBase); +end; + +procedure BltClear(memBlock : PChar; byteCount : LongWord; Flags : LongWord); +type + TLocalCall = procedure(memBlock : PChar; byteCount : LongWord; Flags : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 50)); + Call(memBlock, byteCount, Flags, GfxBase); +end; + +procedure BltMaskBitMapRastPort(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar); +type + TLocalCall = procedure(const srcBitMap : PBitMap; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord;const bltMask : PChar; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 106)); + Call(srcBitMap, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, bltMask, GfxBase); +end; + +procedure BltPattern(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord); +type + TLocalCall = procedure(Rp : PRastPort;const mask : PChar; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; maskBPR : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 52)); + Call(Rp, mask, xMin, yMin, xMax, yMax, maskBPR, GfxBase); +end; + +procedure BltTemplate(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt); +type + TLocalCall = procedure(const source : PChar; xSrc : LongInt; srcMod : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 6)); + Call(source, xSrc, srcMod, destRP, xDest, yDest, xSize, ySize, GfxBase); +end; + +function CalcIVG(v : pView; Vp : PViewPort) : WORD; +type + TLocalCall = function(v : pView; Vp : PViewPort; Base: Pointer): WORD; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 138)); + Result := Call(v, Vp, GfxBase); +end; + +procedure CBump(copList : pUCopList); +type + TLocalCall = procedure(copList : pUCopList; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 62)); + Call(copList, GfxBase); +end; + +function ChangeExtSpriteA(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem) : LongInt; +type + TLocalCall = function(Vp : PViewPort; oldsprite : PExtSprite; newsprite : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 171)); + Result := Call(Vp, oldsprite, newsprite, tags, GfxBase); +end; + +procedure ChangeSprite(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD); +type + TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; newData : pWORD; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 70)); + Call(Vp, sprite, newData, GfxBase); +end; + +procedure ChangeVPBitMap(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo); +type + TLocalCall = procedure(Vp : PViewPort; Bm : PBitMap; db : PDBufInfo; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 157)); + Call(Vp, Bm, db, GfxBase); +end; + +procedure ClearEOL(Rp : PRastPort); +type + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 7)); + Call(Rp, GfxBase); +end; + +function ClearRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +type + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 87)); + Result := Call(region, rectangle, GfxBase); +end; + +function ClearRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +type + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 124)); + Result := Call(region, rectangle, GfxBase); +end; + +procedure ClearRegionRegionND(region1 : PRegion; region2 : PRegion); +type + TLocalCall = procedure(region1 : PRegion; region2 : PRegion; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 141)); + Call(region1,region2, GfxBase); +end; + +procedure ClearRegion(region : PRegion); +type + TLocalCall = procedure(region : PRegion; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 88)); + Call(region, GfxBase); +end; + +procedure ClearScreen(Rp : PRastPort); +type + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 8)); + Call(Rp, GfxBase); +end; + +procedure ClipBlit(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord); +type + TLocalCall = procedure(srcRP : PRastPort; xSrc : LongInt; ySrc : LongInt; destRP : PRastPort; xDest : LongInt; yDest : LongInt; xSize : LongInt; ySize : LongInt; minterm : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 92)); + Call(srcRP, xSrc, ySrc, destRP, xDest, yDest, xSize, ySize, minterm, GfxBase); +end; + +procedure CloseFont(TextFont : PTextFont); +type + TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 13)); + Call(TextFont, GfxBase); +end; + +function CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN; +type + TLocalCall = function(monitorSpec : pMonitorSpec; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 120)); + Result := Call(monitorSpec, GfxBase); +end; + +procedure CMove(copList : pUCopList; destination : Pointer; data : LongInt); +type + TLocalCall = procedure(copList : pUCopList; destination : Pointer; data : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 63)); + Call(copList, destination, data, GfxBase); +end; + +function CoerceMode(Vp : PViewPort; monitorid : LongWord; Flags : LongWord) : LongWord; +type + TLocalCall = function(Vp : PViewPort; monitorid : LongWord; Flags : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 156)); + Result := Call(Vp, monitorid, Flags, GfxBase); +end; + +procedure CopySBitMap(layer : pLayer); +type + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 75)); + Call(layer, GfxBase); +end; + +function CreateRastPort(): PRastPort; +type + TLocalCall = function(Base: Pointer): PRastPort; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 177)); + Result := Call(GfxBase); +end; + +function CloneRastPort(Rp: PRastPort): PRastPort; +type + TLocalCall = function(Rp: PRastPort; Base: Pointer): PRastPort; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 178)); + Result := Call(Rp, GfxBase); +end; + +procedure DeinitRastPort(Rp: PRastPort); +type + TLocalCall = procedure(Rp: PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 179)); + Call(Rp, GfxBase); +end; + +procedure FreeRastPort(Rp: PRastPort); +type + TLocalCall = procedure(Rp: PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 180)); + Call(Rp, GfxBase); +end; + +procedure CWait(copList : pUCopList; v : LongInt; h : LongInt); +type + TLocalCall = procedure(copList : pUCopList; v : LongInt; h : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 63)); + Call(copList, v, h, GfxBase); +end; + +procedure DisownBlitter; +type + TLocalCall = procedure(Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 77)); + Call(GfxBase); +end; + +procedure DisposeRegion(region : PRegion); +type + TLocalCall = procedure(region : PRegion; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 89)); + Call(region, GfxBase); +end; + +procedure DoCollision(Rp : PRastPort); +type + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 18)); + Call(Rp, GfxBase); +end; + +procedure Draw(Rp : PRastPort; x : LongInt; y : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 41)); + Call(Rp, x, y, GfxBase); +end; + +procedure DrawEllipse(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; xCenter : LongInt; yCenter : LongInt; a : LongInt; b : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 30)); + Call(Rp, xCenter, yCenter, a, b, GfxBase); +end; + +procedure DrawGList(Rp : PRastPort; Vp : PViewPort); +type + TLocalCall = procedure(Rp : PRastPort; Vp : PViewPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 19)); + Call(Rp, Vp, GfxBase); +end; + +procedure EraseRect(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 135)); + Call(Rp, xMin, yMin, xMax, yMax, GfxBase); +end; + +function ExtendFont(font : PTextFont;const fontTags : PTagItem) : LongWord; +type + TLocalCall = function(font : PTextFont;const fontTags : PTagItem; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 136)); + Result := Call(font, fontTags, GfxBase); +end; + +function FindColor(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt) : LongInt; +type + TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord; maxcolor : LongInt; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 168)); + Result := Call(cm, r, g, b, maxcolor, GfxBase); +end; + +function FindDisplayInfo(displayID : LongWord) : Pointer; +type + TLocalCall = function(displayID : LongWord; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 122)); + Result := Call(displayID, GfxBase); +end; + +function Flood(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt) : BOOLEAN; +type + TLocalCall = function(Rp : PRastPort; mode : LongWord; x : LongInt; y : LongInt; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 55)); + Result := Call(Rp, mode, x, y, GfxBase); +end; + +procedure FontExtent(const font : PTextFont; fontExtent : pTextExtent); +type + TLocalCall = procedure(const font : PTextFont; fontExtent : pTextExtent; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 127)); + Call(font, fontExtent, GfxBase); +end; + +procedure FreeBitMap(Bm : PBitMap); +type + TLocalCall = procedure(Bm : PBitMap; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 154)); + Call(Bm, GfxBase); +end; + +procedure FreeColorMap(colorMap : pColorMap); +type + TLocalCall = procedure(colorMap : pColorMap; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 96)); + Call(colorMap, GfxBase); +end; + +procedure FreeCopList(copList : pCopList); +type + TLocalCall = procedure(copList : pCopList; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 91)); + Call(copList, GfxBase); +end; + +procedure FreeCprList(cprList : pcprlist); +type + TLocalCall = procedure(cprList : pcprlist; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 94)); + Call(cprList, GfxBase); +end; + +procedure FreeDBufInfo(dbi : PDBufInfo); +type + TLocalCall = procedure(dbi : PDBufInfo; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 162)); + Call(dbi, GfxBase); +end; + +procedure FreeGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt); +type + TLocalCall = procedure(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 100)); + Call(AnOb, Rp, flag, GfxBase); +end; + +procedure FreeRaster(p : PChar; Width : LongWord; Height : LongWord); +type + TLocalCall = procedure(p : PChar; Width : LongWord; Height : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 83)); + Call(p, Width, Height, GfxBase); +end; + +procedure FreeSprite(num : LongInt); +type + TLocalCall = procedure(num : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 69)); + Call(num, GfxBase); +end; + +procedure FreeSpriteData(sp : PExtSprite); +type + TLocalCall = procedure(sp : PExtSprite; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 172)); + Call(sp, GfxBase); +end; + +procedure FreeVPortCopLists(Vp : PViewPort); +type + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 91)); + Call(Vp, GfxBase); +end; + +function GetAPen(Rp : PRastPort) : LongWord; +type + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 143)); + Result := Call(Rp, GfxBase); +end; + +function GetBitMapAttr(const Bm : PBitMap; attrnum : LongWord) : LongWord; +type + TLocalCall = function(const Bm : PBitMap; attrnum : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 160)); + Result := Call(Bm, attrnum, GfxBase); +end; + +function GetBPen(Rp : PRastPort) : LongWord; +type + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 144)); + Result := Call(Rp, GfxBase); +end; + +function GetColorMap(entries : LongInt) : pColorMap; +type + TLocalCall = function(entries : LongInt; Base: Pointer): pColorMap; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 95)); + Result := Call(entries, GfxBase); +end; + +function GetDisplayInfoData(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord) : LongWord; +type + TLocalCall = function(const handle : Pointer; buf : PChar; size : LongWord; tagID : LongWord; displayID : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 126)); + Result := Call(handle, buf, size, tagID, displayID, GfxBase); +end; + +function GetDrMd(Rp : PRastPort) : LongWord; +type + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 145)); + Result := Call(Rp, GfxBase); +end; + +function GetExtSpriteA(ss : PExtSprite;const tags : PTagItem) : LongInt; +type + TLocalCall = function(ss : PExtSprite;const tags : PTagItem; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 155)); + Result := Call(ss, tags, GfxBase); +end; + +function GetGBuffers(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt) : BOOLEAN; +type + TLocalCall = function(AnOb : PAnimOb; Rp : PRastPort; flag : LongInt; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 28)); + Result := Call(AnOb, Rp, flag, GfxBase); +end; + +function GetOutlinePen(Rp : PRastPort) : LongWord; +type + TLocalCall = function(Rp : PRastPort; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 146)); + Result := Call(Rp, GfxBase); +end; + +procedure GetRGB32(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong); +type + TLocalCall = procedure(const cm : pColorMap; firstcolor : LongWord; ncolors : LongWord; table : pUlong; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 150)); + Call(cm, firstcolor, ncolors, table, GfxBase); +end; + +function GetRGB4(colorMap : pColorMap; entry : LongInt) : LongWord; +type + TLocalCall = function(colorMap : pColorMap; entry : LongInt; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 97)); + Result := Call(colorMap, entry, GfxBase); +end; + +procedure GetRPAttrsA(const Rp : PRastPort;const tags : PTagItem); +type + TLocalCall = procedure(const Rp : PRastPort;const tags : PTagItem; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 174)); + Call(Rp, tags, GfxBase); +end; + +function GetSprite(sprite : pSimpleSprite; num : LongInt) : smallint; +type + TLocalCall = function(sprite : pSimpleSprite; num : LongInt; Base: Pointer): smallint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 68)); + Result := Call(sprite, num, GfxBase); +end; + +function GetVPModeID(const Vp : PViewPort) : LongInt; +type + TLocalCall = function(const Vp : PViewPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 132)); + Result := Call(Vp, GfxBase); +end; + +procedure GfxAssociate(const associateNode : Pointer; gfxNodePtr : Pointer); +type + TLocalCall = procedure(const associateNode : Pointer; gfxNodePtr : Pointer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 112)); + Call(associateNode, gfxNodePtr, GfxBase); +end; + +procedure GfxFree(gfxNodePtr : Pointer); +type + TLocalCall = procedure(gfxNodePtr : Pointer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 111)); + Call(gfxNodePtr, GfxBase); +end; + +function GfxLookUp(const associateNode : Pointer) : Pointer; +type + TLocalCall = function(const associateNode : Pointer; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 117)); + Result := Call(associateNode, GfxBase); +end; + +function GfxNew(gfxNodeType : LongWord) : Pointer; +type + TLocalCall = function(gfxNodeType : LongWord; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 110)); + Result := Call(gfxNodeType, GfxBase); +end; + +procedure InitArea(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt); +type + TLocalCall = procedure(areaInfo : pAreaInfo; vectorBuffer : Pointer; maxVectors : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 47)); + Call(areaInfo, vectorBuffer, maxVectors, GfxBase); +end; + +procedure InitBitMap(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt); +type + TLocalCall = procedure(bitMap : PBitMap; Depth : LongInt; Width : LongInt; Height : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 65)); + Call(bitMap, Depth, Width, Height, GfxBase); +end; + +procedure InitGels(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo); +type + TLocalCall = procedure(head : PVSprite; tail : PVSprite; gelsInfo : pGelsInfo; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 20)); + Call(head, tail, gelsInfo, GfxBase); +end; + +procedure InitGMasks(AnOb : PAnimOb); +type + TLocalCall = procedure(AnOb : PAnimOb; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 29)); + Call(AnOb, GfxBase); +end; + +procedure InitMasks(VSprite : PVSprite); +type + TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 22)); + Call(VSprite, GfxBase); +end; + +procedure InitRastPort(Rp : PRastPort); +type + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 33)); + Call(Rp, GfxBase); +end; + +function InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt) : pTmpRas; +type + TLocalCall = function(tmpRas : pTmpRas; buffer : PLANEPTR; size : LongInt; Base: Pointer): pTmpRas; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 78)); + Result := Call(tmpRas, buffer, size, GfxBase); +end; + +procedure InitView(view : pView); +type + TLocalCall = procedure(view : pView; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 60)); + Call(view, GfxBase); +end; + +procedure InitVPort(Vp : PViewPort); +type + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 34)); + Call(Vp, GfxBase); +end; + +procedure LoadRGB32(Vp : PViewPort;const table : pULONG); +type + TLocalCall = procedure(Vp : PViewPort;const table : pULONG; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 147)); + Call(Vp, table, GfxBase); +end; + +procedure LoadRGB4(Vp : PViewPort;const colors : pWord; count : LongInt); +type + TLocalCall = procedure(Vp : PViewPort;const colors : pWord; count : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 32)); + Call(Vp, colors, count, GfxBase); +end; + +procedure LoadView(view : pView); +type + TLocalCall = procedure(view : pView; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 37)); + Call(view, GfxBase); +end; + +procedure LockLayerRom(layer : pLayer); +type + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 72)); + Call(layer, GfxBase); +end; + +function MakeVPort(view : pView; Vp : PViewPort) : LongWord; +type + TLocalCall = function(view : pView; Vp : PViewPort; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 36)); + Result := Call(view, Vp, GfxBase); +end; + +function ModeNotAvailable(modeID : LongWord) : LongInt; +type + TLocalCall = function(modeID : LongWord; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 133)); + Result := Call(modeID, GfxBase); +end; + +procedure Move(Rp : PRastPort; x : LongInt; y : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 40)); + Call(Rp, x, y, GfxBase); +end; + +procedure MoveSprite(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt); +type + TLocalCall = procedure(Vp : PViewPort; sprite : pSimpleSprite; x : LongInt; y : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 71)); + Call(Vp, sprite, x, y, GfxBase); +end; + +function MrgCop(view : pView) : LongWord; +type + TLocalCall = function(view : pView; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 35)); + Result := Call(view, GfxBase); +end; + +function NewRegion : PRegion; +type + TLocalCall = function(Base: Pointer): PRegion; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 86)); + Result := Call(GfxBase); +end; + +function NextDisplayInfo(displayID : LongWord) : LongWord; +type + TLocalCall = function(displayID : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 122)); + Result := Call(displayID, GfxBase); +end; + +function ObtainBestPenA(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem) : LongInt; +type + TLocalCall = function(cm : pColorMap; r : LongWord; g : LongWord; b : LongWord;const tags : PTagItem; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 140)); + Result := Call(cm, r, g, b, tags, GfxBase); +end; + +function ObtainPen(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt) : LongWord; +type + TLocalCall = function(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; f : LongInt; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 159)); + Result := Call(cm, n, r, g, b, f, GfxBase); +end; + +function OpenFont(textAttr : pTextAttr) : PTextFont; +type + TLocalCall = function(textAttr : pTextAttr; Base: Pointer): PTextFont; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 12)); + Result := Call(textAttr, GfxBase); +end; + +function OpenMonitor(const monitorName : PChar; displayID : LongWord) : pMonitorSpec; +type + TLocalCall = function(const monitorName : PChar; displayID : LongWord; Base: Pointer): pMonitorSpec; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 119)); + Result := Call(monitorName, displayID, GfxBase); +end; + +function OrRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +type + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 85)); + Result := Call(region, rectangle, GfxBase); +end; + +function OrRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +type + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 123)); + Result := Call(region, rectangle, GfxBase); +end; + +function OrRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +type + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 102)); + Result := Call(srcRegion, destRegion, GfxBase); +end; + +function OrRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +type + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 125)); + Result := Call(srcRegion, destRegion, GfxBase); +end; + +procedure OwnBlitter; +type + TLocalCall = procedure(Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 76)); + Call(GfxBase); +end; + +procedure PolyDraw(Rp : PRastPort; count : LongInt;const polyTable : pLongint); +type + TLocalCall = procedure(Rp : PRastPort; count : LongInt;const polyTable : pLongint; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 56)); + Call(Rp, count, polyTable, GfxBase); +end; + +procedure QBlit(blit : pbltnode); +type + TLocalCall = procedure(blit : pbltnode; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 46)); + Call(blit, GfxBase); +end; + +procedure QBSBlit(blit : pbltnode); +type + TLocalCall = procedure(blit : pbltnode; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 49)); + Call(blit, GfxBase); +end; + +function ReadPixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongWord; +type + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 53)); + Result := Call(Rp, x, y, GfxBase); +end; + +function ReadPixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; +type + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 131)); + Result := Call(Rp, xstart, ystart, xstop, ystop, array_, temprp, GfxBase); +end; + +function ReadPixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; +type + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 128)); + Result := Call(Rp, xstart, ystart, Width, array_, tempRP, GfxBase); +end; + +procedure RectFill(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 51)); + Call(Rp, xMin, yMin, xMax, yMax, GfxBase); +end; + +procedure ReleasePen(cm : pColorMap; n : LongWord); +type + TLocalCall = procedure(cm : pColorMap; n : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 158)); + Call(cm, n, GfxBase); +end; + +procedure RemFont(TextFont : PTextFont); +type + TLocalCall = procedure(TextFont : PTextFont; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 81)); + Call(TextFont, GfxBase); +end; + +procedure RemIBob(bob : PBob; Rp : PRastPort; Vp : PViewPort); +type + TLocalCall = procedure(bob : PBob; Rp : PRastPort; Vp : PViewPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 22)); + Call(bob, Rp, Vp, GfxBase); +end; + +procedure RemVSprite(VSprite : PVSprite); +type + TLocalCall = procedure(VSprite : PVSprite; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 23)); + Call(VSprite, GfxBase); +end; + +function ScalerDiv(factor : LongWord; numerator : LongWord; denominator : LongWord) : WORD; +type + TLocalCall = function(factor : LongWord; numerator : LongWord; denominator : LongWord; Base: Pointer): WORD; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 114)); + Result := Call(factor, numerator, denominator, GfxBase); +end; + +procedure ScrollRaster(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 66)); + Call(Rp, dx, dy, xMin, yMin, xMax, yMax, GfxBase); +end; + +procedure ScrollRasterBF(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; dx : LongInt; dy : LongInt; xMin : LongInt; yMin : LongInt; xMax : LongInt; yMax : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 167)); + Call(Rp, dx, dy, xMin, yMin, xMax, yMax, GfxBase); +end; + +procedure ScrollVPort(Vp : PViewPort); +type + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 98)); + Call(Vp, GfxBase); +end; + +procedure SetABPenDrMd(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord); +type + TLocalCall = procedure(Rp : PRastPort; apen : LongWord; bpen : LongWord; drawmode : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 149)); + Call(Rp, apen, bpen, drawmode, GfxBase); +end; + +procedure SetAPen(Rp : PRastPort; pen : LongWord); +type + TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 57)); + Call(Rp, pen, GfxBase); +end; + +procedure SetBPen(Rp : PRastPort; pen : LongWord); +type + TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 58)); + Call(Rp, pen, GfxBase); +end; + +function SetChipRev(want : LongWord) : LongWord; +type + TLocalCall = function(want : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 148)); + Result := Call(want, GfxBase); +end; + +procedure SetCollision(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo); +type + TLocalCall = procedure(num : LongWord; routine : tPROCEDURE; gelsInfo : pGelsInfo; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 24)); + Call(num, routine, gelsInfo, GfxBase); +end; + +procedure SetDrMd(Rp : PRastPort; drawMode : LongWord); +type + TLocalCall = procedure(Rp : PRastPort; drawMode : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 59)); + Call(Rp, drawMode, GfxBase); +end; + +function SetFont(Rp : PRastPort;const TextFont : PTextFont) : LongInt; +type + TLocalCall = function(Rp : PRastPort;const TextFont : PTextFont; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 11)); + Result := Call(Rp, TextFont, GfxBase); +end; + +procedure SetMaxPen(Rp : PRastPort; maxpen : LongWord); +type + TLocalCall = procedure(Rp : PRastPort; maxpen : LongWord; Base: Pointer) ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 165)); + Call(Rp, maxpen, GfxBase); +end; + +function SetOutlinePen(Rp : PRastPort; pen : LongWord) : LongWord; +type + TLocalCall = function(Rp : PRastPort; pen : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 163)); + Result := Call(Rp, pen, GfxBase); +end; + +procedure SetRast(Rp : PRastPort; pen : LongWord); +type + TLocalCall = procedure(Rp : PRastPort; pen : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 39)); + Call(Rp, pen, GfxBase); +end; + +procedure SetRGB32(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord); +type + TLocalCall = procedure(Vp : PViewPort; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 142)); + Call(Vp, n, r, g, b, GfxBase); +end; + +procedure SetRGB32CM(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord); +type + TLocalCall = procedure(cm : pColorMap; n : LongWord; r : LongWord; g : LongWord; b : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 166)); + Call(cm, n, r, g, b, GfxBase); +end; + +procedure SetRGB4(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); +type + TLocalCall = procedure(Vp : PViewPort; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 48)); + Call(Vp, index, red, green, blue, GfxBase); +end; + +procedure SetRGB4CM(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord); +type + TLocalCall = procedure(colorMap : pColorMap; index : LongInt; red : LongWord; green : LongWord; blue : LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 106)); + Call(colorMap, index, red, green, blue, GfxBase); +end; + +procedure SetRPAttrsA(Rp : PRastPort;const tags : PTagItem); +type + TLocalCall = procedure(Rp : PRastPort;const tags : PTagItem; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 173)); + Call(Rp, tags, GfxBase); +end; + +function SetSoftStyle(Rp : PRastPort; style : LongWord; enable : LongWord) : LongWord; +type + TLocalCall = function(Rp : PRastPort; style : LongWord; enable : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 15)); + Result := Call(Rp, style, enable, GfxBase); +end; + +function SetWriteMask(Rp : PRastPort; msk : LongWord) : LongWord; +type + TLocalCall = function(Rp : PRastPort; msk : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 164)); + Result := Call(Rp, msk, GfxBase); +end; + +procedure SortGList(Rp : PRastPort); +type + TLocalCall = procedure(Rp : PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 25)); + Call(Rp, GfxBase); +end; + +procedure StripFont(font : PTextFont); +type + TLocalCall = procedure(font : PTextFont; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 137)); + Call(font, GfxBase); +end; + +procedure SyncSBitMap(layer : pLayer); +type + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 74)); + Call(layer, GfxBase); +end; + +function GText(Rp : PRastPort;const string_ : PChar; count : LongWord) : LongInt; +type + TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 10)); + Result := Call(Rp, string_, count, GfxBase); +end; + +function TextExtent(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent) : smallint; +type + TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongInt; _textExtent : pTextExtent; Base: Pointer): smallint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 115)); + Result := Call(Rp, string_, count, _textExtent, GfxBase); +end; + +function TextFit(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord) : LongWord; +type + TLocalCall = function(Rp : PRastPort;const string_ : PChar; strLen : LongWord; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LongInt; constrainingBitWidth : LongWord; constrainingBitHeight : LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 116)); + Result := Call(Rp, string_, strLen, textExtent, constrainingExtent, strDirection, constrainingBitWidth, constrainingBitHeight, GfxBase); +end; + +function TextLength(Rp : PRastPort;const string_ : PChar; count : LongWord) : smallint; +type + TLocalCall = function(Rp : PRastPort;const string_ : PChar; count : LongWord; Base: Pointer): smallint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 9)); + Result := Call(Rp, string_, count, GfxBase); +end; + +function UCopperListInit(uCopList : pUCopList; n : LongInt) : pCopList; +type + TLocalCall = function(uCopList : pUCopList; n : LongInt; Base: Pointer): pCopList; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 99)); + Result := Call(uCopList, n, GfxBase); +end; + +procedure UnlockLayerRom(layer : pLayer); +type + TLocalCall = procedure(layer : pLayer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 73)); + Call(layer, GfxBase); +end; + +function VBeamPos : LongInt; +type + TLocalCall = function(Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 64)); + Result := Call(GfxBase); +end; + +function VideoControl(colorMap : pColorMap; tagarray : PTagItem) : BOOLEAN; +type + TLocalCall = function(colorMap : pColorMap; tagarray : PTagItem; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 118)); + Result := Call(colorMap, tagarray, GfxBase); +end; + +procedure WaitBlit; +type + TLocalCall = procedure(Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 38)); + Call(GfxBase); +end; + +procedure WaitBOVP(Vp : PViewPort); +type + TLocalCall = procedure(Vp : PViewPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 67)); + Call(Vp, GfxBase); +end; + +procedure WaitTOF; +type + TLocalCall = procedure(Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 45)); + Call(GfxBase); +end; + +function WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem) : smallint; +type + TLocalCall = function(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : PTagItem; Base: Pointer): smallint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 134)); + Result := Call(reqTextAttr, targetTextAttr, targetTags, GfxBase); +end; + +procedure WriteChunkyPixels(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt); +type + TLocalCall = procedure(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; bytesperrow : LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 176)); + Call(Rp, xstart, ystart, xstop, ystop, array_, bytesperrow, GfxBase); +end; + +function WritePixel(Rp : PRastPort; x : LongInt; y : LongInt) : LongInt; +type + TLocalCall = function(Rp : PRastPort; x : LongInt; y : LongInt; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 54)); + Result := Call(Rp, x, y, GfxBase); +end; + +function WritePixelArray8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort) : LongInt; +type + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; xstop : LongWord; ystop : LongWord; array_ : pointer; temprp : PRastPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 131)); + Result := Call(Rp, xstart, ystart, xstop, ystop, array_, temprp, GfxBase); +end; + +function WritePixelLine8(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort) : LongInt; +type + TLocalCall = function(Rp : PRastPort; xstart : LongWord; ystart : LongWord; Width : LongWord; array_ : pointer; tempRP : PRastPort; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 130)); + Result := Call(Rp, xstart, ystart, Width, array_, tempRP, GfxBase); +end; + +function XorRectRegion(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +type + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 93)); + Result := Call(region, rectangle, GfxBase); +end; + +function XorRectRegionND(region : PRegion;const rectangle : pRectangle) : BOOLEAN; +type + TLocalCall = function(region : PRegion;const rectangle : pRectangle; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 152)); + Result := Call(region, rectangle, GfxBase); +end; + + +function XorRegionRegion(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +type + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 103)); + Result := Call(srcRegion, destRegion, GfxBase); +end; + +function XorRegionRegionND(const srcRegion : PRegion; destRegion : PRegion) : BOOLEAN; +type + TLocalCall = function(const srcRegion : PRegion; destRegion : PRegion; Base: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(GfxBase, 151)); + Result := Call(srcRegion, destRegion, GfxBase); +end; + + +initialization + GfxBase := OpenLibrary('graphics.library',36); +finalization + CloseLibrary(GfxBase); + +END. (* UNIT GRAPHICS *) + + + + + + diff --git a/rtl/aros/amigados.pas b/rtl/aros/amigados.pas new file mode 100644 index 0000000000..064a512fa8 --- /dev/null +++ b/rtl/aros/amigados.pas @@ -0,0 +1,4123 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{ + History: + Added overlay functions for Pchar->Strings, functions + and procedures. Now you can mix PChar and Strings e.g + OpenLibrary('whatis.library',37). No need to cast to + a PChar. + 14 Jul 2000. + + Changed ReadArgs, removed the var for the second arg. + Changed DOSRename from longint to a boolean. + Aug 04 2000. + + Added functions and procedures with array of const. + For use with fpc 1.0.7 + + You have to use systemvartags. Check out that unit. + 09 Nov 2002. + + Added the define use_amiga_smartlink. + 13 Jan 2003. + + Update for AmigaOS 3.9. + Added some const. + 26 Jan 2003. + + Changed integer > smallint. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se +} + +unit amigados; + +INTERFACE + +uses exec, utility, timer; + +const + +{ Predefined Amiga DOS global constants } + + DOSTRUE = -1; + DOSFALSE = 0; + +{ Mode parameter to Open() } + + MODE_OLDFILE = 1005; { Open existing file read/write + positioned at beginning of file. } + MODE_NEWFILE = 1006; { Open freshly created file (delete + old file) read/write } + MODE_READWRITE = 1004; { Open old file w/exclusive lock } + +{ Relative position to Seek() } + + OFFSET_BEGINNING = -1; { relative to Begining Of File } + OFFSET_CURRENT = 0; { relative to Current file position } + OFFSET_END = 1; { relative to End Of File } + + BITSPERBYTE = 8; + BYTESPERLONG = 4; + BITSPERLONG = 32; + MAXINT = $7FFFFFFF; + MININT = $80000000; + +{ Passed as type to Lock() } + + SHARED_LOCK = -2; { File is readable by others } + ACCESS_READ = -2; { Synonym } + EXCLUSIVE_LOCK = -1; { No other access allowed } + ACCESS_WRITE = -1; { Synonym } + +type + + FileHandle = BPTR; + FileLock = BPTR; + + pDateStamp = ^tDateStamp; + tDateStamp = record + ds_Days : Longint; { Number of days since Jan. 1, 1978 } + ds_Minute : Longint; { Number of minutes past midnight } + ds_Tick : Longint; { Number of ticks past minute } + end; + +const + + TICKS_PER_SECOND = 50; { Number of ticks in one second } + +{$PACKRECORDS 4} +type + +{ Returned by Examine() and ExInfo(), must be on a 4 byte boundary } + + PFileInfoBlock = ^TFileInfoBlock; + TFileInfoBlock = record + fib_DiskKey : LongInt; + fib_DirEntryType : LongInt; + { type of Directory. If < 0, then a plain file. + If > 0 a directory } + fib_FileName : Array [0..107] of Char; + { Null terminated. Max 30 chars used for now } + fib_Protection : LongInt; + { bit mask of protection, rwxd are 3-0. } + fib_EntryType : LongInt; + fib_Size : LongInt; { Number of bytes in file } + fib_NumBlocks : LongInt; { Number of blocks in file } + fib_Date : TDateStamp; { Date file last changed } + fib_Comment : Array [0..79] of Char; + { Null terminated comment associated with file } + fib_OwnerUID : Word; + fib_OwnerGID : Word; + fib_Reserved : Array [0..31] of Char; + end; + +const + +{ FIB stands for FileInfoBlock } + +{* FIBB are bit definitions, FIBF are field definitions *} +{* Regular RWED bits are 0 == allowed. *} +{* NOTE: GRP and OTR RWED permissions are 0 == not allowed! *} +{* Group and Other permissions are not directly handled by the filesystem *} + + FIBB_OTR_READ = 15; {* Other: file is readable *} + FIBB_OTR_WRITE = 14; {* Other: file is writable *} + FIBB_OTR_EXECUTE = 13; {* Other: file is executable *} + FIBB_OTR_DELETE = 12; {* Other: prevent file from being deleted *} + FIBB_GRP_READ = 11; {* Group: file is readable *} + FIBB_GRP_WRITE = 10; {* Group: file is writable *} + FIBB_GRP_EXECUTE = 9; {* Group: file is executable *} + FIBB_GRP_DELETE = 8; {* Group: prevent file from being deleted *} + + FIBB_SCRIPT = 6; { program is a script (execute) file } + FIBB_PURE = 5; { program is reentrant and rexecutable} + FIBB_ARCHIVE = 4; { cleared whenever file is changed } + FIBB_READ = 3; { ignored by old filesystem } + FIBB_WRITE = 2; { ignored by old filesystem } + FIBB_EXECUTE = 1; { ignored by system, used by Shell } + FIBB_DELETE = 0; { prevent file from being deleted } + + FIBF_OTR_READ = (1 shl FIBB_OTR_READ); + FIBF_OTR_WRITE = (1 shl FIBB_OTR_WRITE); + FIBF_OTR_EXECUTE = (1 shl FIBB_OTR_EXECUTE); + FIBF_OTR_DELETE = (1 shl FIBB_OTR_DELETE); + FIBF_GRP_READ = (1 shl FIBB_GRP_READ); + FIBF_GRP_WRITE = (1 shl FIBB_GRP_WRITE); + FIBF_GRP_EXECUTE = (1 shl FIBB_GRP_EXECUTE); + FIBF_GRP_DELETE = (1 shl FIBB_GRP_DELETE); + + FIBF_SCRIPT = 64; + FIBF_PURE = 32; + FIBF_ARCHIVE = 16; + FIBF_READ = 8; + FIBF_WRITE = 4; + FIBF_EXECUTE = 2; + FIBF_DELETE = 1; + +{* Standard maximum length for an error string from fault. However, most *} +{* error strings should be kept under 60 characters if possible. Don't *} +{* forget space for the header you pass in. *} + + FAULT_MAX = 82; + +{* All BCPL data must be long Integer aligned. BCPL pointers are the long Integer + * address (i.e byte address divided by 4 (>>2)) *} + +{* BCPL strings have a length in the first byte and then the characters. + * For example: s[0]=3 s[1]=S s[2]=Y s[3]=S *} + + +type + +{ returned by Info(), must be on a 4 byte boundary } + + PInfoData = ^TInfoData; + TInfoData = record + id_NumSoftErrors : LongInt; { number of soft errors on disk } + id_UnitNumber : LongInt; { Which unit disk is (was) mounted on } + id_DiskState : LongInt; { See defines below } + id_NumBlocks : LongInt; { Number of blocks on disk } + id_NumBlocksUsed : LongInt; { Number of block in use } + id_BytesPerBlock : LongInt; + id_DiskType : LongInt; { Disk type code } + id_VolumeNode : BPTR; { BCPL pointer to volume node } + id_InUse : LongInt; { Flag, zero if not in use } + end; + +{$PACKRECORDS NORMAL} + +const + +{ ID stands for InfoData } + + { Disk states } + + ID_WRITE_PROTECTED = 80; { Disk is write protected } + ID_VALIDATING = 81; { Disk is currently being validated } + ID_VALIDATED = 82; { Disk is consistent and writeable } + +const + ID_NO_DISK_PRESENT = -1; + ID_UNREADABLE_DISK = $42414400; { 'BAD\0' } + ID_DOS_DISK = $444F5300; { 'DOS\0' } + ID_FFS_DISK = $444F5301; { 'DOS\1' } + ID_NOT_REALLY_DOS = $4E444F53; { 'NDOS' } + ID_KICKSTART_DISK = $4B49434B; { 'KICK' } + ID_MSDOS_DISK = $4d534400; { 'MSD\0' } + ID_SFS_BE_DISK = $53465300; { 'SFS\0' } + ID_SFS_LE_DISK = $73667300; { 'sfs\0' } + +{ Errors from IoErr(), etc. } + ERROR_NO_FREE_STORE = 103; + ERROR_TASK_TABLE_FULL = 105; + ERROR_BAD_TEMPLATE = 114; + ERROR_BAD_NUMBER = 115; + ERROR_REQUIRED_ARG_MISSING = 116; + ERROR_KEY_NEEDS_ARG = 117; + ERROR_TOO_MANY_ARGS = 118; + ERROR_UNMATCHED_QUOTES = 119; + ERROR_LINE_TOO_LONG = 120; + ERROR_FILE_NOT_OBJECT = 121; + ERROR_INVALID_RESIDENT_LIBRARY = 122; + ERROR_NO_DEFAULT_DIR = 201; + ERROR_OBJECT_IN_USE = 202; + ERROR_OBJECT_EXISTS = 203; + ERROR_DIR_NOT_FOUND = 204; + ERROR_OBJECT_NOT_FOUND = 205; + ERROR_BAD_STREAM_NAME = 206; + ERROR_OBJECT_TOO_LARGE = 207; + ERROR_ACTION_NOT_KNOWN = 209; + ERROR_INVALID_COMPONENT_NAME = 210; + ERROR_INVALID_LOCK = 211; + ERROR_OBJECT_WRONG_TYPE = 212; + ERROR_DISK_NOT_VALIDATED = 213; + ERROR_DISK_WRITE_PROTECTED = 214; + ERROR_RENAME_ACROSS_DEVICES = 215; + ERROR_DIRECTORY_NOT_EMPTY = 216; + ERROR_TOO_MANY_LEVELS = 217; + ERROR_DEVICE_NOT_MOUNTED = 218; + ERROR_SEEK_ERROR = 219; + ERROR_COMMENT_TOO_BIG = 220; + ERROR_DISK_FULL = 221; + ERROR_DELETE_PROTECTED = 222; + ERROR_WRITE_PROTECTED = 223; + ERROR_READ_PROTECTED = 224; + ERROR_NOT_A_DOS_DISK = 225; + ERROR_NO_DISK = 226; + ERROR_NO_MORE_ENTRIES = 232; +{ added for 1.4 } + ERROR_IS_SOFT_LINK = 233; + ERROR_OBJECT_LINKED = 234; + ERROR_BAD_HUNK = 235; + ERROR_NOT_IMPLEMENTED = 236; + ERROR_RECORD_NOT_LOCKED = 240; + ERROR_LOCK_COLLISION = 241; + ERROR_LOCK_TIMEOUT = 242; + ERROR_UNLOCK_ERROR = 243; + +{ error codes 303-305 are defined in dosasl.h } + +{ These are the return codes used by convention by AmigaDOS commands } +{ See FAILAT and IF for relvance to EXECUTE files } + RETURN_OK = 0; { No problems, success } + RETURN_WARN = 5; { A warning only } + RETURN_ERROR = 10; { Something wrong } + RETURN_FAIL = 20; { Complete or severe failure} + +{ Bit numbers that signal you that a user has issued a break } + SIGBREAKB_CTRL_C = 12; + SIGBREAKB_CTRL_D = 13; + SIGBREAKB_CTRL_E = 14; + SIGBREAKB_CTRL_F = 15; + +{ Bit fields that signal you that a user has issued a break } +{ for example: if (SetSignal(0,0) & SIGBREAKF_CTRL_C) cleanup_and_exit(); } + SIGBREAKF_CTRL_C = 4096; + SIGBREAKF_CTRL_D = 8192; + SIGBREAKF_CTRL_E = 16384; + SIGBREAKF_CTRL_F = 32768; + +{ Values returned by SameLock() } + LOCK_SAME = 0; + LOCK_SAME_HANDLER = 1; { actually same volume } + LOCK_DIFFERENT = -1; + +{ types for ChangeMode() } + CHANGE_LOCK = 0; + CHANGE_FH = 1; + +{ Values for MakeLink() } + LINK_HARD = 0; + LINK_SOFT = 1; { softlinks are not fully supported yet } + +{ values returned by } + ITEM_EQUAL = -2; { "=" Symbol } + ITEM_ERROR = -1; { error } + ITEM_NOTHING = 0; { *N, ;, endstreamch } + ITEM_UNQUOTED = 1; { unquoted item } + ITEM_QUOTED = 2; { quoted item } + +{ types for AllocDosObject/FreeDosObject } + DOS_FILEHANDLE = 0; { few people should use this } + DOS_EXALLCONTROL = 1; { Must be used to allocate this! } + DOS_FIB = 2; { useful } + DOS_STDPKT = 3; { for doing packet-level I/O } + DOS_CLI = 4; { for shell-writers, etc } + DOS_RDARGS = 5; { for ReadArgs if you pass it in } + + +{ + * Data structures and equates used by the V1.4 DOS functions + * StrtoDate() and DatetoStr() + } + +{--------- String/Date structures etc } +type + PDateTime = ^TDateTime; + TDateTime = record + dat_Stamp : TDateStamp; { DOS DateStamp } + dat_Format, { controls appearance of dat_StrDate } + dat_Flags : Byte; { see BITDEF's below } + dat_StrDay, { day of the week string } + dat_StrDate, { date string } + dat_StrTime : STRPTR; { time string } + END; + +{ You need this much room for each of the DateTime strings: } +const + LEN_DATSTRING = 16; + +{ flags for dat_Flags } + + DTB_SUBST = 0; { substitute Today, Tomorrow, etc. } + DTF_SUBST = 1; + DTB_FUTURE = 1; { day of the week is in future } + DTF_FUTURE = 2; + +{ + * date format values + } + + FORMAT_DOS = 0; { dd-mmm-yy } + FORMAT_INT = 1; { yy-mm-dd } + FORMAT_USA = 2; { mm-dd-yy } + FORMAT_CDN = 3; { dd-mm-yy } + FORMAT_MAX = FORMAT_CDN; + FORMAT_DEF = 4; { use default format, as defined + by locale; if locale not + available, use FORMAT_DOS + instead } + +{********************************************************************** +************************ PATTERN MATCHING ****************************** +************************************************************************ + +* structure expected by MatchFirst, MatchNext. +* Allocate this structure and initialize it as follows: +* +* Set ap_BreakBits to the signal bits (CDEF) that you want to take a +* break on, or NULL, if you don't want to convenience the user. +* +* If you want to have the FULL PATH NAME of the files you found, +* allocate a buffer at the END of this structure, and put the size of +* it into ap_Strlen. If you don't want the full path name, make sure +* you set ap_Strlen to zero. In this case, the name of the file, and stats +* are available in the ap_Info, as per usual. +* +* Then call MatchFirst() and then afterwards, MatchNext() with this structure. +* You should check the return value each time (see below) and take the +* appropriate action, ultimately calling MatchEnd() when there are +* no more files and you are done. You can tell when you are done by +* checking for the normal AmigaDOS return code ERROR_NO_MORE_ENTRIES. +* +} + +type + PAChain = ^TAChain; + TAChain = record + an_Child, + an_Parent : PAChain; + an_Lock : BPTR; + an_Info : TFileInfoBlock; + an_Flags : Shortint; + an_String : Array[0..0] of Char; { FIX!! } + END; + + PAnchorPath = ^TAnchorPath; + TAnchorPath = record + case SmallInt of + 0 : ( + ap_First : PAChain; + ap_Last : PAChain; + ); + 1 : ( + ap_Base, { pointer to first anchor } + ap_Current : PAChain; { pointer to last anchor } + ap_BreakBits, { Bits we want to break on } + ap_FoundBreak : LongInt; { Bits we broke on. Also returns ERROR_BREAK } + ap_Flags : Shortint; { New use for extra Integer. } + ap_Reserved : Shortint; + ap_Strlen : SmallInt; { This is what ap_Length used to be } + ap_Info : TFileInfoBlock; + ap_Buf : Array[0..0] of Char; { Buffer for path name, allocated by user !! } + { FIX! } + ); + END; + + +const + APB_DOWILD = 0; { User option ALL } + APF_DOWILD = 1; + + APB_ITSWILD = 1; { Set by MatchFirst, used by MatchNext } + APF_ITSWILD = 2; { Application can test APB_ITSWILD, too } + { (means that there's a wildcard } + { in the pattern after calling } + { MatchFirst). } + + APB_DODIR = 2; { Bit is SET IF a DIR node should be } + APF_DODIR = 4; { entered. Application can RESET this } + { bit after MatchFirst/MatchNext to AVOID } + { entering a dir. } + + APB_DIDDIR = 3; { Bit is SET for an "expired" dir node. } + APF_DIDDIR = 8; + + APB_NOMEMERR = 4; { Set on memory error } + APF_NOMEMERR = 16; + + APB_DODOT = 5; { IF set, allow conversion of '.' to } + APF_DODOT = 32; { CurrentDir } + + APB_DirChanged = 6; { ap_Current->an_Lock changed } + APF_DirChanged = 64; { since last MatchNext call } + + + DDB_PatternBit = 0; + DDF_PatternBit = 1; + DDB_ExaminedBit = 1; + DDF_ExaminedBit = 2; + DDB_Completed = 2; + DDF_Completed = 4; + DDB_AllBit = 3; + DDF_AllBit = 8; + DDB_Single = 4; + DDF_Single = 16; + +{ + * Constants used by wildcard routines, these are the pre-parsed tokens + * referred to by pattern match. It is not necessary for you to do + * anything about these, MatchFirst() MatchNext() handle all these for you. + } + + P_ANY = $80; { Token for '*' or '#? } + P_SINGLE = $81; { Token for '?' } + P_ORSTART = $82; { Token for '(' } + P_ORNEXT = $83; { Token for '|' } + P_OREND = $84; { Token for ')' } + P_NOT = $85; { Token for '~' } + P_NOTEND = $86; { Token for } + P_NOTCLASS = $87; { Token for '^' } + P_CLASS = $88; { Token for '[]' } + P_REPBEG = $89; { Token for '[' } + P_REPEND = $8A; { Token for ']' } + P_STOP = $8B; { token to force end of evaluation } + +{ Values for an_Status, NOTE: These are the actual bit numbers } + + COMPLEX_BIT = 1; { Parsing complex pattern } + EXAMINE_BIT = 2; { Searching directory } + +{ + * Returns from MatchFirst(), MatchNext() + * You can also get dos error returns, such as ERROR_NO_MORE_ENTRIES, + * these are in the dos.h file. + } + + ERROR_BUFFER_OVERFLOW = 303; { User OR internal buffer overflow } + ERROR_BREAK = 304; { A break character was received } + ERROR_NOT_EXECUTABLE = 305; { A file has E bit cleared } + +{ hunk types } + HUNK_UNIT = 999 ; + HUNK_NAME = 1000; + HUNK_CODE = 1001; + HUNK_DATA = 1002; + HUNK_BSS = 1003; + HUNK_RELOC32 = 1004; + HUNK_RELOC16 = 1005; + HUNK_RELOC8 = 1006; + HUNK_EXT = 1007; + HUNK_SYMBOL = 1008; + HUNK_DEBUG = 1009; + HUNK_END = 1010; + HUNK_HEADER = 1011; + + HUNK_OVERLAY = 1013; + HUNK_BREAK = 1014; + + HUNK_DREL32 = 1015; + HUNK_DREL16 = 1016; + HUNK_DREL8 = 1017; + + HUNK_LIB = 1018; + HUNK_INDEX = 1019; + +{ hunk_ext sub-types } + EXT_SYMB = 0 ; { symbol table } + EXT_DEF = 1 ; { relocatable definition } + EXT_ABS = 2 ; { Absolute definition } + EXT_RES = 3 ; { no longer supported } + EXT_REF32 = 129; { 32 bit reference to symbol } + EXT_COMMON = 130; { 32 bit reference to COMMON block } + EXT_REF16 = 131; { 16 bit reference to symbol } + EXT_REF8 = 132; { 8 bit reference to symbol } + EXT_DEXT32 = 133; { 32 bit data releative reference } + EXT_DEXT16 = 134; { 16 bit data releative reference } + EXT_DEXT8 = 135; { 8 bit data releative reference } + + +type + +{ All DOS processes have this structure } +{ Create and Device Proc returns pointer to the MsgPort in this structure } +{ dev_proc = Address(SmallInt(DeviceProc()) - SizeOf(Task)) } + + pProcess = ^tProcess; + tProcess = record + pr_Task : tTask; + pr_MsgPort : tMsgPort; { This is BPTR address from DOS functions } + pr_Pad : SmallInt; { Remaining variables on 4 byte boundaries } + pr_SegList : BPTR; { Array of seg lists used by this process } + pr_StackSize : LongInt; { Size of process stack in bytes } + pr_GlobVec : Pointer; { Global vector for this process (BCPL) } + pr_TaskNum : LongInt; { CLI task number of zero if not a CLI } + pr_StackBase : BPTR; { Ptr to high memory end of process stack } + pr_Result2 : LongInt; { Value of secondary result from last call } + pr_CurrentDir : BPTR; { Lock associated with current directory } + pr_CIS : BPTR; { Current CLI Input Stream } + pr_COS : BPTR; { Current CLI Output Stream } + pr_ConsoleTask : Pointer; { Console handler process for current window} + pr_FileSystemTask : Pointer; { File handler process for current drive } + pr_CLI : BPTR; { pointer to ConsoleLineInterpreter } + pr_ReturnAddr : Pointer; { pointer to previous stack frame } + pr_PktWait : Pointer; { Function to be called when awaiting msg } + pr_WindowPtr : Pointer; { Window for error printing } + { following definitions are new with 2.0 } + pr_HomeDir : BPTR; { Home directory of executing program } + pr_Flags : LongInt; { flags telling dos about process } + pr_ExitCode : Pointer; { code to call on exit of program OR NULL } + pr_ExitData : LongInt; { Passed as an argument to pr_ExitCode. } + pr_Arguments : STRPTR; { Arguments passed to the process at start } + pr_LocalVars : tMinList; { Local environment variables } + pr_ShellPrivate : ULONG; { for the use of the current shell } + pr_CES : BPTR; { Error stream - IF NULL, use pr_COS } + end; + +{ + * Flags for pr_Flags + } +const + PRB_FREESEGLIST = 0 ; + PRF_FREESEGLIST = 1 ; + PRB_FREECURRDIR = 1 ; + PRF_FREECURRDIR = 2 ; + PRB_FREECLI = 2 ; + PRF_FREECLI = 4 ; + PRB_CLOSEINPUT = 3 ; + PRF_CLOSEINPUT = 8 ; + PRB_CLOSEOUTPUT = 4 ; + PRF_CLOSEOUTPUT = 16; + PRB_FREEARGS = 5 ; + PRF_FREEARGS = 32; + + +{ The long SmallInt address (BPTR) of this structure is returned by + * Open() and other routines that return a file. You need only worry + * about this struct to do async io's via PutMsg() instead of + * standard file system calls } + +type + + PFileHandle = ^TFileHandle; + TFileHandle = record + fh_Link : PMessage; { EXEC message } + fh_Port : PMsgPort; { Reply port for the packet } + fh_Type : PMsgPort; { Port to do PutMsg() to + Address is negative if a plain file } + fh_Buf : LongInt; + fh_Pos : LongInt; + fh_End : LongInt; + fh_Func1 : LongInt; + fh_Func2 : LongInt; + fh_Func3 : LongInt; + fh_Arg1 : LongInt; + fh_Arg2 : LongInt; + end; + +{ This is the extension to EXEC Messages used by DOS } + + PDosPacket = ^TDosPacket; + TDosPacket = record + dp_Link : PMessage; { EXEC message } + dp_Port : PMsgPort; { Reply port for the packet } + { Must be filled in each send. } + case SmallInt of + 0 : ( + dp_Action : LongInt; + dp_Status : LongInt; + dp_Status2 : LongInt; + dp_BufAddr : LongInt; + ); + 1 : ( + dp_Type : LongInt; { See ACTION_... below and + * 'R' means Read, 'W' means Write to the + * file system } + dp_Res1 : LongInt; { For file system calls this is the result + * that would have been returned by the + * function, e.g. Write ('W') returns actual + * length written } + dp_Res2 : LongInt; { For file system calls this is what would + * have been returned by IoErr() } + dp_Arg1 : LongInt; + dp_Arg2 : LongInt; + dp_Arg3 : LongInt; + dp_Arg4 : LongInt; + dp_Arg5 : LongInt; + dp_Arg6 : LongInt; + dp_Arg7 : LongInt; + ); + end; + + +{ A Packet does not require the Message to be before it in memory, but + * for convenience it is useful to associate the two. + * Also see the function init_std_pkt for initializing this structure } + + PStandardPacket = ^TStandardPacket; + TStandardPacket = record + sp_Msg : TMessage; + sp_Pkt : TDosPacket; + end; + + +const + +{ Packet types } + ACTION_NIL = 0; + ACTION_GET_BLOCK = 2; { OBSOLETE } + ACTION_SET_MAP = 4; + ACTION_DIE = 5; + ACTION_EVENT = 6; + ACTION_CURRENT_VOLUME = 7; + ACTION_LOCATE_OBJECT = 8; + ACTION_RENAME_DISK = 9; + ACTION_WRITE = $57; { 'W' } + ACTION_READ = $52; { 'R' } + ACTION_FREE_LOCK = 15; + ACTION_DELETE_OBJECT = 16; + ACTION_RENAME_OBJECT = 17; + ACTION_MORE_CACHE = 18; + ACTION_COPY_DIR = 19; + ACTION_WAIT_CHAR = 20; + ACTION_SET_PROTECT = 21; + ACTION_CREATE_DIR = 22; + ACTION_EXAMINE_OBJECT = 23; + ACTION_EXAMINE_NEXT = 24; + ACTION_DISK_INFO = 25; + ACTION_INFO = 26; + ACTION_FLUSH = 27; + ACTION_SET_COMMENT = 28; + ACTION_PARENT = 29; + ACTION_TIMER = 30; + ACTION_INHIBIT = 31; + ACTION_DISK_TYPE = 32; + ACTION_DISK_CHANGE = 33; + ACTION_SET_DATE = 34; + + ACTION_SCREEN_MODE = 994; + + ACTION_READ_RETURN = 1001; + ACTION_WRITE_RETURN = 1002; + ACTION_SEEK = 1008; + ACTION_FINDUPDATE = 1004; + ACTION_FINDINPUT = 1005; + ACTION_FINDOUTPUT = 1006; + ACTION_END = 1007; + ACTION_TRUNCATE = 1022; { fast file system only } + ACTION_WRITE_PROTECT = 1023; { fast file system only } + +{ new 2.0 packets } + ACTION_SAME_LOCK = 40; + ACTION_CHANGE_SIGNAL = 995; + ACTION_FORMAT = 1020; + ACTION_MAKE_LINK = 1021; +{} +{} + ACTION_READ_LINK = 1024; + ACTION_FH_FROM_LOCK = 1026; + ACTION_IS_FILESYSTEM = 1027; + ACTION_CHANGE_MODE = 1028; +{} + ACTION_COPY_DIR_FH = 1030; + ACTION_PARENT_FH = 1031; + ACTION_EXAMINE_ALL = 1033; + ACTION_EXAMINE_FH = 1034; + + ACTION_LOCK_RECORD = 2008; + ACTION_FREE_RECORD = 2009; + + ACTION_ADD_NOTIFY = 4097; + ACTION_REMOVE_NOTIFY = 4098; + + {* Added in V39: *} + ACTION_EXAMINE_ALL_END = 1035; + ACTION_SET_OWNER = 1036; + +{* Tell a file system to serialize the current volume. This is typically + * done by changing the creation date of the disk. This packet does not take + * any arguments. NOTE: be prepared to handle failure of this packet for + * V37 ROM filesystems. + *} + + ACTION_SERIALIZE_DISK = 4200; + +{ + * A structure for holding error messages - stored as array with error == 0 + * for the last entry. + } +type + PErrorString = ^TErrorString; + TErrorString = record + estr_Nums : Pointer; + estr_Strings : Pointer; + END; + + +{ DOS library node structure. + * This is the data at positive offsets from the library node. + * Negative offsets from the node is the jump table to DOS functions + * node = (struct DosLibrary *) OpenLibrary( "dos.library" .. ) } +(* +type + + TDosLibrary = ^TDosLibrary; + TDosLibrary = record + dl_lib : TLibrary; + dl_Root : Pointer; { Pointer to RootNode, described below } + dl_GV : Pointer; { Pointer to BCPL global vector } + dl_A2 : LongInt; { Private register dump of DOS } + dl_A5 : LongInt; + dl_A6 : LongInt; + dl_Errors : PErrorString; { pointer to array of error msgs } + dl_TimeReq : pTimeRequest; { private pointer to timer request } + dl_UtilityBase : PLibrary; { private ptr to utility library } + dl_IntuitionBase : PLibrary; + end; *) + + PRootNode = ^TRootNode; + TRootNode = record + rn_TaskArray : BPTR; { [0] is max number of CLI's + [1] is APTR to process id of CLI 1 + [n] is APTR to process id of CLI n } + rn_ConsoleSegment : BPTR; { SegList for the CLI } + rn_Time : TDateStamp; { Current time } + rn_RestartSeg : LongInt; { SegList for the disk validator process } + rn_Info : BPTR; { Pointer ot the Info structure } + rn_FileHandlerSegment : BPTR; { segment for a file handler } + rn_CliList : tMinList; { new list of all CLI processes } + { the first cpl_Array is also rn_TaskArray } + rn_BootProc : PMsgPort; { private ptr to msgport of boot fs } + rn_ShellSegment : BPTR; { seglist for Shell (for NewShell) } + rn_Flags : LongInt; { dos flags } + end; + +const + RNB_WILDSTAR = 24; + RNF_WILDSTAR = 16777216; + RNB_PRIVATE1 = 1; { private for dos } + RNF_PRIVATE1 = 2; + +type + PDosInfo = ^TDosInfo; + TDosInfo = record + case SmallInt of + 0 : ( + di_ResList : BPTR; + ); + 1 : ( + di_McName : BPTR; { Network name of this machine; currently 0 } + di_DevInfo : BPTR; { Device List } + di_Devices : BPTR; { Currently zero } + di_Handlers : BPTR; { Currently zero } + di_NetHand : Pointer; { Network handler processid; currently zero } + di_DevLock, { do NOT access directly! } + di_EntryLock, { do NOT access directly! } + di_DeleteLock : TSignalSemaphore; { do NOT access directly! } + ); + end; + +{ ONLY to be allocated by DOS! } + + PCliProcList = ^TCliProcList; + TCliProcList = record + cpl_Node : TMinNode; + cpl_First : LongInt; { number of first entry in array } + cpl_Array : Array[0..0] of PMsgPort; + { [0] is max number of CLI's in this entry (n) + * [1] is CPTR to process id of CLI cpl_First + * [n] is CPTR to process id of CLI cpl_First+n-1 + } + END; + +{ structure for the Dos resident list. Do NOT allocate these, use } +{ AddSegment(), and heed the warnings in the autodocs! } + +type + PSegment = ^TSegment; + TSegment = record + seg_Next : BPTR; + seg_UC : LongInt; + seg_Seg : BPTR; + seg_Name : Array[0..3] of Char; { actually the first 4 chars of BSTR name } + END; + +const + CMD_SYSTEM = -1; + CMD_INTERNAL = -2; + CMD_DISABLED = -999; + + +{ DOS Processes started from the CLI via RUN or NEWCLI have this additional + * set to data associated with them } +type + PCommandLineInterface = ^TCommandLineInterface; + TCommandLineInterface = record + cli_Result2 : LongInt; { Value of IoErr from last command } + cli_SetName : BSTR; { Name of current directory } + cli_CommandDir : BPTR; { Lock associated with command directory } + cli_ReturnCode : LongInt; { Return code from last command } + cli_CommandName : BSTR; { Name of current command } + cli_FailLevel : LongInt; { Fail level (set by FAILAT) } + cli_Prompt : BSTR; { Current prompt (set by PROMPT) } + cli_StandardInput : BPTR; { Default (terminal) CLI input } + cli_CurrentInput : BPTR; { Current CLI input } + cli_CommandFile : BSTR; { Name of EXECUTE command file } + cli_Interactive : LongInt; { Boolean; True if prompts required } + cli_Background : LongInt; { Boolean; True if CLI created by RUN } + cli_CurrentOutput : BPTR; { Current CLI output } + cli_DefaultStack : LongInt; { Stack size to be obtained in long words } + cli_StandardOutput : BPTR; { Default (terminal) CLI output } + cli_Module : BPTR; { SegList of currently loaded command } + end; + +{ This structure can take on different values depending on whether it is + * a device, an assigned directory, or a volume. Below is the structure + * reflecting volumes only. Following that is the structure representing + * only devices. + } + +{ structure representing a volume } + + PDeviceList = ^TDeviceList; + TDeviceList = record + dl_Next : BPTR; { bptr to next device list } + dl_Type : LongInt; { see DLT below } + dl_Task : PMsgPort; { ptr to handler task } + dl_Lock : BPTR; { not for volumes } + dl_VolumeDate : TDateStamp; { creation date } + dl_LockList : BPTR; { outstanding locks } + dl_DiskType : LongInt; { 'DOS', etc } + dl_unused : LongInt; + dl_Name : BSTR; { bptr to bcpl name } + end; + +{ device structure (same as the DeviceNode structure in filehandler.h) } + + PDevInfo = ^TDevInfo; + TDevInfo = record + dvi_Next : BPTR; + dvi_Type : LongInt; + dvi_Task : Pointer; + dvi_Lock : BPTR; + dvi_Handler : BSTR; + dvi_StackSize : LongInt; + dvi_Priority : LongInt; + dvi_Startup : LongInt; + dvi_SegList : BPTR; + dvi_GlobVec : BSTR; + dvi_Name : BSTR; + end; + +{ structure used for multi-directory assigns. AllocVec()ed. } + + PAssignList = ^TAssignList; + TAssignList = record + al_Next : PAssignList; + al_Lock : BPTR; + END; + + +{ combined structure for devices, assigned directories, volumes } + + PDosList = ^TDosList; + TDosList = record + dol_Next : BPTR; { bptr to next device on list } + dol_Type : LongInt; { see DLT below } + dol_Task : PMsgPort; { ptr to handler task } + dol_Lock : BPTR; + case SmallInt of + 0 : ( + dol_Handler : record + dol_Handler : BSTR; { file name to load IF seglist is null } + dol_StackSize, { stacksize to use when starting process } + dol_Priority, { task priority when starting process } + dol_Startup : LongInt; { startup msg: FileSysStartupMsg for disks } + dol_SegList, { already loaded code for new task } + dol_GlobVec : BPTR; { BCPL global vector to use when starting + * a process. -1 indicates a C/Assembler + * program. } + end; + ); + 1 : ( + dol_Volume : record + dol_VolumeDate : TDateStamp; { creation date } + dol_LockList : BPTR; { outstanding locks } + dol_DiskType : LongInt; { 'DOS', etc } + END; + ); + 2 : ( + dol_assign : record + dol_AssignName : STRPTR; { name for non-OR-late-binding assign } + dol_List : PAssignList; { for multi-directory assigns (regular) } + END; + dol_Name : BSTR; { bptr to bcpl name } + ); + END; + +const + +{ definitions for dl_Type } + + DLT_DEVICE = 0; + DLT_DIRECTORY = 1; + DLT_VOLUME = 2; + DLT_LATE = 3; { late-binding assign } + DLT_NONBINDING = 4; { non-binding assign } + DLT_PRIVATE = -1; { for internal use only } + +{ structure return by GetDeviceProc() } +type + + PDevProc = ^TDevProc; + TDevProc = record + dvp_Port : PMsgPort; + dvp_Lock : BPTR; + dvp_Flags : LongInt; + dvp_DevNode : PDosList; { DON'T TOUCH OR USE! } + END; + +const +{ definitions for dvp_Flags } + DVPB_UNLOCK = 0; + DVPF_UNLOCK = 1; + DVPB_ASSIGN = 1; + DVPF_ASSIGN = 2; + +{ Flags to be passed to LockDosList(), etc } + LDB_DEVICES = 2; + LDF_DEVICES = 4; + LDB_VOLUMES = 3; + LDF_VOLUMES = 8; + LDB_ASSIGNS = 4; + LDF_ASSIGNS = 16; + LDB_ENTRY = 5; + LDF_ENTRY = 32; + LDB_DELETE = 6; + LDF_DELETE = 64; + +{ you MUST specify one of LDF_READ or LDF_WRITE } + LDB_READ = 0; + LDF_READ = 1; + LDB_WRITE = 1; + LDF_WRITE = 2; + +{ actually all but LDF_ENTRY (which is used for internal locking) } + LDF_ALL = (LDF_DEVICES+LDF_VOLUMES+LDF_ASSIGNS); + +{ error report types for ErrorReport() } + REPORT_STREAM = 0; { a stream } + REPORT_TASK = 1; { a process - unused } + REPORT_LOCK = 2; { a lock } + REPORT_VOLUME = 3; { a volume node } + REPORT_INSERT = 4; { please insert volume } + +{ Special error codes for ErrorReport() } + ABORT_DISK_ERROR = 296; { Read/write error } + ABORT_BUSY = 288; { You MUST replace... } + +{ types for initial packets to shells from run/newcli/execute/system. } +{ For shell-writers only } + RUN_EXECUTE = -1; + RUN_SYSTEM = -2; + RUN_SYSTEM_ASYNCH = -3; + +{ Types for fib_DirEntryType. NOTE that both USERDIR and ROOT are } +{ directories, and that directory/file checks should use <0 and >=0. } +{ This is not necessarily exhaustive! Some handlers may use other } +{ values as needed, though <0 and >=0 should remain as supported as } +{ possible. } + ST_ROOT = 1 ; + ST_USERDIR = 2 ; + ST_SOFTLINK = 3 ; { looks like dir, but may point to a file! } + ST_LINKDIR = 4 ; { hard link to dir } + ST_FILE = -3; { must be negative for FIB! } + ST_LINKFILE = -4; { hard link to file } + ST_PIPEFILE = -5; { for pipes that support ExamineFH } + +type + +{ a lock structure, as returned by Lock() or DupLock() } + + PFileLock = ^TFileLock; + TFileLock = record + fl_Link : BPTR; { bcpl pointer to next lock } + fl_Key : LongInt; { disk block number } + fl_Access : LongInt; { exclusive or shared } + fl_Task : PMsgPort; { handler task's port } + fl_Volume : BPTR; { bptr to a DeviceList } + end; + + +{ NOTE: V37 dos.library, when doing ExAll() emulation, and V37 filesystems } +{ will return an error if passed ED_OWNER. If you get ERROR_BAD_NUMBER, } +{ retry with ED_COMMENT to get everything but owner info. All filesystems } +{ supporting ExAll() must support through ED_COMMENT, and must check type } +{ and return ERROR_BAD_NUMBER if they don't support the type. } + +{ values that can be passed for what data you want from ExAll() } +{ each higher value includes those below it (numerically) } +{ you MUST chose one of these values } +const + ED_NAME = 1; + ED_TYPE = 2; + ED_SIZE = 3; + ED_PROTECTION = 4; + ED_DATE = 5; + ED_COMMENT = 6; + ED_OWNER = 7; +{ + * Structure in which exall results are returned in. Note that only the + * fields asked for will exist! + } +type + PExAllData = ^TExAllData; + TExAllData = record + ed_Next : PExAllData; + ed_Name : STRPTR; + ed_Type, + ed_Size, + ed_Prot, + ed_Days, + ed_Mins, + ed_Ticks : ULONG; + ed_Comment : STRPTR; { strings will be after last used field } + ed_OwnerUID, { new for V39 } + ed_OwnerGID : Word; + END; + +{ + * Control structure passed to ExAll. Unused fields MUST be initialized to + * 0, expecially eac_LastKey. + * + * eac_MatchFunc is a hook (see utility.library documentation for usage) + * It should return true if the entry is to returned, false if it is to be + * ignored. + * + * This structure MUST be allocated by AllocDosObject()! + } + + PExAllControl = ^TExAllControl; + TExAllControl = record + eac_Entries, { number of entries returned in buffer } + eac_LastKey : ULONG; { Don't touch inbetween linked ExAll calls! } + eac_MatchString : STRPTR; { wildcard string for pattern match OR NULL } + eac_MatchFunc : pHook; { optional private wildcard FUNCTION } + END; + + + +{ The disk "environment" is a longword array that describes the + * disk geometry. It is variable sized, with the length at the beginning. + * Here are the constants for a standard geometry. +} + +type + + PDosEnvec = ^TDosEnvec; + TDosEnvec = record + de_TableSize : ULONG; { Size of Environment vector } + de_SizeBlock : ULONG; { in longwords: standard value is 128 } + de_SecOrg : ULONG; { not used; must be 0 } + de_Surfaces : ULONG; { # of heads (surfaces). drive specific } + de_SectorPerBlock : ULONG; { not used; must be 1 } + de_BlocksPerTrack : ULONG; { blocks per track. drive specific } + de_Reserved : ULONG; { DOS reserved blocks at start of partition. } + de_PreAlloc : ULONG; { DOS reserved blocks at end of partition } + de_Interleave : ULONG; { usually 0 } + de_LowCyl : ULONG; { starting cylinder. typically 0 } + de_HighCyl : ULONG; { max cylinder. drive specific } + de_NumBuffers : ULONG; { Initial # DOS of buffers. } + de_BufMemType : ULONG; { type of mem to allocate for buffers } + de_MaxTransfer : ULONG; { Max number of bytes to transfer at a time } + de_Mask : ULONG; { Address Mask to block out certain memory } + de_BootPri : LongInt; { Boot priority for autoboot } + de_DosType : ULONG; { ASCII (HEX) string showing filesystem type; + * 0X444F5300 is old filesystem, + * 0X444F5301 is fast file system } + de_Baud : ULONG; { Baud rate for serial handler } + de_Control : ULONG; { Control SmallInt for handler/filesystem } + de_BootBlocks : ULONG; { Number of blocks containing boot code } + end; + +const + +{ these are the offsets into the array } + + DE_TABLESIZE = 0; { standard value is 11 } + DE_SIZEBLOCK = 1; { in longwords: standard value is 128 } + DE_SECORG = 2; { not used; must be 0 } + DE_NUMHEADS = 3; { # of heads (surfaces). drive specific } + DE_SECSPERBLK = 4; { not used; must be 1 } + DE_BLKSPERTRACK = 5; { blocks per track. drive specific } + DE_RESERVEDBLKS = 6; { unavailable blocks at start. usually 2 } + DE_PREFAC = 7; { not used; must be 0 } + DE_INTERLEAVE = 8; { usually 0 } + DE_LOWCYL = 9; { starting cylinder. typically 0 } + DE_UPPERCYL = 10; { max cylinder. drive specific } + DE_NUMBUFFERS = 11; { starting # of buffers. typically 5 } + DE_MEMBUFTYPE = 12; { type of mem to allocate for buffers. } + DE_BUFMEMTYPE = 12; { same as above, better name + * 1 is public, 3 is chip, 5 is fast } + DE_MAXTRANSFER = 13; { Max number bytes to transfer at a time } + DE_MASK = 14; { Address Mask to block out certain memory } + DE_BOOTPRI = 15; { Boot priority for autoboot } + DE_DOSTYPE = 16; { ASCII (HEX) string showing filesystem type; + * 0X444F5300 is old filesystem, + * 0X444F5301 is fast file system } + DE_BAUD = 17; { Baud rate for serial handler } + DE_CONTROL = 18; { Control SmallInt for handler/filesystem } + DE_BOOTBLOCKS = 19; { Number of blocks containing boot code } + + +{ The file system startup message is linked into a device node's startup +** field. It contains a pointer to the above environment, plus the +** information needed to do an exec OpenDevice(). +} + +type + + PFileSysStartupMsg = ^TFileSysStartupMsg; + TFileSysStartupMsg = record + fssm_Unit : ULONG; { exec unit number for this device } + fssm_Device : BSTR; { null terminated bstring to the device name } + fssm_Environ : BPTR; { ptr to environment table (see above) } + fssm_Flags : ULONG; { flags for OpenDevice() } + end; + + +{ The include file "libraries/dosextens.h" has a DeviceList structure. + * The "device list" can have one of three different things linked onto + * it. Dosextens defines the structure for a volume. DLT_DIRECTORY + * is for an assigned directory. The following structure is for + * a dos "device" (DLT_DEVICE). +} + + PDeviceNode = ^TDeviceNode; + TDeviceNode = record + dn_Next : BPTR; { singly linked list } + dn_Type : ULONG; { always 0 for dos "devices" } + dn_Task : PMsgPort; { standard dos "task" field. If this is + * null when the node is accesses, a task + * will be started up } + dn_Lock : BPTR; { not used for devices -- leave null } + dn_Handler : BSTR; { filename to loadseg (if seglist is null) } + dn_StackSize : ULONG; { stacksize to use when starting task } + dn_Priority : LongInt; { task priority when starting task } + dn_Startup : BPTR; { startup msg: FileSysStartupMsg for disks } + dn_SegList : BPTR; { code to run to start new task (if necessary). + * if null then dn_Handler will be loaded. } + dn_GlobalVec : BPTR; { BCPL global vector to use when starting + * a task. -1 means that dn_SegList is not + * for a bcpl program, so the dos won't + * try and construct one. 0 tell the + * dos that you obey BCPL linkage rules, + * and that it should construct a global + * vector for you. + } + dn_Name : BSTR; { the node name, e.g. '\3','D','F','3' } + end; + +const +{ use of Class and code is discouraged for the time being - we might want to + change things } +{ --- NotifyMessage Class ------------------------------------------------ } + NOTIFY_CLASS = $40000000; + +{ --- NotifyMessage Codes ------------------------------------------------ } + NOTIFY_CODE = $1234; + + +{ Sent to the application if SEND_MESSAGE is specified. } + +type +{ Do not modify or reuse the notifyrequest while active. } +{ note: the first LONG of nr_Data has the length transfered } + + + PNotifyRequest = ^TNotifyRequest; + TNotifyRequest = record + nr_Name : PChar; + nr_FullName : PChar; + nr_UserData : LongWord; + nr_Flags : LongWord; + nr_stuff : record + case SmallInt of + 0 : ( nr_Msg : record + nr_Port : PMsgPort; + end ); + 1 : ( nr_Signal : record + nr_Task : pTask; + nr_SignalNum : Byte; + nr_pad : array[0..2] of Byte; + end ); + end; + nr_Reserved : array[0..3] of LongWord; + nr_MsgCount : LongWord; + nr_Handler : PMsgPort; + end; + + PNotifyMessage = ^TNotifyMessage; + TNotifyMessage = record + nm_ExecMessage : TMessage; + nm_Class : LongWord; + nm_Code : Word; + nm_NReq : PNotifyRequest; { don't modify the request! } + nm_DoNotTouch, { like it says! For use by handlers } + nm_DoNotTouch2 : LongWord; { ditto } + END; + + +const +{ --- NotifyRequest Flags ------------------------------------------------ } + NRF_SEND_MESSAGE = 1 ; + NRF_SEND_SIGNAL = 2 ; + NRF_WAIT_REPLY = 8 ; + NRF_NOTIFY_INITIAL = 16; + +{ do NOT set or remove NRF_MAGIC! Only for use by handlers! } + NRF_MAGIC = $80000000; + +{ bit numbers } + NRB_SEND_MESSAGE = 0; + NRB_SEND_SIGNAL = 1; + NRB_WAIT_REPLY = 3; + NRB_NOTIFY_INITIAL = 4; + + NRB_MAGIC = 31; + +{ Flags reserved for private use by the handler: } + NR_HANDLER_FLAGS = $ffff0000; + +{ ********************************************************************* + * + * The CSource data structure defines the input source for "ReadItem()" + * as well as the ReadArgs call. It is a publicly defined structure + * which may be used by applications which use code that follows the + * conventions defined for access. + * + * When passed to the dos.library functions, the value passed as + * struct *CSource is defined as follows: + * if ( CSource == 0) Use buffered IO "ReadChar()" as data source + * else Use CSource for input character stream + * + * The following two pseudo-code routines define how the CSource structure + * is used: + * + * long CS_ReadChar( struct CSource *CSource ) + * + * if ( CSource == 0 ) return ReadChar(); + * if ( CSource->CurChr >= CSource->Length ) return ENDSTREAMCHAR; + * return CSource->Buffer[ CSource->CurChr++ ]; + * + * + * BOOL CS_UnReadChar( struct CSource *CSource ) + * + * if ( CSource == 0 ) return UnReadChar(); + * if ( CSource->CurChr <= 0 ) return FALSE; + * CSource->CurChr--; + * return TRUE; + * + * + * To initialize a struct CSource, you set CSource->CS_Buffer to + * a string which is used as the data source, and set CS_Length to + * the number of characters in the string. Normally CS_CurChr should + * be initialized to ZERO, or left as it was from prior use as + * a CSource. + * + *********************************************************************} + +type + PCSource = ^TCSource; + TCSource = record + CS_Buffer : STRPTR; + CS_Length, + CS_CurChr : LongInt; + END; + +{ ********************************************************************* + * + * The RDArgs data structure is the input parameter passed to the DOS + * ReadArgs() function call. + * + * The RDA_Source structure is a CSource as defined above; + * if RDA_Source.CS_Buffer is non-null, RDA_Source is used as the input + * character stream to parse, else the input comes from the buffered STDIN + * calls ReadChar/UnReadChar. + * + * RDA_DAList is a private address which is used internally to track + * allocations which are freed by FreeArgs(). This MUST be initialized + * to NULL prior to the first call to ReadArgs(). + * + * The RDA_Buffer and RDA_BufSiz fields allow the application to supply + * a fixed-size buffer in which to store the parsed data. This allows + * the application to pre-allocate a buffer rather than requiring buffer + * space to be allocated. If either RDA_Buffer or RDA_BufSiz is NULL, + * the application has not supplied a buffer. + * + * RDA_ExtHelp is a text string which will be displayed instead of the + * template string, if the user is prompted for input. + * + * RDA_Flags bits control how ReadArgs() works. The flag bits are + * defined below. Defaults are initialized to ZERO. + * + *********************************************************************} + + PRDArgs = ^TRDArgs; + TRDArgs = record + RDA_Source : TCSource; { Select input source } + RDA_DAList : LongInt; { PRIVATE. } + RDA_Buffer : STRPTR; { Optional string parsing space. } + RDA_BufSiz : LongInt; { Size of RDA_Buffer (0..n) } + RDA_ExtHelp : STRPTR; { Optional extended help } + RDA_Flags : LongInt; { Flags for any required control } + END; + +const + RDAB_STDIN = 0; { Use "STDIN" rather than "COMMAND LINE" } + RDAF_STDIN = 1; + RDAB_NOALLOC = 1; { If set, do not allocate extra string space.} + RDAF_NOALLOC = 2; + RDAB_NOPROMPT = 2; { Disable reprompting for string input. } + RDAF_NOPROMPT = 4; + +{ ********************************************************************* + * Maximum number of template keywords which can be in a template passed + * to ReadArgs(). IMPLEMENTOR NOTE - must be a multiple of 4. + *********************************************************************} + MAX_TEMPLATE_ITEMS = 100; + +{ ********************************************************************* + * Maximum number of MULTIARG items returned by ReadArgs(), before + * an ERROR_LINE_TOO_LONG. These two limitations are due to stack + * usage. Applications should allow "a lot" of stack to use ReadArgs(). + *********************************************************************} + MAX_MULTIARGS = 128; + +const +{ Modes for LockRecord/LockRecords() } + REC_EXCLUSIVE = 0; + REC_EXCLUSIVE_IMMED = 1; + REC_SHARED = 2; + REC_SHARED_IMMED = 3; + +{ struct to be passed to LockRecords()/UnLockRecords() } + +type + PRecordLock = ^TRecordLock; + TRecordLock = record + rec_FH : BPTR; { filehandle } + rec_Offset, { offset in file } + rec_Length, { length of file to be locked } + rec_Mode : LongWord; { type of lock } + END; + + +{ the structure in the pr_LocalVars list } +{ Do NOT allocate yourself, use SetVar()!!! This structure may grow in } +{ future releases! The list should be left in alphabetical order, and } +{ may have multiple entries with the same name but different types. } +type + PLocalVar = ^TLocalVar; + TLocalVar = record + lv_Node : tNode; + lv_Flags : Word; + lv_Value : STRPTR; + lv_Len : LongWord; + END; + +{ + * The lv_Flags bits are available to the application. The unused + * lv_Node.ln_Pri bits are reserved for system use. + } + +const +{ bit definitions for lv_Node.ln_Type: } + LV_VAR = 0; { an variable } + LV_ALIAS = 1; { an alias } +{ to be or'ed into type: } + LVB_IGNORE = 7; { ignore this entry on GetVar, etc } + LVF_IGNORE = $80; + +{ definitions of flags passed to GetVar()/SetVar()/DeleteVar() } +{ bit defs to be OR'ed with the type: } +{ item will be treated as a single line of text unless BINARY_VAR is used } + GVB_GLOBAL_ONLY = 8 ; + GVF_GLOBAL_ONLY = $100; + GVB_LOCAL_ONLY = 9 ; + GVF_LOCAL_ONLY = $200; + GVB_BINARY_VAR = 10 ; { treat variable as binary } + GVF_BINARY_VAR = $400; + GVB_DONT_NULL_TERM = 11; { only with GVF_BINARY_VAR } + GVF_DONT_NULL_TERM = $800; + +{ this is only supported in >= V39 dos. V37 dos ignores this. } +{ this causes SetVar to affect ENVARC: as well as ENV:. } + GVB_SAVE_VAR = 12 ; { only with GVF_GLOBAL_VAR } + GVF_SAVE_VAR = $1000 ; + + +const +{ ***************************************************************************} +{ definitions for the System() call } + + SYS_Dummy = (TAG_USER + 32); + SYS_Input = (SYS_Dummy + 1); + { specifies the input filehandle } + SYS_Output = (SYS_Dummy + 2); + { specifies the output filehandle } + SYS_Asynch = (SYS_Dummy + 3); + { run asynch, close input/output on exit(!) } + SYS_UserShell = (SYS_Dummy + 4); + { send to user shell instead of boot shell } + SYS_CustomShell= (SYS_Dummy + 5); + { send to a specific shell (data is name) } +{ SYS_Error, } + + +{ ***************************************************************************} +{ definitions for the CreateNewProc() call } +{ you MUST specify one of NP_Seglist or NP_Entry. All else is optional. } + + NP_Dummy = (TAG_USER + 1000); + NP_Seglist = (NP_Dummy + 1); + { seglist of code to run for the process } + NP_FreeSeglist = (NP_Dummy + 2); + { free seglist on exit - only valid for } + { for NP_Seglist. Default is TRUE. } + NP_Entry = (NP_Dummy + 3); + { entry point to run - mutually exclusive } + { with NP_Seglist! } + NP_Input = (NP_Dummy + 4); + { filehandle - default is Open("NIL:"...) } + NP_Output = (NP_Dummy + 5); + { filehandle - default is Open("NIL:"...) } + NP_CloseInput = (NP_Dummy + 6); + { close input filehandle on exit } + { default TRUE } + NP_CloseOutput = (NP_Dummy + 7); + { close output filehandle on exit } + { default TRUE } + NP_Error = (NP_Dummy + 8); + { filehandle - default is Open("NIL:"...) } + NP_CloseError = (NP_Dummy + 9); + { close error filehandle on exit } + { default TRUE } + NP_CurrentDir = (NP_Dummy + 10); + { lock - default is parent's current dir } + NP_StackSize = (NP_Dummy + 11); + { stacksize for process - default 4000 } + NP_Name = (NP_Dummy + 12); + { name for process - default "New Process"} + NP_Priority = (NP_Dummy + 13); + { priority - default same as parent } + NP_ConsoleTask = (NP_Dummy + 14); + { consoletask - default same as parent } + NP_WindowPtr = (NP_Dummy + 15); + { window ptr - default is same as parent } + NP_HomeDir = (NP_Dummy + 16); + { home directory - default curr home dir } + NP_CopyVars = (NP_Dummy + 17); + { boolean to copy local vars-default TRUE } + NP_Cli = (NP_Dummy + 18); + { create cli structure - default FALSE } + NP_Path = (NP_Dummy + 19); + { path - default is copy of parents path } + { only valid if a cli process! } + NP_CommandName = (NP_Dummy + 20); + { commandname - valid only for CLI } + NP_Arguments = (NP_Dummy + 21); + { cstring of arguments - passed with str } + { in a0, length in d0. (copied and freed } + { on exit. Default is empty string. } + { NOTE: not operational until 2.04 - see } + { BIX/TechNotes for more info/workarounds } + { NOTE: in 2.0, it DIDN'T pass "" - the } + { registers were random. } +{ FIX! should this be only for cli's? } + NP_NotifyOnDeath = (NP_Dummy + 22); + { notify parent on death - default FALSE } + { Not functional yet. } + NP_Synchronous = (NP_Dummy + 23); + { don't return until process finishes - } + { default FALSE. } + { Not functional yet. } + NP_ExitCode = (NP_Dummy + 24); + { code to be called on process exit } + NP_ExitData = (NP_Dummy + 25); + { optional argument for NP_EndCode rtn - } + { default NULL } + + +{ ***************************************************************************} +{ tags for AllocDosObject } + + ADO_Dummy = (TAG_USER + 2000); + ADO_FH_Mode = (ADO_Dummy + 1); + { for type DOS_FILEHANDLE only } + { sets up FH for mode specified. + This can make a big difference for buffered + files. } + { The following are for DOS_CLI } + { If you do not specify these, dos will use it's preferred values } + { which may change from release to release. The BPTRs to these } + { will be set up correctly for you. Everything will be zero, } + { except cli_FailLevel (10) and cli_Background (DOSTRUE). } + { NOTE: you may also use these 4 tags with CreateNewProc. } + + ADO_DirLen = (ADO_Dummy + 2); + { size in bytes for current dir buffer } + ADO_CommNameLen= (ADO_Dummy + 3); + { size in bytes for command name buffer } + ADO_CommFileLen= (ADO_Dummy + 4); + { size in bytes for command file buffer } + ADO_PromptLen = (ADO_Dummy + 5); + { size in bytes for the prompt buffer } + +{ ***************************************************************************} +{ tags for NewLoadSeg } +{ no tags are defined yet for NewLoadSeg } + +procedure AbortPkt(Port : PMsgPort; Pkt : PDosPacket); +function AddBuffers(const Name : PChar; Number : LongInt) : Boolean; +function AddDosEntry(DList : PDosList) : Boolean; +function AddPart(dirname : PChar;const filename : PChar; size : LongWord) : Boolean; +function AddSegment(const Name : PChar; seg : LongInt; system : LongInt) : Boolean; +function AllocDosObject(Type_ : LongWord;const Tags : PTagItem) : Pointer; +//function AllocDosObjectTagList(Type_ : LongWord;const Tags : PTagItem) : Pointer; +function AssignAdd(const Name : PChar; Lock : LongInt) : Boolean; +function AssignLate(const Name : PChar;const Path : PChar) : Boolean; +function AssignLock(const Name : PChar; Lock : LongInt) : Boolean; +function AssignPath(const Name : PChar;const Path : PChar) : Boolean; +function AttemptLockDosList(Flags : LongWord) : PDosList; +function ChangeMode(Type_ : LongInt; fh : LongInt; NewMode : LongInt) : Boolean; +function CheckSignal(Mask : LongInt) : LongInt; +function Cli : PCommandLineInterface; +function CliInitNewcli(dp : PDosPacket) : LongInt; +function CliInitRun(dp : PDosPacket) : LongInt; +function CompareDates(const date1 : PDateStamp;const date2 : PDateStamp) : LongInt; +function CreateDir(const Name : PChar) : LongInt; +function CreateNewProc(const Tags : PTagItem) : pProcess; +//function CreateNewProcTagList(const Tags : PTagItem) : pProcess; +function CreateProc(const Name : PChar; pri : LongInt; segList : LongInt; stackSize : LongInt) : PMsgPort; +function CurrentDir(Lock : LongInt) : LongInt; +procedure DateStamp(date : pDateStamp); +function DateToStr(datetime : PDateTime) : Boolean; +function DeleteFile(const Name : PChar) : Boolean; +function DeleteVar(const Name : PChar; Flags : LongWord) : Boolean; +function DeviceProc(const Name : PChar) : PMsgPort; +function DoPkt(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; arg5 : LongInt) : LongInt; +{ +function DoPkt0(Port : PMsgPort; action : LongInt) : LongInt; +function DoPkt1(Port : PMsgPort; action : LongInt; arg1 : LongInt) : LongInt; +function DoPkt2(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt) : LongInt; +function DoPkt3(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt) : LongInt; +function DoPkt4(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt) : LongInt; +} +procedure DOSClose(file_ : LongInt); +procedure DOSDelay(timeout : LongInt); +procedure DOSExit(returnCode : LongInt); +function DOSFlush(fh : LongInt) : Boolean; +function DOSInput : LongInt; +function DOSOpen(const Name : PChar; accessMode : LongInt) : LongInt; +function DOSOutput : LongInt; +function DOSRead(file_ : LongInt; buffer : Pointer; length : LongInt) : LongInt; +function DOSRename(const oldName : PChar;const newName : PChar) : Boolean; +function DOSSeek(file_ : LongInt; position : LongInt; offset : LongInt) : LongInt; +function DOSWrite(file_ : LongInt; buffer : Pointer; length : LongInt) : LongInt; +function DupLock(Lock : LongInt) : LongInt; +function DupLockFromFH(fh : LongInt) : LongInt; +procedure EndNotify(notify : PNotifyRequest); +function ErrorReport(code : LongInt; Type_ : LongInt; arg1 : LongWord; device : PMsgPort) : Boolean; +function ExAll(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl) : Boolean; +procedure ExAllEnd(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl); +function Examine(Lock : LongInt; fileInfoBlock : PFileInfoBlock) : Boolean; +function ExamineFH(fh : LongInt; fib : PFileInfoBlock) : Boolean; +function Execute(const string_ : PChar; file_ : LongInt; file2 : LongInt) : Boolean; +function ExNext(Lock : LongInt; fileInfoBlock : PFileInfoBlock) : Boolean; +function Fault(code : LongInt; header : PChar; buffer : PChar; len : LongInt) : Boolean; +function FGetC(fh : LongInt) : LongInt; +function FGets(fh : LongInt; buf : PChar; buflen : LongWord) : PChar; +function FilePart(const Path : PChar) : PChar; +function FindArg(const keyword : PChar;const arg_template : PChar) : LongInt; +function FindCliProc(num : LongWord) : pProcess; +function FindDosEntry(const DList : PDosList;const Name : PChar; Flags : LongWord) : PDosList; +function FindSegment(const Name : PChar;const seg : PSegment; system : LongInt) : PSegment; +function FindVar(const Name : PChar; Type_ : LongWord) : PLocalVar; +function dosFormat(const filesystem : PChar;const volumename : PChar; dostype : LongWord) : Boolean; +function FPutC(fh : LongInt; ch : LongInt) : LongInt; +function FPuts(fh : LongInt;const str : PChar) : Boolean; +function FRead(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord) : LongInt; +procedure FreeArgs(args : PRDArgs); +procedure FreeDeviceProc(dp : pDevProc); +procedure FreeDosEntry(DList : PDosList); +procedure FreeDosObject(Type_ : LongWord; ptr : Pointer); +function FWrite(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord) : LongInt; +function GetArgStr : PChar; +function GetConsoleTask : PMsgPort; +function GetCurrentDirName(buf : PChar; len : LongInt) : Boolean; +function GetDeviceProc(const Name : PChar; dp : pDevProc) : pDevProc; +function GetFileSysTask : PMsgPort; +function GetProgramDir : LongInt; +function GetProgramName(buf : PChar; len : LongInt) : Boolean; +function GetPrompt(buf : PChar; len : LongInt) : Boolean; +function GetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt) : LongInt; +function Info(Lock : LongInt; parameterBlock : PInfoData) : Boolean; +function Inhibit(const Name : PChar; onoff : LongInt) : Boolean; +function InternalLoadSeg(fh : LongInt; table : LongInt;const funcarray : pLONGINT; VAR stack : LongInt) : LongInt; +function InternalUnLoadSeg(seglist : LongInt; freefunc : tPROCEDURE) : Boolean; +function IoErr : LongInt; +function IsFileSystem(const Name : PChar) : Boolean; +function IsInteractive(file_ : LongInt) : Boolean; +function LoadSeg(const Name : PChar) : LongInt; +function Lock(const Name : PChar; Type_ : LongInt) : LongInt; +function LockDosList(Flags : LongWord) : PDosList; +function LockRecord(fh : LongInt; offset : LongWord; length : LongWord; mode : LongWord; timeout : LongWord) : Boolean; +function LockRecords(recArray : PRecordLock; timeout : LongWord) : Boolean; +function MakeDosEntry(const Name : PChar; Type_ : LongInt) : PDosList; +function MakeLink(const Name : PChar; dest : LongInt; soft : LongInt) : Boolean; +procedure MatchEnd(anchor : PAnchorPath); +function MatchFirst(const pat : PChar; anchor : PAnchorPath) : LongInt; +function MatchNext(anchor : PAnchorPath) : LongInt; +function MatchPattern(const pat : PChar; str : PChar) : Boolean; +function MatchPatternNoCase(const pat : PChar; str : PChar) : Boolean; +function MaxCli : LongWord; +function NameFromFH(fh : LongInt; buffer : PChar; len : LongInt) : Boolean; +function NameFromLock(Lock : LongInt; buffer : PChar; len : LongInt) : Boolean; +function NewLoadSeg(const file_ : PChar;const Tags : PTagItem) : LongInt; +//function NewLoadSegTagList(const file_ : PChar;const Tags : PTagItem) : LongInt; +function NextDosEntry(const DList : PDosList; Flags : LongWord) : PDosList; +function OpenFromLock(Lock : LongInt) : LongInt; +function ParentDir(Lock : LongInt) : LongInt; +function ParentOfFH(fh : LongInt) : LongInt; +function ParsePattern(const pat : PChar; buf : PChar; buflen : LongInt) : LongInt; +function ParsePatternNoCase(const pat : PChar; buf : PChar; buflen : LongInt) : LongInt; +function PathPart(const Path : PChar) : PChar; +function PrintFault(code : LongInt;const header : PChar) : Boolean; +function PutStr(const str : PChar) : Boolean; +function ReadArgs(const arg_template : PChar; arra : pLONGINT; args : PRDArgs) : PRDArgs; +function ReadItem(const Name : PChar; maxchars : LongInt; cSource : PCSource) : LongInt; +function ReadLink(Port : PMsgPort; Lock : LongInt;const Path : PChar; buffer : PChar; size : LongWord) : Boolean; +function Relabel(const drive : PChar;const newname : PChar) : Boolean; +function RemAssignList(const Name : PChar; Lock : LongInt) : Boolean; +function RemDosEntry(DList : PDosList) : Boolean; +function RemSegment(seg : PSegment) : Boolean; +procedure ReplyPkt(dp : PDosPacket; res1 : LongInt; res2 : LongInt); +function RunCommand(seg : LongInt; stack : LongInt;const paramptr : PChar; paramlen : LongInt) : LongInt; +function SameDevice(lock1 : LongInt; lock2 : LongInt) : Boolean; +function SameLock(lock1 : LongInt; lock2 : LongInt) : LongInt; +function SelectInput(fh : LongInt) : LongInt; +function SelectOutput(fh : LongInt) : LongInt; +procedure SendPkt(dp : PDosPacket; Port : PMsgPort; replyport : PMsgPort); +function SetArgStr(const string_ : PChar) : Boolean; +function SetComment(const Name : PChar;const comment : PChar) : Boolean; +function SetConsoleTask(const task : PMsgPort) : PMsgPort; +function SetCurrentDirName(const Name : PChar) : Boolean; +function SetFileDate(const Name : PChar; date : pDateStamp) : Boolean; +function SetFileSize(fh : LongInt; pos : LongInt; mode : LongInt) : Boolean; +function SetFileSysTask(const task : PMsgPort) : PMsgPort; +function SetIoErr(result : LongInt) : LongInt; +function SetMode(fh : LongInt; mode : LongInt) : Boolean; +function SetOwner(const Name : PChar; owner_info : LongInt) : Boolean; +function SetProgramDir(Lock : LongInt) : LongInt; +function SetProgramName(const Name : PChar) : Boolean; +function SetPrompt(const Name : PChar) : Boolean; +function SetProtection(const Name : PChar; protect : LongInt) : Boolean; +function SetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt) : Boolean; +function SetVBuf(fh : LongInt; buff : PChar; Type_ : LongInt; size : LongInt) : Boolean; +function SplitName(const Name : PChar; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt) : SmallInt; +function StartNotify(notify : PNotifyRequest) : Boolean; +function StrToDate(datetime : PDateTime) : Boolean; +function StrToLong(const string_ : PChar; VAR value : LongInt) : LongInt; +function SystemTagList(const command : PChar;const Tags : PTagItem) : LongInt; +//function DOSSystem(const command : PChar;const Tags : PTagItem) : LongInt; //* Real: SystemTagList ??? +function UnGetC(fh : LongInt; character : LongInt) : LongInt; +procedure UnLoadSeg(seglist : LongInt); +procedure UnLock(Lock : LongInt); +procedure UnLockDosList(Flags : LongWord); +function UnLockRecord(fh : LongInt; offset : LongWord; length : LongWord) : Boolean; +function UnLockRecords(recArray : PRecordLock) : Boolean; +function VFPrintf(fh : LongInt;const format : PChar;const argarray : Pointer) : LongInt; +procedure VFWritef(fh : LongInt;const format : PChar;const argarray : pLONGINT); +function VPrintf(const format : PChar; const argarray : Pointer) : LongInt; +function WaitForChar(file_ : LongInt; timeout : LongInt) : Boolean; +function WaitPkt : PDosPacket; +function WriteChars(const buf : PChar; buflen : LongWord) : LongInt; +{ +function BADDR(bval :BPTR): Pointer; +function MKBADDR(adr: Pointer): BPTR; +} + +{OVERLOADS} + +function AddBuffers(Name : string; Number : LongInt) : Boolean; +function AddPart(dirname : string;const filename : PChar; size : LongWord) : Boolean; +function AddPart(dirname : PChar;filename : string; size : LongWord) : Boolean; +function AddPart(dirname : string;filename : string; size : LongWord) : Boolean; +function AssignAdd(Name : string; Lock : LongInt) : Boolean; +function AssignLate(Name : string;const Path : PChar) : Boolean; +function AssignLate(const Name : PChar;Path : string) : Boolean; +function AssignLate(Name : string;Path : string) : Boolean; +function AssignLock(Name : string; Lock : LongInt) : Boolean; +function AssignPath(Name : string; const Path : PChar) : Boolean; +function AssignPath(const Name : PChar;Path : string) : Boolean; +function AssignPath(Name : string;Path : string) : Boolean; +function CreateDir(Name : string) : LongInt; +function CreateProc(Name : string; pri : LongInt; segList : LongInt; stackSize : LongInt) : PMsgPort; +function DeleteFile(Name : string) : Boolean; +function DeleteVar(Name : string; Flags : LongWord) : Boolean; +function DeviceProc(Name : string) : PMsgPort; +function DOSOpen(Name : string; accessMode : LongInt) : LongInt; +function DOSRename(oldName : string;const newName : PChar) : boolean; +function DOSRename(const oldName : PChar;newName : string) : Boolean; +function DOSRename(oldName : string;newName : string) : Boolean; +function Execute(string_ : string; file_ : LongInt; file2 : LongInt) : Boolean; +function Fault(code : LongInt; header : string; buffer : PChar; len : LongInt) : Boolean; +function FilePart(Path : string) : PChar; +function FindArg(keyword : string;const arg_template : PChar) : LongInt; +function FindArg(const keyword : PChar; arg_template : string) : LongInt; +function FindArg(keyword : string; arg_template : string) : LongInt; +function FindDosEntry(const DList : PDosList; Name : string; Flags : LongWord) : PDosList; +function FindSegment(Name : string;const seg : PSegment; system : LongInt) : PSegment; +function FindVar(Name : string; Type_ : LongWord) : PLocalVar; +function dosFormat(filesystem : string;const volumename : PChar; dostype : LongWord) : Boolean; +function dosFormat(const filesystem : PChar; volumename : string; dostype : LongWord) : Boolean; +function dosFormat(filesystem : string; volumename : string; dostype : LongWord) : Boolean; +function FPuts(fh : LongInt; str : string) : Boolean; +function GetDeviceProc(Name : string; dp : pDevProc) : pDevProc; +function GetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt) : LongInt; +function Inhibit(Name : string; onoff : LongInt) : Boolean; +function IsFileSystem(Name : string) : Boolean; +function LoadSeg(Name : string) : LongInt; +function Lock(Name : string; Type_ : LongInt) : LongInt; +function MakeDosEntry(Name : string; Type_ : LongInt) : PDosList; +function MakeLink(Name : string; dest : LongInt; soft : LongInt) : Boolean; +function MatchFirst(pat : string; anchor : PAnchorPath) : LongInt; +function MatchPattern(pat : string; str : PChar) : Boolean; +function MatchPattern(const pat : PChar; str : string) : Boolean; +function MatchPattern(pat : string; str : string) : Boolean; +function MatchPatternNoCase(pat : string; str : PChar) : Boolean; +function MatchPatternNoCase(const pat : PChar; str : string) : Boolean; +function MatchPatternNoCase(pat : string; str : string) : Boolean; +function NewLoadSeg(file_ : string;const Tags : PTagItem) : LongInt; +//function NewLoadSegTagList(const file_ : string;const Tags : PTagItem) : LongInt; +function PathPart(Path : string) : PChar; +function PrintFault(code : LongInt; header : string) : Boolean; +function PutStr(str : string) : Boolean; +function ReadArgs(arg_template : string; arra : pLONGINT; args : PRDArgs) : PRDArgs; +function ReadItem(Name : string; maxchars : LongInt; cSource : PCSource) : LongInt; +function ReadLink(Port : PMsgPort; Lock : LongInt; Path : string; buffer : PChar; size : LongWord) : Boolean; +function Relabel(drive : string;const newname : PChar) : Boolean; +function Relabel(const drive : PChar; newname : string) : Boolean; +function Relabel(drive : string; newname : string) : Boolean; +function RemAssignList(Name : string; Lock : LongInt) : Boolean; +function RunCommand(seg : LongInt; stack : LongInt; paramptr : string; paramlen : LongInt) : LongInt; +function SetArgStr(string_ : string) : Boolean; +function SetComment(Name : string;const comment : PChar) : Boolean; +function SetComment(const Name : PChar; comment : string) : Boolean; +function SetComment(Name : string; comment : string) : Boolean; +function SetCurrentDirName(Name : string) : Boolean; +function SetFileDate(Name : string; date : pDateStamp) : Boolean; +function SetOwner(Name : string; owner_info : LongInt) : Boolean; +function SetProgramName(Name : string) : Boolean; +function SetPrompt(Name : string) : Boolean; +function SetProtection(Name : string; protect : LongInt) : Boolean; +function SetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt) : Boolean; +function SplitName(Name : string; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt) : SmallInt; +function StrToLong(string_ : string; VAR value : LongInt) : LongInt; +function SystemTagList(command : string;const Tags : PTagItem) : LongInt; +// function DOSSystem(const command : string;const Tags : PTagItem) : LongInt; + + +IMPLEMENTATION + +uses pastoc; + + +procedure AbortPkt(Port : PMsgPort; Pkt : PDosPacket); +type + TLocalCall = procedure(Port : PMsgPort; Pkt : PDosPacket; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,44)); + Call( Port, Pkt, AOS_DOSBase); +End; + + +function AddBuffers(const Name : PChar; Number : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Number : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,122)); + AddBuffers:= Call( Name, Number, AOS_DOSBase); +End; + + +function AddDosEntry(DList : PDosList):Boolean; +type + TLocalCall = function(DList : PDosList; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,113)); + AddDosEntry:= Call( DList, AOS_DOSBase); +End; + + +function AddPart(dirname : PChar; const filename : PChar; size : LongWord):Boolean; +type + TLocalCall = function(dirname : PChar; const filename : PChar; size : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,147)); + AddPart:= Call( dirname, filename, size, AOS_DOSBase); +End; + + +function AddSegment(const Name : PChar; seg : LongInt; system : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; seg : LongInt; system : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,129)); + AddSegment:= Call( Name, seg, system, AOS_DOSBase); +End; + + +function AllocDosObject(Type_ : LongWord; const Tags : PTagItem):Pointer; +type + TLocalCall = function(Type_ : LongWord; const Tags : PTagItem; LibBase: Pointer):Pointer; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,38)); + AllocDosObject:= Call( Type_, Tags, AOS_DOSBase); +End; + +{ +function AllocDosObjectTagList(Type_ : LongWord; const Tags : PTagItem):Pointer; +type + TLocalCall = function(Type_ : LongWord; const Tags : PTagItem; LibBase: Pointer):Pointer; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + AllocDosObjectTagList:= Call( Type_, Tags, AOS_DOSBase); +End; +} + +function AssignAdd(const Name : PChar; Lock : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Lock : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,105)); + AssignAdd:= Call( Name, Lock, AOS_DOSBase); +End; + + +function AssignLate(const Name : PChar; const Path : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; const Path : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,103)); + AssignLate:= Call( Name, Path, AOS_DOSBase); +End; + + +function AssignLock(const Name : PChar; Lock : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Lock : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,102)); + AssignLock:= Call( Name, Lock, AOS_DOSBase); +End; + + +function AssignPath(const Name : PChar; const Path : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; const Path : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,104)); + AssignPath:= Call( Name, Path, AOS_DOSBase); +End; + + +function AttemptLockDosList(Flags : LongWord):PDosList; +type + TLocalCall = function(Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,111)); + AttemptLockDosList:= Call( Flags, AOS_DOSBase); +End; + + +function ChangeMode(Type_ : LongInt; fh : LongInt; NewMode : LongInt):Boolean; +type + TLocalCall = function(Type_ : LongInt; fh : LongInt; NewMode : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,75)); + ChangeMode:= Call( Type_, fh, NewMode, AOS_DOSBase); +End; + + +function CheckSignal(Mask : LongInt):LongInt; +type + TLocalCall = function(Mask : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,132)); + CheckSignal:= Call( Mask, AOS_DOSBase); +End; + + +function Cli():PCommandLineInterface; +type + TLocalCall = function(LibBase: Pointer):PCommandLineInterface; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,82)); + Cli:= Call(AOS_DOSBase); +End; + + +function CliInitNewcli(dp : PDosPacket):LongInt; +type + TLocalCall = function(dp : PDosPacket; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,155)); + CliInitNewcli:= Call( dp, AOS_DOSBase); +End; + + +function CliInitRun(dp : PDosPacket):LongInt; +type + TLocalCall = function(dp : PDosPacket; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,156)); + CliInitRun:= Call( dp, AOS_DOSBase); +End; + + +function CompareDates(const date1 : pDateStamp; const date2 : pDateStamp):LongInt; +type + TLocalCall = function(const date1 : pDateStamp; const date2 : pDateStamp; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,123)); + CompareDates:= Call( date1, date2, AOS_DOSBase); +End; + + +function CreateDir(const Name : PChar):LongInt; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,20)); + CreateDir:= Call( Name, AOS_DOSBase); +End; + + +function CreateNewProc(const Tags : PTagItem):pProcess; +type + TLocalCall = function(const Tags : PTagItem; LibBase: Pointer):pProcess; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,83)); + CreateNewProc:= Call( Tags, AOS_DOSBase); +End; + +{ +function CreateNewProcTagList(const Tags : PTagItem):pProcess; +type + TLocalCall = function(const Tags : PTagItem; LibBase: Pointer):pProcess; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + CreateNewProcTagList:= Call( Tags, AOS_DOSBase); +End; +} + +function CreateProc(const Name : PChar; pri : LongInt; segList : LongInt; stackSize : LongInt):PMsgPort; +type + TLocalCall = function(const Name : PChar; pri : LongInt; segList : LongInt; stackSize : LongInt; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,23)); + CreateProc:= Call( Name, pri, segList, stackSize, AOS_DOSBase); +End; + + +function CurrentDir(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,21)); + CurrentDir:= Call( Lock, AOS_DOSBase); +End; + + +procedure DateStamp(date : pDateStamp); +type + TLocalCall = procedure(date : pDateStamp; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,32)); + Call( date, AOS_DOSBase); +End; + + +function DateToStr(datetime : PDateTime):Boolean; +type + TLocalCall = function(datetime : PDateTime; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,124)); + DateToStr:= Call( datetime, AOS_DOSBase); +End; + + +function DeleteFile(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,12)); + DeleteFile:= Call( Name, AOS_DOSBase); +End; + + +function DeleteVar(const Name : PChar; Flags : LongWord):Boolean; +type + TLocalCall = function(const Name : PChar; Flags : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,152)); + DeleteVar:= Call( Name, Flags, AOS_DOSBase); +End; + + +function DeviceProc(const Name : PChar):PMsgPort; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,29)); + DeviceProc:= Call( Name, AOS_DOSBase); +End; + + +function DoPkt(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; arg5 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; arg5 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,40)); + DoPkt:= Call( Port, action, arg1, arg2, arg3, arg4, arg5, AOS_DOSBase); +End; + +{ +function DoPkt0(Port : PMsgPort; action : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt0:= Call( Port, action, AOS_DOSBase); +End; + + +function DoPkt1(Port : PMsgPort; action : LongInt; arg1 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt1:= Call( Port, action, arg1, AOS_DOSBase); +End; + + +function DoPkt2(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt2:= Call( Port, action, arg1, arg2, AOS_DOSBase); +End; + + +function DoPkt3(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt3:= Call( Port, action, arg1, arg2, arg3, AOS_DOSBase); +End; + + +function DoPkt4(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt):LongInt; +type + TLocalCall = function(Port : PMsgPort; action : LongInt; arg1 : LongInt; arg2 : LongInt; arg3 : LongInt; arg4 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DoPkt4:= Call( Port, action, arg1, arg2, arg3, arg4, AOS_DOSBase); +End; +} + +procedure DOSClose(file_ : LongInt); +type + TLocalCall = procedure(file_ : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,15)); + Call( file_, AOS_DOSBase); +End; + + +procedure DOSDelay(timeout : LongInt); +type + TLocalCall = procedure(timeout : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,33)); + Call( timeout, AOS_DOSBase); +End; + + +procedure DOSExit(returnCode : LongInt); +type + TLocalCall = procedure(returnCode : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,24)); + Call( returnCode, AOS_DOSBase); +End; + + +function DOSFlush(fh : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,60)); + DOSFlush:= Call( fh, AOS_DOSBase); +End; + + +function DOSInput():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,9)); + DOSInput:= Call(AOS_DOSBase); +End; + + +function DOSOpen(const Name : PChar; accessMode : LongInt):LongInt; +type + TLocalCall = function(const Name : PChar; accessMode : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,5)); + DOSOpen:= Call( Name, accessMode, AOS_DOSBase); +End; + + +function DOSOutput():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,10)); + DOSOutput:= Call(AOS_DOSBase); +End; + + +function DOSRead(file_ : LongInt; buffer : Pointer; length : LongInt):LongInt; +type + TLocalCall = function(file_ : LongInt; buffer : Pointer; length : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,7)); + DOSRead:= Call( file_, buffer, length, AOS_DOSBase); +End; + + +function DOSRename(const oldName : PChar; const newName : PChar):Boolean; +type + TLocalCall = function(const oldName : PChar; const newName : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,13)); + DOSRename:= Call( oldName, newName, AOS_DOSBase); +End; + + +function DOSSeek(file_ : LongInt; position : LongInt; offset : LongInt):LongInt; +type + TLocalCall = function(file_ : LongInt; position : LongInt; offset : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,11)); + DOSSeek:= Call( file_, position, offset, AOS_DOSBase); +End; + + +function DOSWrite(file_ : LongInt; buffer : Pointer; length : LongInt):LongInt; +type + TLocalCall = function(file_ : LongInt; buffer : Pointer; length : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,8)); + DOSWrite:= Call( file_, buffer, length, AOS_DOSBase); +End; + + +function DupLock(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,62)); + DupLock:= Call( Lock, AOS_DOSBase); +End; + + +function DupLockFromFH(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,62)); + DupLockFromFH:= Call( fh, AOS_DOSBase); +End; + + +procedure EndNotify(notify : PNotifyRequest); +type + TLocalCall = procedure(notify : PNotifyRequest; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,149)); + Call( notify, AOS_DOSBase); +End; + + +function ErrorReport(code : LongInt; Type_ : LongInt; arg1 : LongWord; device : PMsgPort):Boolean; +type + TLocalCall = function(code : LongInt; Type_ : LongInt; arg1 : LongWord; device : PMsgPort; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,80)); + ErrorReport:= Call( code, Type_, arg1, device, AOS_DOSBase); +End; + + +function ExAll(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl):Boolean; +type + TLocalCall = function(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,72)); + ExAll:= Call( Lock, buffer, size, data, control, AOS_DOSBase); +End; + + +procedure ExAllEnd(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl); +type + TLocalCall = procedure(Lock : LongInt; buffer : pExAllData; size : LongInt; data : LongInt; control : pExAllControl; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,165)); + Call( Lock, buffer, size, data, control, AOS_DOSBase); +End; + + +function Examine(Lock : LongInt; fileInfoBlock : PFileInfoBlock):Boolean; +type + TLocalCall = function(Lock : LongInt; fileInfoBlock : PFileInfoBlock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,65)); + Examine:= Call( Lock, fileInfoBlock, AOS_DOSBase); +End; + + +function ExamineFH(fh : LongInt; fib : PFileInfoBlock):Boolean; +type + TLocalCall = function(fh : LongInt; fib : PFileInfoBlock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,65)); + ExamineFH:= Call( fh, fib, AOS_DOSBase); +End; + + +function Execute(const string_ : PChar; file_ : LongInt; file2 : LongInt):Boolean; +type + TLocalCall = function(const string_ : PChar; file_ : LongInt; file2 : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,37)); + Execute:= Call( string_, file_, file2, AOS_DOSBase); +End; + + +function ExNext(Lock : LongInt; fileInfoBlock : PFileInfoBlock):Boolean; +type + TLocalCall = function(Lock : LongInt; fileInfoBlock : PFileInfoBlock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,18)); + ExNext:= Call( Lock, fileInfoBlock, AOS_DOSBase); +End; + + +function Fault(code : LongInt; header : PChar; buffer : PChar; len : LongInt):Boolean; +type + TLocalCall = function(code : LongInt; header : PChar; buffer : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,78)); + Fault:= Call( code, header, buffer, len, AOS_DOSBase); +End; + + +function FGetC(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,51)); + FGetC:= Call( fh, AOS_DOSBase); +End; + + +function FGets(fh : LongInt; buf : PChar; buflen : LongWord):PChar; +type + TLocalCall = function(fh : LongInt; buf : PChar; buflen : LongWord; LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,56)); + FGets:= Call( fh, buf, buflen, AOS_DOSBase); +End; + + +function FilePart(const Path : PChar):PChar; +type + TLocalCall = function(const Path : PChar; LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,145)); + FilePart:= Call( Path, AOS_DOSBase); +End; + + +function FindArg(const keyword : PChar; const arg_template : PChar):LongInt; +type + TLocalCall = function(const keyword : PChar; const arg_template : PChar; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,134)); + FindArg:= Call( keyword, arg_template, AOS_DOSBase); +End; + + +function FindCliProc(num : LongWord):pProcess; +type + TLocalCall = function(num : LongWord; LibBase: Pointer):pProcess; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,91)); + FindCliProc:= Call( num, AOS_DOSBase); +End; + + +function FindDosEntry(const DList : PDosList; const Name : PChar; Flags : LongWord):PDosList; +type + TLocalCall = function(const DList : PDosList; const Name : PChar; Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,114)); + FindDosEntry:= Call( DList, Name, Flags, AOS_DOSBase); +End; + + +function FindSegment(const Name : PChar; const seg : PSegment; system : LongInt):PSegment; +type + TLocalCall = function(const Name : PChar; const seg : PSegment; system : LongInt; LibBase: Pointer):PSegment; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,130)); + FindSegment:= Call( Name, seg, system, AOS_DOSBase); +End; + + +function FindVar(const Name : PChar; Type_ : LongWord):PLocalVar; +type + TLocalCall = function(const Name : PChar; Type_ : LongWord; LibBase: Pointer):PLocalVar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,153)); + FindVar:= Call( Name, Type_, AOS_DOSBase); +End; + + +function dosFormat(const filesystem : PChar; const volumename : PChar; dostype : LongWord):Boolean; +type + TLocalCall = function(const filesystem : PChar; const volumename : PChar; dostype : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,119)); + dosFormat:= Call( filesystem, volumename, dostype, AOS_DOSBase); +End; + + +function FPutC(fh : LongInt; ch : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; ch : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,52)); + FPutC:= Call( fh, ch, AOS_DOSBase); +End; + + +function FPuts(fh : LongInt; const str : PChar):Boolean; +type + TLocalCall = function(fh : LongInt; const str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,57)); + FPuts:= Call( fh, str, AOS_DOSBase); +End; + + +function FRead(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord):LongInt; +type + TLocalCall = function(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,54)); + FRead:= Call( fh, block, blocklen, Number, AOS_DOSBase); +End; + + +procedure FreeArgs(args : PRDArgs); +type + TLocalCall = procedure(args : PRDArgs; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,143)); + Call( args, AOS_DOSBase); +End; + + +procedure FreeDeviceProc(dp : pDevProc); +type + TLocalCall = procedure(dp : pDevProc; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,108)); + Call( dp, AOS_DOSBase); +End; + + +procedure FreeDosEntry(DList : PDosList); +type + TLocalCall = procedure(DList : PDosList; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,117)); + Call( DList, AOS_DOSBase); +End; + + +procedure FreeDosObject(Type_ : LongWord; ptr : Pointer); +type + TLocalCall = procedure(Type_ : LongWord; ptr : Pointer; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,39)); + Call( Type_, ptr, AOS_DOSBase); +End; + + +function FWrite(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord):LongInt; +type + TLocalCall = function(fh : LongInt; block : Pointer; blocklen : LongWord; Number : LongWord; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,55)); + FWrite:= Call( fh, block, blocklen, Number, AOS_DOSBase); +End; + + +function GetArgStr():PChar; +type + TLocalCall = function(LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,89)); + GetArgStr:= Call(AOS_DOSBase); +End; + + +function GetConsoleTask():PMsgPort; +type + TLocalCall = function(LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,85)); + GetConsoleTask:= Call(AOS_DOSBase); +End; + + +function GetCurrentDirName(buf : PChar; len : LongInt):Boolean; +type + TLocalCall = function(buf : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,94)); + GetCurrentDirName:= Call( buf, len, AOS_DOSBase); +End; + + +function GetDeviceProc(const Name : PChar; dp : pDevProc):pDevProc; +type + TLocalCall = function(const Name : PChar; dp : pDevProc; LibBase: Pointer):pDevProc; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,107)); + GetDeviceProc:= Call( Name, dp, AOS_DOSBase); +End; + + +function GetFileSysTask():PMsgPort; +type + TLocalCall = function(LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,87)); + GetFileSysTask:= Call(AOS_DOSBase); +End; + + +function GetProgramDir():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,100)); + GetProgramDir:= Call(AOS_DOSBase); +End; + + +function GetProgramName(buf : PChar; len : LongInt):Boolean; +type + TLocalCall = function(buf : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,96)); + GetProgramName:= Call( buf, len, AOS_DOSBase); +End; + + +function GetPrompt(buf : PChar; len : LongInt):Boolean; +type + TLocalCall = function(buf : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,98)); + GetPrompt:= Call( buf, len, AOS_DOSBase); +End; + + +function GetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt):LongInt; +type + TLocalCall = function(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,151)); + GetVar:= Call( Name, buffer, size, Flags, AOS_DOSBase); +End; + + +function Info(Lock : LongInt; parameterBlock : PInfoData):Boolean; +type + TLocalCall = function(Lock : LongInt; parameterBlock : PInfoData; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,19)); + Info:= Call( Lock, parameterBlock, AOS_DOSBase); +End; + + +function Inhibit(const Name : PChar; onoff : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; onoff : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,121)); + Inhibit:= Call( Name, onoff, AOS_DOSBase); +End; + + +function InternalLoadSeg(fh : LongInt; table : LongInt; const funcarray : pLONGINT; VAR stack : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; table : LongInt; const funcarray : pLONGINT; VAR stack : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,126)); + InternalLoadSeg:= Call( fh, table, funcarray, stack, AOS_DOSBase); +End; + + +function InternalUnLoadSeg(seglist : LongInt; freefunc : tPROCEDURE):Boolean; +type + TLocalCall = function(seglist : LongInt; freefunc : tPROCEDURE; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,127)); + InternalUnLoadSeg:= Call( seglist, freefunc, AOS_DOSBase); +End; + + +function IoErr():LongInt; +type + TLocalCall = function(LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,22)); + IoErr:= Call(AOS_DOSBase); +End; + + +function IsFileSystem(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,118)); + IsFileSystem:= Call( Name, AOS_DOSBase); +End; + + +function IsInteractive(file_ : LongInt):Boolean; +type + TLocalCall = function(file_ : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,36)); + IsInteractive:= Call( file_, AOS_DOSBase); +End; + + +function LoadSeg(const Name : PChar):LongInt; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,25)); + LoadSeg:= Call( Name, AOS_DOSBase); +End; + + +function Lock(const Name : PChar; Type_ : LongInt):LongInt; +type + TLocalCall = function(const Name : PChar; Type_ : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,14)); + Lock:= Call( Name, Type_, AOS_DOSBase); +End; + + +function LockDosList(Flags : LongWord):PDosList; +type + TLocalCall = function(Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,109)); + LockDosList:= Call( Flags, AOS_DOSBase); +End; + + +function LockRecord(fh : LongInt; offset : LongWord; length : LongWord; mode : LongWord; timeout : LongWord):Boolean; +type + TLocalCall = function(fh : LongInt; offset : LongWord; length : LongWord; mode : LongWord; timeout : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,45)); + LockRecord:= Call( fh, offset, length, mode, timeout, AOS_DOSBase); +End; + + +function LockRecords(recArray : PRecordLock; timeout : LongWord):Boolean; +type + TLocalCall = function(recArray : PRecordLock; timeout : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,46)); + LockRecords:= Call( recArray, timeout, AOS_DOSBase); +End; + + +function MakeDosEntry(const Name : PChar; Type_ : LongInt):PDosList; +type + TLocalCall = function(const Name : PChar; Type_ : LongInt; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,116)); + MakeDosEntry:= Call( Name, Type_, AOS_DOSBase); +End; + + +function MakeLink(const Name : PChar; dest : LongInt; soft : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; dest : LongInt; soft : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,74)); + MakeLink:= Call( Name, dest, soft, AOS_DOSBase); +End; + + +procedure MatchEnd(anchor : PAnchorPath); +type + TLocalCall = procedure(anchor : PAnchorPath; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,139)); + Call( anchor, AOS_DOSBase); +End; + + +function MatchFirst(const pat : PChar; anchor : PAnchorPath):LongInt; +type + TLocalCall = function(const pat : PChar; anchor : PAnchorPath; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,137)); + MatchFirst:= Call( pat, anchor, AOS_DOSBase); +End; + + +function MatchNext(anchor : PAnchorPath):LongInt; +type + TLocalCall = function(anchor : PAnchorPath; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,138)); + MatchNext:= Call( anchor, AOS_DOSBase); +End; + + +function MatchPattern(const pat : PChar; str : PChar):Boolean; +type + TLocalCall = function(const pat : PChar; str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,141)); + MatchPattern:= Call( pat, str, AOS_DOSBase); +End; + + +function MatchPatternNoCase(const pat : PChar; str : PChar):Boolean; +type + TLocalCall = function(const pat : PChar; str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,162)); + MatchPatternNoCase:= Call( pat, str, AOS_DOSBase); +End; + + +function MaxCli():LongWord; +type + TLocalCall = function(LibBase: Pointer):LongWord; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,92)); + MaxCli:= Call(AOS_DOSBase); +End; + + +function NameFromFH(fh : LongInt; buffer : PChar; len : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; buffer : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,68)); + NameFromFH:= Call( fh, buffer, len, AOS_DOSBase); +End; + + +function NameFromLock(Lock : LongInt; buffer : PChar; len : LongInt):Boolean; +type + TLocalCall = function(Lock : LongInt; buffer : PChar; len : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,68)); + NameFromLock:= Call( Lock, buffer, len, AOS_DOSBase); +End; + + +function NewLoadSeg(const file_ : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const file_ : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,128)); + NewLoadSeg:= Call( file_, Tags, AOS_DOSBase); +End; + +{ +function NewLoadSegTagList(const file_ : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const file_ : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + NewLoadSegTagList:= Call( file_, Tags, AOS_DOSBase); +End; +} + +function NextDosEntry(const DList : PDosList; Flags : LongWord):PDosList; +type + TLocalCall = function(const DList : PDosList; Flags : LongWord; LibBase: Pointer):PDosList; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,115)); + NextDosEntry:= Call( DList, Flags, AOS_DOSBase); +End; + + +function OpenFromLock(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,63)); + OpenFromLock:= Call( Lock, AOS_DOSBase); +End; + + +function ParentDir(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,35)); + ParentDir:= Call( Lock, AOS_DOSBase); +End; + + +function ParentOfFH(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,64)); + ParentOfFH:= Call( fh, AOS_DOSBase); +End; + + +function ParsePattern(const pat : PChar; buf : PChar; buflen : LongInt):LongInt; +type + TLocalCall = function(const pat : PChar; buf : PChar; buflen : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,140)); + ParsePattern:= Call( pat, buf, buflen, AOS_DOSBase); +End; + + +function ParsePatternNoCase(const pat : PChar; buf : PChar; buflen : LongInt):LongInt; +type + TLocalCall = function(const pat : PChar; buf : PChar; buflen : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,161)); + ParsePatternNoCase:= Call( pat, buf, buflen, AOS_DOSBase); +End; + + +function PathPart(const Path : PChar):PChar; +type + TLocalCall = function(const Path : PChar; LibBase: Pointer):PChar; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,146)); + PathPart:= Call( Path, AOS_DOSBase); +End; + + +function PrintFault(code : LongInt; const header : PChar):Boolean; +type + TLocalCall = function(code : LongInt; const header : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,79)); + PrintFault:= Call( code, header, AOS_DOSBase); +End; + + +function PutStr(const str : PChar):Boolean; +type + TLocalCall = function(const str : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,158)); + PutStr:= Call( str, AOS_DOSBase); +End; + + +function ReadArgs(const arg_template : PChar; arra : pLONGINT; args : PRDArgs):PRDArgs; +type + TLocalCall = function(const arg_template : PChar; arra : pLONGINT; args : PRDArgs; LibBase: Pointer):PRDArgs; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,133)); + ReadArgs:= Call( arg_template, arra, args, AOS_DOSBase); +End; + + +function ReadItem(const Name : PChar; maxchars : LongInt; cSource : PCSource):LongInt; +type + TLocalCall = function(const Name : PChar; maxchars : LongInt; cSource : PCSource; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,135)); + ReadItem:= Call( Name, maxchars, cSource, AOS_DOSBase); +End; + + +function ReadLink(Port : PMsgPort; Lock : LongInt; const Path : PChar; buffer : PChar; size : LongWord):Boolean; +type + TLocalCall = function(Port : PMsgPort; Lock : LongInt; const Path : PChar; buffer : PChar; size : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,73)); + ReadLink:= Call( Port, Lock, Path, buffer, size, AOS_DOSBase); +End; + + +function Relabel(const drive : PChar; const newname : PChar):Boolean; +type + TLocalCall = function(const drive : PChar; const newname : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,120)); + Relabel:= Call( drive, newname, AOS_DOSBase); +End; + + +function RemAssignList(const Name : PChar; Lock : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; Lock : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,106)); + RemAssignList:= Call( Name, Lock, AOS_DOSBase); +End; + + +function RemDosEntry(DList : PDosList):Boolean; +type + TLocalCall = function(DList : PDosList; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,112)); + RemDosEntry:= Call( DList, AOS_DOSBase); +End; + + +function RemSegment(seg : PSegment):Boolean; +type + TLocalCall = function(seg : PSegment; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,131)); + RemSegment:= Call( seg, AOS_DOSBase); +End; + + +procedure ReplyPkt(dp : PDosPacket; res1 : LongInt; res2 : LongInt); +type + TLocalCall = procedure(dp : PDosPacket; res1 : LongInt; res2 : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,43)); + Call( dp, res1, res2, AOS_DOSBase); +End; + + +function RunCommand(seg : LongInt; stack : LongInt; const paramptr : PChar; paramlen : LongInt):LongInt; +type + TLocalCall = function(seg : LongInt; stack : LongInt; const paramptr : PChar; paramlen : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,84)); + RunCommand:= Call( seg, stack, paramptr, paramlen, AOS_DOSBase); +End; + + +function SameDevice(lock1 : LongInt; lock2 : LongInt):Boolean; +type + TLocalCall = function(lock1 : LongInt; lock2 : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,164)); + SameDevice:= Call( lock1, lock2, AOS_DOSBase); +End; + + +function SameLock(lock1 : LongInt; lock2 : LongInt):LongInt; +type + TLocalCall = function(lock1 : LongInt; lock2 : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,70)); + SameLock:= Call( lock1, lock2, AOS_DOSBase); +End; + + +function SelectInput(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,49)); + SelectInput:= Call( fh, AOS_DOSBase); +End; + + +function SelectOutput(fh : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,50)); + SelectOutput:= Call( fh, AOS_DOSBase); +End; + + +procedure SendPkt(dp : PDosPacket; Port : PMsgPort; replyport : PMsgPort); +type + TLocalCall = procedure(dp : PDosPacket; Port : PMsgPort; replyport : PMsgPort; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,41)); + Call( dp, Port, replyport, AOS_DOSBase); +End; + + +function SetArgStr(const string_ : PChar):Boolean; +type + TLocalCall = function(const string_ : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,90)); + SetArgStr:= Call( string_, AOS_DOSBase); +End; + + +function SetComment(const Name : PChar; const comment : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; const comment : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,30)); + SetComment:= Call( Name, comment, AOS_DOSBase); +End; + + +function SetConsoleTask(const task : PMsgPort):PMsgPort; +type + TLocalCall = function(const task : PMsgPort; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,86)); + SetConsoleTask:= Call( task, AOS_DOSBase); +End; + + +function SetCurrentDirName(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,93)); + SetCurrentDirName:= Call( Name, AOS_DOSBase); +End; + + +function SetFileDate(const Name : PChar; date : pDateStamp):Boolean; +type + TLocalCall = function(const Name : PChar; date : pDateStamp; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,66)); + SetFileDate:= Call( Name, date, AOS_DOSBase); +End; + + +function SetFileSize(fh : LongInt; pos : LongInt; mode : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; pos : LongInt; mode : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,76)); + SetFileSize:= Call( fh, pos, mode, AOS_DOSBase); +End; + + +function SetFileSysTask(const task : PMsgPort):PMsgPort; +type + TLocalCall = function(const task : PMsgPort; LibBase: Pointer):PMsgPort; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,88)); + SetFileSysTask:= Call( task, AOS_DOSBase); +End; + + +function SetIoErr(result : LongInt):LongInt; +type + TLocalCall = function(result : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,77)); + SetIoErr:= Call( result, AOS_DOSBase); +End; + + +function SetMode(fh : LongInt; mode : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; mode : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,71)); + SetMode:= Call( fh, mode, AOS_DOSBase); +End; + + +function SetOwner(const Name : PChar; owner_info : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; owner_info : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,166)); + SetOwner:= Call( Name, owner_info, AOS_DOSBase); +End; + + +function SetProgramDir(Lock : LongInt):LongInt; +type + TLocalCall = function(Lock : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,99)); + SetProgramDir:= Call( Lock, AOS_DOSBase); +End; + + +function SetProgramName(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,95)); + SetProgramName:= Call( Name, AOS_DOSBase); +End; + + +function SetPrompt(const Name : PChar):Boolean; +type + TLocalCall = function(const Name : PChar; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,97)); + SetPrompt:= Call( Name, AOS_DOSBase); +End; + + +function SetProtection(const Name : PChar; protect : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; protect : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,31)); + SetProtection:= Call( Name, protect, AOS_DOSBase); +End; + + +function SetVar(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt):Boolean; +type + TLocalCall = function(const Name : PChar; buffer : PChar; size : LongInt; Flags : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,150)); + SetVar:= Call( Name, buffer, size, Flags, AOS_DOSBase); +End; + + +function SetVBuf(fh : LongInt; buff : PChar; Type_ : LongInt; size : LongInt):Boolean; +type + TLocalCall = function(fh : LongInt; buff : PChar; Type_ : LongInt; size : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,61)); + SetVBuf:= Call( fh, buff, Type_, size, AOS_DOSBase); +End; + + +function SplitName(const Name : PChar; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt):SmallInt; +type + TLocalCall = function(const Name : PChar; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt; LibBase: Pointer):SmallInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,69)); + SplitName:= Call( Name, seperator, buf, oldpos, size, AOS_DOSBase); +End; + + +function StartNotify(notify : PNotifyRequest):Boolean; +type + TLocalCall = function(notify : PNotifyRequest; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,148)); + StartNotify:= Call( notify, AOS_DOSBase); +End; + + +function StrToDate(datetime : PDateTime):Boolean; +type + TLocalCall = function(datetime : PDateTime; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,125)); + StrToDate:= Call( datetime, AOS_DOSBase); +End; + + +function StrToLong(const string_ : PChar; VAR value : LongInt):LongInt; +type + TLocalCall = function(const string_ : PChar; VAR value : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,136)); + StrToLong:= Call( string_, value, AOS_DOSBase); +End; + + +function SystemTagList(const command : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const command : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,101)); + SystemTagList:= Call( command, Tags, AOS_DOSBase); +End; + +{ +function DOSSystem(const command : PChar; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const command : PChar; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DOSSystem:= Call( command, Tags, AOS_DOSBase); +End; +} + +function UnGetC(fh : LongInt; character : LongInt):LongInt; +type + TLocalCall = function(fh : LongInt; character : LongInt; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,53)); + UnGetC:= Call( fh, character, AOS_DOSBase); +End; + + +procedure UnLoadSeg(seglist : LongInt); +type + TLocalCall = procedure(seglist : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,26)); + Call( seglist, AOS_DOSBase); +End; + + +procedure UnLock(Lock : LongInt); +type + TLocalCall = procedure(Lock : LongInt; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,15)); + Call( Lock, AOS_DOSBase); +End; + + +procedure UnLockDosList(Flags : LongWord); +type + TLocalCall = procedure(Flags : LongWord; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,110)); + Call( Flags, AOS_DOSBase); +End; + + +function UnLockRecord(fh : LongInt; offset : LongWord; length : LongWord):Boolean; +type + TLocalCall = function(fh : LongInt; offset : LongWord; length : LongWord; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,47)); + UnLockRecord:= Call( fh, offset, length, AOS_DOSBase); +End; + + +function UnLockRecords(recArray : PRecordLock):Boolean; +type + TLocalCall = function(recArray : PRecordLock; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,48)); + UnLockRecords:= Call( recArray, AOS_DOSBase); +End; + + +function VFPrintf(fh : LongInt; const format : PChar; const argarray : Pointer):LongInt; +type + TLocalCall = function(fh : LongInt; const format : PChar; const argarray : Pointer; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,59)); + VFPrintf:= Call( fh, format, argarray, AOS_DOSBase); +End; + + +procedure VFWritef(fh : LongInt; const format : PChar; const argarray : pLONGINT); +type + TLocalCall = procedure(fh : LongInt; const format : PChar; const argarray : pLONGINT; LibBase: Pointer); cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,58)); + Call( fh, format, argarray, AOS_DOSBase); +End; + + +function VPrintf(const format : PChar; const argarray : Pointer):LongInt; +type + TLocalCall = function(const format : PChar; const argarray : Pointer; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,159)); + VPrintf:= Call( format, argarray, AOS_DOSBase); +End; + + +function WaitForChar(file_ : LongInt; timeout : LongInt):Boolean; +type + TLocalCall = function(file_ : LongInt; timeout : LongInt; LibBase: Pointer):Boolean; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,34)); + WaitForChar:= Call( file_, timeout, AOS_DOSBase); +End; + + +function WaitPkt():PDosPacket; +type + TLocalCall = function(LibBase: Pointer):PDosPacket; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,42)); + WaitPkt:= Call(AOS_DOSBase); +End; + + +function WriteChars(const buf : PChar; buflen : LongWord):LongInt; +type + TLocalCall = function(const buf : PChar; buflen : LongWord; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,157)); + WriteChars:= Call( buf, buflen, AOS_DOSBase); +End; + +{ +function BADDR(bval :BPTR):Pointer; +type + TLocalCall = function(bval :BPTR; LibBase: Pointer):Pointer; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + BADDR:= Call( bval, AOS_DOSBase); +End; + + +function MKBADDR(adr: Pointer):BPTR; +type + TLocalCall = function(adr: Pointer; LibBase: Pointer):BPTR; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + MKBADDR:= Call( adr, AOS_DOSBase); +End; +} + +{OVERLOADS} + +function AddBuffers(Name : string; Number : LongInt):Boolean; +Begin + AddBuffers := AddBuffers( pas2c(Name), Number); +End; + + +function AddPart(dirname : string; const filename : PChar; size : LongWord):Boolean; +Begin + AddPart:= AddPart( pas2c(dirname), filename, size); +End; + + +function AddPart(dirname : PChar; filename : string; size : LongWord):Boolean; +Begin + AddPart:= AddPart( dirname, pas2c(filename), size); +End; + + +function AddPart(dirname : string; filename : string; size : LongWord):Boolean; +Begin + AddPart:= AddPart( pas2c(dirname), pas2c(filename), size); +End; + + +function AssignAdd(Name : string; Lock : LongInt):Boolean; +Begin + AssignAdd:= AssignAdd( pas2c(Name), Lock); +End; + + +function AssignLate(Name : string; const Path : PChar):Boolean; +Begin + AssignLate:= AssignLate( pas2c(Name), Path); +End; + + +function AssignLate(const Name : PChar; Path : string):Boolean; +Begin + AssignLate:= AssignLate( Name, pas2c(Path)); +End; + + +function AssignLate(Name : string; Path : string):Boolean; +Begin + AssignLate:= AssignLate( pas2c(Name), pas2c(Path)); +End; + + +function AssignLock(Name : string; Lock : LongInt):Boolean; +Begin + AssignLock:= AssignLock( pas2c(Name), Lock); +End; + + +function AssignPath(Name : string; const Path : PChar):Boolean; +Begin + AssignPath:= AssignPath( pas2c(Name), Path); +End; + + +function AssignPath(const Name : PChar; Path : string):Boolean; +Begin + AssignPath:= AssignPath( Name, pas2c(Path)); +End; + + +function AssignPath(Name : string; Path : string):Boolean; +Begin + AssignPath:= AssignPath( pas2c(Name), pas2c(Path)); +End; + + +function CreateDir(Name : string):LongInt; +Begin + CreateDir:= CreateDir( pas2c(Name)); +End; + + +function CreateProc(Name : string; pri : LongInt; segList : LongInt; stackSize : LongInt):PMsgPort; +Begin + CreateProc:= CreateProc( pas2c(Name), pri, segList, stackSize); +End; + + +function DeleteFile(Name : string):Boolean; +Begin + DeleteFile:= DeleteFile( pas2c(Name)); +End; + + +function DeleteVar(Name : string; Flags : LongWord):Boolean; +Begin + DeleteVar:= DeleteVar( pas2c(Name), Flags); +End; + + +function DeviceProc(Name : string):PMsgPort; +Begin + DeviceProc:= DeviceProc( pas2c(Name)); +End; + + +function DOSOpen(Name : string; accessMode : LongInt):LongInt; +Begin + DOSOpen:= DOSOpen( pas2c(Name), accessMode); +End; + + +function DOSRename(oldName : string; const newName : PChar):boolean; +Begin + DOSRename:= DOSRename( pas2c(oldName), newName); +End; + + +function DOSRename(const oldName : PChar; newName : string):Boolean; +Begin + DOSRename:= DOSRename( oldName, pas2c(newName)); +End; + + +function DOSRename(oldName : string; newName : string):Boolean; +Begin + DOSRename:= DOSRename( pas2c(oldName), pas2c(newName)); +End; + + +function Execute(string_ : string; file_ : LongInt; file2 : LongInt):Boolean; +Begin + Execute:= Execute( pas2c(string_), file_, file2); +End; + + +function Fault(code : LongInt; header : string; buffer : PChar; len : LongInt):Boolean; +Begin + Fault:= Fault( code, pas2c(header), buffer, len); +End; + + +function FilePart(Path : string):PChar; +Begin + FilePart:= FilePart( pas2c(Path)); +End; + + +function FindArg(keyword : string; const arg_template : PChar):LongInt; +Begin + FindArg:= FindArg( pas2c(keyword), arg_template); +End; + + +function FindArg(const keyword : PChar; arg_template : string):LongInt; +Begin + FindArg:= FindArg( keyword, pas2c(arg_template)); +End; + + +function FindArg(keyword : string; arg_template : string):LongInt; +Begin + FindArg:= FindArg( pas2c(keyword), pas2c(arg_template)); +End; + + +function FindDosEntry(const DList : PDosList; Name : string; Flags : LongWord):PDosList; +Begin + FindDosEntry:= FindDosEntry( DList, pas2c(Name), Flags); +End; + + +function FindSegment(Name : string; const seg : PSegment; system : LongInt):PSegment; +Begin + FindSegment:= FindSegment( pas2c(Name), seg, system); +End; + + +function FindVar(Name : string; Type_ : LongWord):PLocalVar; +Begin + FindVar:= FindVar( pas2c(Name), Type_); +End; + + +function dosFormat(filesystem : string; const volumename : PChar; dostype : LongWord):Boolean; +Begin + dosFormat:= dosFormat( pas2c(filesystem), volumename, dostype); +End; + + +function dosFormat(const filesystem : PChar; volumename : string; dostype : LongWord):Boolean; +Begin + dosFormat:= dosFormat( filesystem, pas2c(volumename), dostype); +End; + + +function dosFormat(filesystem : string; volumename : string; dostype : LongWord):Boolean; +Begin + dosFormat:= dosFormat( pas2c(filesystem), pas2c(volumename), dostype); +End; + + +function FPuts(fh : LongInt; str : string):Boolean; +Begin + FPuts:= FPuts( fh, pas2c(str)); +End; + + +function GetDeviceProc(Name : string; dp : pDevProc):pDevProc; +Begin + GetDeviceProc:= GetDeviceProc( pas2c(Name), dp); +End; + + +function GetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt):LongInt; +Begin + GetVar:= GetVar( pas2c(Name), buffer, size, Flags); +End; + + +function Inhibit(Name : string; onoff : LongInt):Boolean; +Begin + Inhibit:= Inhibit( pas2c(Name), onoff); +End; + + +function IsFileSystem(Name : string):Boolean; +Begin + IsFileSystem:= IsFileSystem( pas2c(Name)); +End; + + +function LoadSeg(Name : string):LongInt; +Begin + LoadSeg:= LoadSeg( pas2c(Name)); +End; + + +function Lock(Name : string; Type_ : LongInt):LongInt; +Begin + Lock:= Lock( pas2c(Name), Type_); +End; + + +function MakeDosEntry(Name : string; Type_ : LongInt):PDosList; +Begin + MakeDosEntry:= MakeDosEntry( pas2c(Name), Type_); +End; + + +function MakeLink(Name : string; dest : LongInt; soft : LongInt):Boolean; +Begin + MakeLink:= MakeLink( pas2c(Name), dest, soft); +End; + + +function MatchFirst(pat : string; anchor : PAnchorPath):LongInt; +Begin + MatchFirst:= MatchFirst( pas2c(pat), anchor); +End; + + +function MatchPattern(pat : string; str : PChar):Boolean; +Begin + MatchPattern:= MatchPattern( pas2c(pat), str); +End; + + +function MatchPattern(const pat : PChar; str : string):Boolean; +Begin + MatchPattern:= MatchPattern( pat, pas2c(str)); +End; + + +function MatchPattern(pat : string; str : string):Boolean; +Begin + MatchPattern:= MatchPattern( pas2c(pat), pas2c(str)); +End; + + +function MatchPatternNoCase(pat : string; str : PChar):Boolean; +Begin + MatchPatternNoCase:= MatchPatternNoCase( pas2c(pat), str); +End; + + +function MatchPatternNoCase(const pat : PChar; str : string):Boolean; +Begin + MatchPatternNoCase:= MatchPatternNoCase( pat, pas2c(str)); +End; + + +function MatchPatternNoCase(pat : string; str : string):Boolean; +Begin + MatchPatternNoCase:= MatchPatternNoCase( pas2c(pat), pas2c(str)); +End; + + +function NewLoadSeg(file_ : string; const Tags : PTagItem):LongInt; +Begin + NewLoadSeg:= NewLoadSeg( pas2c(file_), Tags); +End; + +{ +function NewLoadSegTagList(const file_ : string; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const file_ : string; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + NewLoadSegTagList:= Call( file_, Tags, AOS_DOSBase); +End; +} + +function PathPart(Path : string):PChar; +Begin + PathPart:= PathPart( pas2c(Path)); +End; + + +function PrintFault(code : LongInt; header : string):Boolean; +Begin + PrintFault:= PrintFault( code, pas2c(header)); +End; + + +function PutStr(str : string):Boolean; +Begin + PutStr:= PutStr( pas2c(str)); +End; + + +function ReadArgs(arg_template : string; arra : pLONGINT; args : PRDArgs):PRDArgs; +Begin + ReadArgs:= ReadArgs( pas2c(arg_template), arra, args); +End; + + +function ReadItem(Name : string; maxchars : LongInt; cSource : PCSource):LongInt; +Begin + ReadItem:= ReadItem( pas2c(Name), maxchars, cSource); +End; + + +function ReadLink(Port : PMsgPort; Lock : LongInt; Path : string; buffer : PChar; size : LongWord):Boolean; +Begin + ReadLink:= ReadLink( Port, Lock, pas2c(Path), buffer, size); +End; + + +function Relabel(drive : string; const newname : PChar):Boolean; +Begin + Relabel:= Relabel( pas2c(drive), newname); +End; + + +function Relabel(const drive : PChar; newname : string):Boolean; +Begin + Relabel:= Relabel( drive, pas2c(newname)); +End; + + +function Relabel(drive : string; newname : string):Boolean; +Begin + Relabel:= Relabel( pas2c(drive), pas2c(newname)); +End; + + +function RemAssignList(Name : string; Lock : LongInt):Boolean; +Begin + RemAssignList:= RemAssignList( pas2c(Name), Lock); +End; + + +function RunCommand(seg : LongInt; stack : LongInt; paramptr : string; paramlen : LongInt):LongInt; +Begin + RunCommand:= RunCommand( seg, stack, pas2c(paramptr), paramlen); +End; + + +function SetArgStr(string_ : string):Boolean; +Begin + SetArgStr:= SetArgStr( pas2c(string_)); +End; + + +function SetComment(Name : string; const comment : PChar):Boolean; +Begin + SetComment:= SetComment( pas2c(Name), comment); +End; + + +function SetComment(const Name : PChar; comment : string):Boolean; +Begin + SetComment:= SetComment( Name, pas2c(comment)); +End; + + +function SetComment(Name : string; comment : string):Boolean; +Begin + SetComment:= SetComment( pas2c(Name), pas2c(comment)); +End; + + +function SetCurrentDirName(Name : string):Boolean; +Begin + SetCurrentDirName:= SetCurrentDirName( pas2c(Name)); +End; + + +function SetFileDate(Name : string; date : pDateStamp):Boolean; +Begin + SetFileDate:= SetFileDate( pas2c(Name), date); +End; + + +function SetOwner(Name : string; owner_info : LongInt):Boolean; +Begin + SetOwner:= SetOwner( pas2c(Name), owner_info); +End; + + +function SetProgramName(Name : string):Boolean; +Begin + SetProgramName:= SetProgramName( pas2c(Name)); +End; + + +function SetPrompt(Name : string):Boolean; +Begin + SetPrompt:= SetPrompt( pas2c(Name)); +End; + + +function SetProtection(Name : string; protect : LongInt):Boolean; +Begin + SetProtection:= SetProtection( pas2c(Name), protect); +End; + + +function SetVar(Name : string; buffer : PChar; size : LongInt; Flags : LongInt):Boolean; +Begin + SetVar:= SetVar( pas2c(Name), buffer, size, Flags); +End; + + +function SplitName(Name : string; seperator : LongWord; buf : PChar; oldpos : LongInt; size : LongInt):SmallInt; +Begin + SplitName:= SplitName( pas2c(Name), seperator, buf, oldpos, size); +End; + + +function StrToLong(string_ : string; VAR value : LongInt):LongInt; +Begin + StrToLong:= StrToLong( pas2c(string_), value); +End; + + +function SystemTagList(command : string; const Tags : PTagItem):LongInt; +Begin + SystemTagList:= SystemTagList( pas2c(command), Tags); +End; + +{ +function DOSSystem(const command : string; const Tags : PTagItem):LongInt; +type + TLocalCall = function(const command : string; const Tags : PTagItem; LibBase: Pointer):LongInt; cdecl; +Var + Call: TLocalCall; +Begin + Call:=TLocalCall(GetLibAdress(AOS_DOSBase,???)); + DOSSystem:= Call( command, Tags, AOS_DOSBase); +End; +} + +END. (* UNIT DOS *) + + diff --git a/rtl/aros/dos.pp b/rtl/aros/dos.pp index 5a9d96142d..e512a5e83e 100644 --- a/rtl/aros/dos.pp +++ b/rtl/aros/dos.pp @@ -919,24 +919,73 @@ begin GetPathString := Temp; end; -function EnvCount: Longint; -{ HOW TO GET THIS VALUE: } -{ Each time this function is called, we look at the } -{ local variables in the Process structure (2.0+) } -{ And we also read all files in the ENV: directory } +var + EnvList: array of record + Name: string; + Value: string; + end; + +procedure InitEnvironmentStrings; +Const + BUFFER_SIZE = 254; +Var + ThisProcess: PProcess; + LocalVars_List: PMinList; // Local Var structure in struct process (pr_LocalVarsis is actually a minlist + LocalVar_Node: PLocalVar; + Buffer: array[0..BUFFER_SIZE] of Char; // Buffer to hold a value for GetVar() + TempLen: LongInt; // hold returnlength of GetVar() +begin + SetLength(EnvList, 0); + ThisProcess := PProcess(FindTask(nil)); //Get the pointer to our process + LocalVars_List := @(ThisProcess^.pr_LocalVars); //get the list of pr_LocalVars as pointer + LocalVar_Node := pLocalVar(LocalVars_List^.mlh_head); //get the headnode of the LocalVars list + + // loop through the localvar list + while ( Pointer(LocalVar_Node^.lv_node.ln_Succ) <> Pointer(LocalVars_List^.mlh_Tail)) do + begin + // make sure the active node is valid instead of empty + If not(LocalVar_Node <> nil) then + break; + + { - process the current node - } + If (LocalVar_Node^.lv_node.ln_Type = LV_Var) then + begin + FillChar(Buffer[0], Length(Buffer), #0); // clear Buffer + + // get active node's name environment variable value ino buffer and make sure it's local + TempLen := GetVar(LocalVar_Node^.lv_Node.ln_Name, @Buffer[0], BUFFER_SIZE, GVF_LOCAL_ONLY); + If TempLen <> -1 then + begin + SetLength(EnvList, Length(EnvList) + 1); + EnvList[High(EnvList)].Name := LocalVar_Node^.lv_Node.ln_Name; + EnvList[High(EnvList)].Value := string(PChar(@Buffer[0])); + end; + end; + LocalVar_Node := pLocalVar(LocalVar_Node^.lv_node.ln_Succ); //we need to get the next node + end; +end; + +function EnvCount: LongInt; begin - EnvCount := 0; + InitEnvironmentStrings; + EnvCount := Length(EnvList); end; -function EnvStr(Index: LongInt): String; +function EnvStr(Index: LongInt): string; begin - EnvStr:=''; + Result := ''; + if Length(EnvList) = 0 then + InitEnvironmentStrings; + if (Index >= 0) and (Index <= High(EnvList)) then + begin + Result := EnvList[Index].Name + '=' + EnvList[Index].Value; + end; end; -function GetEnv(envvar : String): String; +function GetEnv(EnvVar : string): string; var BufArr : array[0..255] of char; StrBuffer: array of char; diff --git a/rtl/aros/exec.pas b/rtl/aros/exec.pas new file mode 100644 index 0000000000..2601438126 --- /dev/null +++ b/rtl/aros/exec.pas @@ -0,0 +1,2699 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2000 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +{ + History: + Added overlay functions for Pchar->Strings, functions + and procedures. Now you can mix PChar and Strings e.g + OpenLibrary('whatis.library',37). No need to cast to + a PChar. + 12 Oct 1998. + + More missing functions added. + Added BitMask, + IsListEmpty and + IsMsgPortEmpty. + 22 Aug 2000. + + Bug found in + AllocSignal, + OpenDevice, + SetTaskPri, + WaitIO + and DoIO. + The stubs for this functions push a long for result, + the result was defined as a shortint. If you tried + to use any of those functions you get a big crash. + Just changed the result to a longint. + 06 Sep 2000. + + 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. + + Changed integer > smallint. + Retyped ULONG to longword + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se +} + + +UNIT EXEC; + + +INTERFACE + +{ + History: + + Added BOOL = smallint, some libraries need that define + (read triton, wizard) + 25 Oct 1998 + + Added UWORD, WORDBITS, LONGBITS, PLONGBITS, + UBYTE, PULONG, PAPTR, PLONG. + For use with MUI. + 17 Jul 2000. + + nils.sjoholm@mailbox.swipnet.se +} + +TYPE + + STRPTR = PChar; + ULONG = Longword; + LONG = longint; + APTR = Pointer; + BPTR = Longint; + BSTR = Longint; + BOOL = smallint; + UWORD = Word; + WORDBITS = Word; + LONGBITS = longword; + PLONGBITS = ^LONGBITS; + UBYTE = Byte; + PULONG = ^longword; + PAPTR = ^APTR; + PLONG = ^LONG; + psmallint = ^smallint; + +const + {There is a problem with boolean + vaules in taglists, just use this + for now instead} + ltrue : longint = 1; + lfalse : longint = 0; + +TYPE + +{ * List Node Structure. Each member in a list starts with a Node * } + + pNode = ^tNode; + tNode = Record + ln_Succ, { * Pointer to next (successor) * } + ln_Pred : pNode; { * Pointer to previous (predecessor) * } + ln_Name : STRPTR; { * ID string, null terminated * } + ln_Type : Byte; + ln_Pri : Shortint; { * Priority, for sorting * } + End; { * Note: smallint aligned * } + +(* BinCompat Mode? + tNode = Record + ln_Succ, { * Pointer to next (successor) * } + ln_Pred : pNode; { * Pointer to previous (predecessor) * } + ln_Type : Byte; + ln_Pri : Shortint; { * Priority, for sorting * } + ln_Name : STRPTR; { * ID string, null terminated * } + End; { * Note: smallint aligned * } +*) + +{ * minimal node -- no type checking possible * } + + pMinNode = ^tMinNode; + tMinNode = Record + mln_Succ, + mln_Pred : pMinNode; + End; + + + +{ * +** Note: Newly initialized IORequests, and software interrupt structures +** used with Cause(), should have type NT_UNKNOWN. The OS will assign a type +** when they are first used. +* } + +{ *----- Node Types for LN_TYPE -----* } + +Const + + NT_UNKNOWN = 0; + NT_TASK = 1; { * Exec task * } + NT_INTERRUPT = 2; + NT_DEVICE = 3; + NT_MSGPORT = 4; + NT_MESSAGE = 5; { * Indicates message currently pending * } + NT_FREEMSG = 6; + NT_REPLYMSG = 7; { * Message has been replied * } + NT_RESOURCE = 8; + NT_LIBRARY = 9; + NT_MEMORY = 10; + NT_SOFTINT = 11; { * Internal flag used by SoftInits * } + NT_FONT = 12; + NT_PROCESS = 13; { * AmigaDOS Process * } + NT_SEMAPHORE = 14; + NT_SIGNALSEM = 15; { * signal semaphores * } + NT_BOOTNODE = 16; + NT_KICKMEM = 17; + NT_GRAPHICS = 18; + NT_DEATHMESSAGE = 19; + + NT_USER = 254; { * User node types work down from here * } + NT_EXTENDED = 255; + +{ + This file defines Exec system lists, which are used to link + various things. Exec provides several routines to handle list + processing (defined at the bottom of this file), so you can + use these routines to save yourself the trouble of writing a list + package. +} + + +Type + +{ normal, full featured list } + + pList = ^tList; + tList = record + lh_Head : pNode; + lh_Tail : pNode; + lh_TailPred : pNode; + lh_Type : Byte; + l_pad : Byte; + end; + +{ minimum list -- no type checking possible } + + pMinList = ^tMinList; + tMinList = record + mlh_Head : pMinNode; + mlh_Tail : pMinNode; + mlh_TailPred : pMinNode; + end; + + + +{ ******************************************************************** +* +* Format of the alert error number: +* +* +-+-------------+----------------+--------------------------------+ +* |D| SubSysId | General Error | SubSystem Specific Error | +* +-+-------------+----------------+--------------------------------+ +* 1 7 bits 8 bits 16 bits +* +* D: DeadEnd alert +* SubSysId: indicates ROM subsystem number. +* General Error: roughly indicates what the error was +* Specific Error: indicates more detail +*********************************************************************} + +const +{********************************************************************* +* +* Hardware/CPU specific alerts: They may show without the 8 at the +* front of the number. These are CPU/68000 specific. See 68$0 +* programmer's manuals for more details. +* +*********************************************************************} + ACPU_BusErr = $80000002; { Hardware bus fault/access error } + ACPU_AddressErr = $80000003; { Illegal address access (ie: odd) } + ACPU_InstErr = $80000004; { Illegal instruction } + ACPU_DivZero = $80000005; { Divide by zero } + ACPU_CHK = $80000006; { Check instruction error } + ACPU_TRAPV = $80000007; { TrapV instruction error } + ACPU_PrivErr = $80000008; { Privilege violation error } + ACPU_Trace = $80000009; { Trace error } + ACPU_LineA = $8000000A; { Line 1010 Emulator error } + ACPU_LineF = $8000000B; { Line 1111 Emulator error } + ACPU_Format = $8000000E; { Stack frame format error } + ACPU_Spurious = $80000018; { Spurious interrupt error } + ACPU_AutoVec1 = $80000019; { AutoVector Level 1 interrupt error } + ACPU_AutoVec2 = $8000001A; { AutoVector Level 2 interrupt error } + ACPU_AutoVec3 = $8000001B; { AutoVector Level 3 interrupt error } + ACPU_AutoVec4 = $8000001C; { AutoVector Level 4 interrupt error } + ACPU_AutoVec5 = $8000001D; { AutoVector Level 5 interrupt error } + ACPU_AutoVec6 = $8000001E; { AutoVector Level 6 interrupt error } + ACPU_AutoVec7 = $8000001F; { AutoVector Level 7 interrupt error } + + +{ ******************************************************************** +* +* General Alerts +* +* For example: timer.device cannot open math.library would be $05038015 +* +* Alert(AN_TimerDev|AG_OpenLib|AO_MathLib); +* +********************************************************************} + + +CONST + +{ ------ alert types } + AT_DeadEnd = $80000000; + AT_Recovery = $00000000; + + +{ ------ general purpose alert codes } + AG_NoMemory = $00010000; + AG_MakeLib = $00020000; + AG_OpenLib = $00030000; + AG_OpenDev = $00040000; + AG_OpenRes = $00050000; + AG_IOError = $00060000; + AG_NoSignal = $00070000; + AG_BadParm = $00080000; + AG_CloseLib = $00090000; { usually too many closes } + AG_CloseDev = $000A0000; { or a mismatched close } + AG_ProcCreate = $000B0000; { Process creation failed } + + +{ ------ alert objects: } + AO_ExecLib = $00008001; + AO_GraphicsLib = $00008002; + AO_LayersLib = $00008003; + AO_Intuition = $00008004; + AO_MathLib = $00008005; + AO_DOSLib = $00008007; + AO_RAMLib = $00008008; + AO_IconLib = $00008009; + AO_ExpansionLib = $0000800A; + AO_DiskfontLib = $0000800B; + AO_UtilityLib = $0000800C; + AO_KeyMapLib = $0000800D; + + AO_AudioDev = $00008010; + AO_ConsoleDev = $00008011; + AO_GamePortDev = $00008012; + AO_KeyboardDev = $00008013; + AO_TrackDiskDev = $00008014; + AO_TimerDev = $00008015; + + AO_CIARsrc = $00008020; + AO_DiskRsrc = $00008021; + AO_MiscRsrc = $00008022; + + AO_BootStrap = $00008030; + AO_Workbench = $00008031; + AO_DiskCopy = $00008032; + AO_GadTools = $00008033; + AO_Unknown = $00008035; + + + +{ ******************************************************************** +* +* Specific Alerts: +* +********************************************************************} + +{ ------ exec.library } + + AN_ExecLib = $01000000; + AN_ExcptVect = $01000001; { 68000 exception vector checksum (obs.) } + AN_BaseChkSum = $01000002; { Execbase checksum (obs.) } + AN_LibChkSum = $01000003; { Library checksum failure } + + AN_MemCorrupt = $81000005; { Corrupt memory list detected in FreeMem } + AN_IntrMem = $81000006; { No memory for interrupt servers } + AN_InitAPtr = $01000007; { InitStruct() of an APTR source (obs.) } + AN_SemCorrupt = $01000008; { A semaphore is in an illegal state + at ReleaseSempahore() } + AN_FreeTwice = $01000009; { Freeing memory already freed } + AN_BogusExcpt = $8100000A; { illegal 68k exception taken (obs.) } + AN_IOUsedTwice = $0100000B; { Attempt to reuse active IORequest } + AN_MemoryInsane = $0100000C; { Sanity check on memory list failed + during AvailMem(MEMF_LARGEST) } + AN_IOAfterClose = $0100000D; { IO attempted on closed IORequest } + AN_StackProbe = $0100000E; { Stack appears to extend out of range } + AN_BadFreeAddr = $0100000F; { Memory header not located. [ Usually an + invalid address passed to FreeMem() ] } + AN_BadSemaphore = $01000010; { An attempt was made to use the old + message semaphores. } + +{ ------ graphics.library } + + AN_GraphicsLib = $02000000; + AN_GfxNoMem = $82010000; { graphics out of memory } + AN_GfxNoMemMspc = $82010001; { MonitorSpec alloc, no memory } + AN_LongFrame = $82010006; { long frame, no memory } + AN_ShortFrame = $82010007; { short frame, no memory } + AN_TextTmpRas = $02010009; { text, no memory for TmpRas } + AN_BltBitMap = $8201000A; { BltBitMap, no memory } + AN_RegionMemory = $8201000B; { regions, memory not available } + AN_MakeVPort = $82010030; { MakeVPort, no memory } + AN_GfxNewError = $0200000C; + AN_GfxFreeError = $0200000D; + + AN_GfxNoLCM = $82011234; { emergency memory not available } + + AN_ObsoleteFont = $02000401; { unsupported font description used } + +{ ------ layers.library } + + AN_LayersLib = $03000000; + AN_LayersNoMem = $83010000; { layers out of memory } + +{ ------ intuition.library } + AN_Intuition = $04000000; + AN_GadgetType = $84000001; { unknown gadget type } + AN_BadGadget = $04000001; { Recovery form of AN_GadgetType } + AN_CreatePort = $84010002; { create port, no memory } + AN_ItemAlloc = $04010003; { item plane alloc, no memory } + AN_SubAlloc = $04010004; { sub alloc, no memory } + AN_PlaneAlloc = $84010005; { plane alloc, no memory } + AN_ItemBoxTop = $84000006; { item box top < RelZero } + AN_OpenScreen = $84010007; { open screen, no memory } + AN_OpenScrnRast = $84010008; { open screen, raster alloc, no memory } + AN_SysScrnType = $84000009; { open sys screen, unknown type } + AN_AddSWGadget = $8401000A; { add SW gadgets, no memory } + AN_OpenWindow = $8401000B; { open window, no memory } + AN_BadState = $8400000C; { Bad State Return entering Intuition } + AN_BadMessage = $8400000D; { Bad Message received by IDCMP } + AN_WeirdEcho = $8400000E; { Weird echo causing incomprehension } + AN_NoConsole = $8400000F; { couldn't open the Console Device } + AN_NoISem = $04000010; { Intuition skipped obtaining a sem } + AN_ISemOrder = $04000011; { Intuition obtained a sem in bad order } + +{ ------ math.library } + + AN_MathLib = $05000000; + +{ ------ dos.library } + + AN_DOSLib = $07000000; + AN_StartMem = $07010001; { no memory at startup } + AN_EndTask = $07000002; { EndTask didn't } + AN_QPktFail = $07000003; { Qpkt failure } + AN_AsyncPkt = $07000004; { Unexpected packet received } + AN_FreeVec = $07000005; { Freevec failed } + AN_DiskBlkSeq = $07000006; { Disk block sequence error } + AN_BitMap = $07000007; { Bitmap corrupt } + AN_KeyFree = $07000008; { Key already free } + AN_BadChkSum = $07000009; { Invalid checksum } + AN_DiskError = $0700000A; { Disk Error } + AN_KeyRange = $0700000B; { Key out of range } + AN_BadOverlay = $0700000C; { Bad overlay } + AN_BadInitFunc = $0700000D; { Invalid init packet for cli/shell } + AN_FileReclosed = $0700000E; { A filehandle was closed more than once } + +{ ------ ramlib.library } + + AN_RAMLib = $08000000; + AN_BadSegList = $08000001; { no overlays in library seglists } + +{ ------ icon.library } + + AN_IconLib = $09000000; + +{ ------ expansion.library } + + AN_ExpansionLib = $0A000000; + AN_BadExpansionFree = $0A000001; { freeed free region } + +{ ------ diskfont.library } + + AN_DiskfontLib = $0B000000; + +{ ------ audio.device } + + AN_AudioDev = $10000000; + +{ ------ console.device } + + AN_ConsoleDev = $11000000; + AN_NoWindow = $11000001; { Console can't open initial window } + +{ ------ gameport.device } + + AN_GamePortDev = $12000000; + +{ ------ keyboard.device } + + AN_KeyboardDev = $13000000; + +{ ------ trackdisk.device } + + AN_TrackDiskDev = $14000000; + AN_TDCalibSeek = $14000001; { calibrate: seek error } + AN_TDDelay = $14000002; { delay: error on timer wait } + +{ ------ timer.device } + + AN_TimerDev = $15000000; + AN_TMBadReq = $15000001; { bad request } + AN_TMBadSupply = $15000002; { power supply -- no 50/60Hz ticks } + +{ ------ cia.resource } + + AN_CIARsrc = $20000000; + +{ ------ disk.resource } + + AN_DiskRsrc = $21000000; + AN_DRHasDisk = $21000001; { get unit: already has disk } + AN_DRIntNoAct = $21000002; { interrupt: no active unit } + +{ ------ misc.resource } + + AN_MiscRsrc = $22000000; + +{ ------ bootstrap } + + AN_BootStrap = $30000000; + AN_BootError = $30000001; { boot code returned an error } + +{ ------ Workbench } + + AN_Workbench = $31000000; + AN_NoFonts = $B1000001; + AN_WBBadStartupMsg1 = $31000001; + AN_WBBadStartupMsg2 = $31000002; + AN_WBBadIOMsg = $31000003; + + AN_WBReLayoutToolMenu = $B1010009; + +{ ------ DiskCopy } + + AN_DiskCopy = $32000000; + +{ ------ toolkit for Intuition } + + AN_GadTools = $33000000; + +{ ------ System utility library } + + AN_UtilityLib = $34000000; + +{ ------ For use by any application that needs it } + + AN_Unknown = $35000000; + + + +CONST + + IOERR_OPENFAIL = -1; { device/unit failed to open } + IOERR_ABORTED = -2; { request terminated early [after AbortIO()] } + IOERR_NOCMD = -3; { command not supported by device } + IOERR_BADLENGTH = -4; { not a valid length (usually IO_LENGTH) } + IOERR_BADADDRESS = -5; { invalid address (misaligned or bad range) } + IOERR_UNITBUSY = -6; { device opens ok, but requested unit is busy } + IOERR_SELFTEST = -7; { hardware failed self-test } + + + +type + pResident = ^tResident; + tResident = record + rt_MatchWord : Word; { smallint to match on (ILLEGAL) } + rt_MatchTag : pResident; { pointer to the above } + rt_EndSkip : Pointer; { address to continue scan } + rt_Flags : Byte; { various tag flags } + rt_Version : Byte; { release version number } + rt_Type : Byte; { type of module (NT_mumble) } + rt_Pri : Shortint; { initialization priority } + rt_Name : STRPTR; { pointer to node name } + rt_IdString : STRPTR; { pointer to ident string } + rt_Init : Pointer; { pointer to init code } + end; + +const + + + RTC_MATCHWORD = $4AFC; + + RTF_AUTOINIT = $80; + RTF_AFTERDOS = $04; + RTF_SINGLETASK = $02; + RTF_COLDSTART = $01; + + +{ Compatibility: } + + RTM_WHEN = $03; + RTW_COLDSTART = $01; + RTW_NEVER = $00; + + + +TYPE + +{ ****** MemChunk **************************************************** } + + pMemChunk = ^tMemChunk; + tMemChunk = Record + mc_Next : pMemChunk; { * pointer to next chunk * } + mc_Bytes : ULONG; { * chunk byte size * } + End; + + +{ ****** MemHeader *************************************************** } + + pMemHeader = ^tMemHeader; + tMemHeader = Record + mh_Node : tNode; + mh_Attributes : Word; { * characteristics of this region * } + mh_First : pMemChunk; { * first free region * } + mh_Lower, { * lower memory bound * } + mh_Upper : Pointer; { * upper memory bound+1 * } + mh_Free : Ulong; { * total number of free bytes * } + End; + + +{ ****** MemEntry **************************************************** } + + pMemEntry = ^tMemEntry; + tMemEntry = record + me_Un : record + case longint of + 0 : ( meu_Reqs : ULONG ); + 1 : ( meu_Addr : APTR ); + end; + me_Length : ULONG; + end; + +{ ****** MemList ***************************************************** } + +{ * Note: sizeof(struct MemList) includes the size of the first MemEntry! * } + + pMemList = ^tMemList; + tMemList = Record + ml_Node : tNode; + ml_NumEntries : Word; { * number of entries in this struct * } + ml_ME : Array [0..0] of tMemEntry; { * the first entry * } + End; + +{ *----- Memory Requirement Types ---------------------------* } +{ *----- See the AllocMem() documentation for details--------* } + +Const + + MEMF_ANY = %000000000000000000000000; { * Any type of memory will do * } + MEMF_PUBLIC = %000000000000000000000001; + MEMF_CHIP = %000000000000000000000010; + MEMF_FAST = %000000000000000000000100; + MEMF_LOCAL = %000000000000000100000000; + MEMF_24BITDMA = %000000000000001000000000; { * DMAable memory within 24 bits of address * } + MEMF_KICK = %000000000000010000000000; { Memory that can be used for KickTags } + + MEMF_CLEAR = %000000010000000000000000; + MEMF_LARGEST = %000000100000000000000000; + MEMF_REVERSE = %000001000000000000000000; + MEMF_TOTAL = %000010000000000000000000; { * AvailMem: return total size of memory * } + MEMF_NO_EXPUNGE = $80000000; {AllocMem: Do not cause expunge on failure } + + MEM_BLOCKSIZE = 8; + MEM_BLOCKMASK = MEM_BLOCKSIZE-1; + +Type +{***** MemHandlerData *********************************************} +{ Note: This structure is *READ ONLY* and only EXEC can create it!} + + pMemHandlerData = ^tMemHandlerData; + tMemHandlerData = Record + memh_RequestSize, { Requested allocation size } + memh_RequestFlags, { Requested allocation flags } + memh_Flags : ULONG; { Flags (see below) } + end; + +const + MEMHF_RECYCLE = 1; { 0==First time, 1==recycle } + +{***** Low Memory handler return values **************************} + MEM_DID_NOTHING = 0; { Nothing we could do... } + MEM_ALL_DONE = -1; { We did all we could do } + MEM_TRY_AGAIN = 1; { We did some, try the allocation again } + + +type + pInterrupt = ^tInterrupt; + tInterrupt = record + is_Node : tNode; + is_Data : Pointer; { Server data segment } + is_Code : Pointer; { Server code entry } + end; + + pIntVector = ^tIntVector; + tIntVector = record { For EXEC use ONLY! } + iv_Data : Pointer; + iv_Code : Pointer; + iv_Node : pNode; + end; + + pSoftIntList = ^tSoftIntList; + tSoftIntList = record { For EXEC use ONLY! } + sh_List : tList; + sh_Pad : Word; + end; + +const + SIH_PRIMASK = $F0; + +{ this is a fake INT definition, used only for AddIntServer and the like } + + INTB_NMI = 15; + INTF_NMI = $0080; + +{ + Every Amiga Task has one of these Task structures associated with it. + To find yours, use FindTask(Nil). AmigaDOS processes tack a few more + values on to the end of this structure, which is the difference between + Tasks and Processes. +} + +type + + pTask = ^tTask; + tTask = record + tc_Node : tNode; + tc_Flags : Byte; + tc_State : Byte; + tc_IDNestCnt : Shortint; { intr disabled nesting } + tc_TDNestCnt : Shortint; { task disabled nesting } + tc_SigAlloc : ULONG; { sigs allocated } + tc_SigWait : ULONG; { sigs we are waiting for } + tc_SigRecvd : ULONG; { sigs we have received } + tc_SigExcept : ULONG; { sigs we will take excepts for } + tc_TrapAlloc : Word; { traps allocated } + tc_TrapAble : Word; { traps enabled } + tc_ExceptData : Pointer; { points to except data } + tc_ExceptCode : Pointer; { points to except code } + tc_TrapData : Pointer; { points to trap data } + tc_TrapCode : Pointer; { points to trap code } + tc_SPReg : Pointer; { stack pointer } + tc_SPLower : Pointer; { stack lower bound } + tc_SPUpper : Pointer; { stack upper bound + 2 } + tc_Switch : Pointer; { task losing CPU } + tc_Launch : Pointer; { task getting CPU } + tc_MemEntry : tList; { allocated memory } + tc_UserData : Pointer; { per task data } + end; + +{ + * Stack swap structure as passed to StackSwap() + } + pStackSwapStruct = ^tStackSwapStruct; + tStackSwapStruct = Record + stk_Lower : Pointer; { Lowest byte of stack } + stk_Upper : ULONG; { Upper end of stack (size + Lowest) } + stk_Pointer : Pointer; { Stack pointer at switch point } + end; + + + +{----- Flag Bits ------------------------------------------} + +const + + TB_PROCTIME = 0; + TB_ETASK = 3; + TB_STACKCHK = 4; + TB_EXCEPT = 5; + TB_SWITCH = 6; + TB_LAUNCH = 7; + + TF_PROCTIME = 1; + TF_ETASK = 8; + TF_STACKCHK = 16; + TF_EXCEPT = 32; + TF_SWITCH = 64; + TF_LAUNCH = 128; + +{----- Task States ----------------------------------------} + + TS_INVALID = 0; + TS_ADDED = 1; + TS_RUN = 2; + TS_READY = 3; + TS_WAIT = 4; + TS_EXCEPT = 5; + TS_REMOVED = 6; + +{----- Predefined Signals -------------------------------------} + + SIGB_ABORT = 0; + SIGB_CHILD = 1; + SIGB_BLIT = 4; + SIGB_SINGLE = 4; + SIGB_INTUITION = 5; + SIGB_DOS = 8; + + SIGF_ABORT = 1; + SIGF_CHILD = 2; + SIGF_BLIT = 16; + SIGF_SINGLE = 16; + SIGF_INTUITION = 32; + SIGF_DOS = 256; + + + +{ + This file defines ports and messages, which are used for inter- + task communications using the routines defined toward the + bottom of this file. +} + +type + +{****** MsgPort *****************************************************} + + pMsgPort = ^tMsgPort; + tMsgPort = record + mp_Node : tNode; + mp_Flags : Byte; + mp_SigBit : Byte; { signal bit number } + mp_SigTask : Pointer; { task to be signalled (TaskPtr) } + mp_MsgList : tList; { message linked list } + end; + +{****** Message *****************************************************} + + pMessage = ^tMessage; + tMessage = record + mn_Node : tNode; + mn_ReplyPort : pMsgPort; { message reply port } + mn_Length : Word; { message len in bytes } + end; + + + +{ mp_Flags: Port arrival actions (PutMsg) } + +CONST + + PF_ACTION = 3; { * Mask * } + PA_SIGNAL = 0; { * Signal task in mp_SigTask * } + PA_SOFTINT = 1; { * Signal SoftInt in mp_SoftInt/mp_SigTask * } + PA_IGNORE = 2; { * Ignore arrival * } + + + { Semaphore } +type + pSemaphore = ^tSemaphore; + tSemaphore = record + sm_MsgPort : tMsgPort; + sm_Bids : smallint; + end; + +{ This is the structure used to request a signal semaphore } + + pSemaphoreRequest = ^tSemaphoreRequest; + tSemaphoreRequest = record + sr_Link : tMinNode; + sr_Waiter : pTask; + end; + +{ The actual semaphore itself } + + pSignalSemaphore = ^tSignalSemaphore; + tSignalSemaphore = record + ss_Link : tNode; + ss_NestCount : smallint; + ss_WaitQueue : tMinList; + ss_MultipleLink : tSemaphoreRequest; + ss_Owner : pTask; + ss_QueueCount : smallint; + end; + + +{ ***** Semaphore procure message (for use in V39 Procure/Vacate *** } + + + pSemaphoreMessage = ^tSemaphoreMessage; + tSemaphoreMessage = Record + ssm_Message : tMessage; + ssm_Semaphore : pSignalSemaphore; + end; + +const + SM_SHARED = 1; + SM_EXCLUSIVE = 0; + + +CONST + +{ ------ Special Constants --------------------------------------- } + LIB_VECTSIZE = 6; { Each library entry takes 6 bytes } + LIB_RESERVED = 4; { Exec reserves the first 4 vectors } + LIB_BASE = (-LIB_VECTSIZE); + LIB_USERDEF = (LIB_BASE-(LIB_RESERVED*LIB_VECTSIZE)); + LIB_NONSTD = (LIB_USERDEF); + +{ ------ Standard Functions -------------------------------------- } + LIB_OPEN = -6; + LIB_CLOSE = -12; + LIB_EXPUNGE = -18; + LIB_EXTFUNC = -24; { for future expansion } + +TYPE + +{ ------ Library Base Structure ---------------------------------- } +{ Also used for Devices and some Resources } + + pLibrary = ^tLibrary; + tLibrary = record + lib_Node : tNode; + lib_Flags, + lib_pad : Byte; + lib_NegSize, { number of bytes before library } + lib_PosSize, { number of bytes after library } + lib_Version, { major } + lib_Revision : Word; { minor } + lib_IdString : STRPTR; { ASCII identification } + lib_Sum : ULONG; { the checksum itself } + lib_OpenCnt : Word; { number of current opens } + end; { * Warning: size is not a longword multiple ! * } + +CONST + +{ lib_Flags bit definitions (all others are system reserved) } + + LIBF_SUMMING = %00000001; { we are currently checksumming } + LIBF_CHANGED = %00000010; { we have just changed the lib } + LIBF_SUMUSED = %00000100; { set if we should bother to sum } + LIBF_DELEXP = %00001000; { delayed expunge } + +{ + This file defines the constants and types required to use + Amiga device IO routines, which are also defined here. +} + + +TYPE + +{***** Device *****************************************************} + pDevice = ^tDevice; + tDevice = record + dd_Library : tLibrary; + end; + +{***** Unit *******************************************************} + pUnit = ^tUnit; + tUnit = record + unit_MsgPort : tMsgPort; { queue for unprocessed messages } + { instance of msgport is recommended } + unit_flags, + unit_pad : Byte; + unit_OpenCnt : Word; { number of active opens } + end; + +Const + UNITF_ACTIVE = %00000001; + UNITF_INTASK = %00000010; + +type + + pIORequest = ^tIORequest; + tIORequest = record + io_Message : tMessage; + io_Device : pDevice; { device node pointer } + io_Unit : pUnit; { unit (driver private)} + io_Command : Word; { device command } + io_Flags : Byte; + io_Error : Shortint; { error or warning num } + end; + + pIOStdReq = ^tIOStdReq; + tIOStdReq = record + io_Message : tMessage; + io_Device : pDevice; { device node pointer } + io_Unit : pUnit; { unit (driver private)} + io_Command : Word; { device command } + io_Flags : Byte; + io_Error : Shortint; { error or warning num } + io_Actual : ULONG; { actual number of bytes transferred } + io_Length : ULONG; { requested number bytes transferred} + io_Data : Pointer; { points to data area } + io_Offset : ULONG; { offset for block structured devices } + end; + + +{ library vector offsets for device reserved vectors } + +const + DEV_BEGINIO = -30; + DEV_ABORTIO = -36; + +{ io_Flags defined bits } + + IOB_QUICK = 0; + IOF_QUICK = 1; + + CMD_INVALID = 0; + CMD_RESET = 1; + CMD_READ = 2; + CMD_WRITE = 3; + CMD_UPDATE = 4; + CMD_CLEAR = 5; + CMD_STOP = 6; + CMD_START = 7; + CMD_FLUSH = 8; + + CMD_NONSTD = 9; + + + + +{ Definition of the Exec library base structure (pointed to by location 4). +** Most fields are not to be viewed or modified by user programs. Use +** extreme caution. + } + +type + +pExecBase = ^tExecBase; +tExecBase = Record + LibNode : tLibrary; { Standard library node } + +{ ******* Static System Variables ******* } + + SoftVer : Word; { kickstart release number (obs.) } + LowMemChkSum : smallint; { checksum of 68000 trap vectors } + ChkBase : ULONG; { system base pointer complement } + ColdCapture, { coldstart soft capture vector } + CoolCapture, { coolstart soft capture vector } + WarmCapture, { warmstart soft capture vector } + SysStkUpper, { system stack base (upper bound) } + SysStkLower : Pointer; { top of system stack (lower bound) } + MaxLocMem : ULONG; { top of chip memory } + DebugEntry, { global debugger entry point } + DebugData, { global debugger data segment } + AlertData, { alert data segment } + MaxExtMem : Pointer; { top of extended mem, or null if none } + + ChkSum : Word; { for all of the above (minus 2) } + +{ ***** Interrupt Related ************************************** } + + IntVects : Array[0..15] of tIntVector; + +{ ***** Dynamic System Variables ************************************ } + + ThisTask : pTask; { pointer to current task (readable) } + + IdleCount, { idle counter } + DispCount : ULONG; { dispatch counter } + Quantum, { time slice quantum } + Elapsed, { current quantum ticks } + SysFlags : Word; { misc internal system flags } + IDNestCnt, { interrupt disable nesting count } + TDNestCnt : Shortint; { task disable nesting count } + + AttnFlags, { special attention flags (readable) } + AttnResched : Word; { rescheduling attention } + ResModules, { resident module array pointer } + TaskTrapCode, + TaskExceptCode, + TaskExitCode : Pointer; + TaskSigAlloc : ULONG; + TaskTrapAlloc: Word; + + +{ ***** System Lists (private!) ******************************* } + + MemList, + ResourceList, + DeviceList, + IntrList, + LibList, + PortList, + TaskReady, + TaskWait : tList; + + SoftInts : Array[0..4] of tSoftIntList; + +{ ***** Other Globals ****************************************** } + + LastAlert : Array[0..3] of LONG; + + { these next two variables are provided to allow + ** system developers to have a rough idea of the + ** period of two externally controlled signals -- + ** the time between vertical blank interrupts and the + ** external line rate (which is counted by CIA A's + ** "time of day" clock). In general these values + ** will be 50 or 60, and may or may not track each + ** other. These values replace the obsolete AFB_PAL + ** and AFB_50HZ flags. + } + + VBlankFrequency, { (readable) } + PowerSupplyFrequency : Byte; { (readable) } + + SemaphoreList : tList; + + { these next two are to be able to kickstart into user ram. + ** KickMemPtr holds a singly linked list of MemLists which + ** will be removed from the memory list via AllocAbs. If + ** all the AllocAbs's succeeded, then the KickTagPtr will + ** be added to the rom tag list. + } + + KickMemPtr, { ptr to queue of mem lists } + KickTagPtr, { ptr to rom tag queue } + KickCheckSum : Pointer; { checksum for mem and tags } + +{ ***** V36 Exec additions start here ************************************* } + + ex_Pad0 : Word; + ex_Reserved0 : ULONG; + ex_RamLibPrivate : Pointer; + + { The next ULONG contains the system "E" clock frequency, + ** expressed in Hertz. The E clock is used as a timebase for + ** the Amiga's 8520 I/O chips. (E is connected to "02"). + ** Typical values are 715909 for NTSC, or 709379 for PAL. + } + + ex_EClockFrequency, { (readable) } + ex_CacheControl, { Private to CacheControl calls } + ex_TaskID : ULONG; { Next available task ID } + + ex_Reserved1 : Array[0..4] of ULONG; + + ex_MMULock : Pointer; { private } + + ex_Reserved2 : Array[0..2] of ULONG; +{***** V39 Exec additions start here *************************************} + + { The following list and data element are used + * for V39 exec's low memory handler... + } + ex_MemHandlers : tMinList; { The handler list } + ex_MemHandler : Pointer; { Private! handler pointer } +end; + + +{ ***** Bit defines for AttnFlags (see above) ***************************** } + +{ Processors and Co-processors: } + +CONST + + AFB_68010 = 0; { also set for 68020 } + AFB_68020 = 1; { also set for 68030 } + AFB_68030 = 2; { also set for 68040 } + AFB_68040 = 3; + 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; + AFF_68030 = %00000100; + AFF_68040 = %00001000; + AFF_68881 = %00010000; + AFF_68882 = %00100000; + AFF_FPU40 = %01000000; + AFF_68060 = (1 shl 7); + +{ AFB_RESERVED8 = %000100000000; } +{ AFB_RESERVED9 = %001000000000; } + + +{ ***** Selected flag definitions for Cache manipulation calls ********* } + + CACRF_EnableI = %0000000000000001; { Enable instruction cache } + CACRF_FreezeI = %0000000000000010; { Freeze instruction cache } + CACRF_ClearI = %0000000000001000; { Clear instruction cache } + CACRF_IBE = %0000000000010000; { Instruction burst enable } + CACRF_EnableD = %0000000100000000; { 68030 Enable data cache } + CACRF_FreezeD = %0000001000000000; { 68030 Freeze data cache } + CACRF_ClearD = %0000100000000000; { 68030 Clear data cache } + CACRF_DBE = %0001000000000000; { 68030 Data burst enable } + CACRF_WriteAllocate = %0010000000000000; { 68030 Write-Allocate mode + (must always be set!) } + CACRF_EnableE = 1073741824; { Master enable for external caches } + { External caches should track the } + { state of the internal caches } + { such that they do not cache anything } + { that the internal cache turned off } + { for. } + + CACRF_CopyBack = $80000000; { Master enable for copyback caches } + + DMA_Continue = 2; { Continuation flag for CachePreDMA } + DMA_NoModify = 4; { Set if DMA does not update memory } + 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; + + + +function AbortIO(ioRequest : pIORequest): LongInt; +PROCEDURE AddDevice(device : pDevice); +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 AddPort(port : pMsgPort); +PROCEDURE AddResource(resource : POINTER); +PROCEDURE AddSemaphore(sigSem : pSignalSemaphore); +PROCEDURE AddTail(list : pList; node : pNode); +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; +FUNCTION AllocEntry(entry : pMemList) : pMemList; +FUNCTION AllocMem(byteSize : ULONG; requirements : ULONG) : POINTER; +FUNCTION AllocPooled(poolHeader : POINTER; memSize : ULONG) : POINTER; +FUNCTION AllocSignal(signalNum : LONGINT) : shortint; +FUNCTION AllocTrap(trapNum : LONGINT) : LONGINT; +FUNCTION AllocVec(byteSize : ULONG; requirements : ULONG) : POINTER; +FUNCTION AttemptSemaphore(sigSem : pSignalSemaphore) : BOOLEAN; +FUNCTION AttemptSemaphoreShared(sigSem : pSignalSemaphore) : ULONG; +FUNCTION AvailMem(requirements : ULONG) : ULONG; +PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG); +PROCEDURE CacheClearU; +FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG; +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); +PROCEDURE ChildOrphan(tid : POINTER); +PROCEDURE ChildStatus(tid : POINTER); +PROCEDURE ChildWait(tid : POINTER); +PROCEDURE CloseDevice(ioRequest : pIORequest); +PROCEDURE CloseLibrary(lib : pLibrary); +PROCEDURE ColdReboot; +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; +PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG); +PROCEDURE Debug(flags : ULONG); +PROCEDURE DeleteIORequest(iorequest : POINTER); +PROCEDURE DeleteMsgPort(port : pMsgPort); +PROCEDURE DeletePool(poolHeader : POINTER); +PROCEDURE Disable; +FUNCTION DoIO(ioRequest : pIORequest) : shortint; +PROCEDURE Enable; +PROCEDURE Enqueue(list : pList; node : pNode); +PROCEDURE ExecFreeMem(memoryBlock : POINTER; byteSize : ULONG); +PROCEDURE ExecInsert(list : pList; node : pNode; pred : pNode); +FUNCTION FindName(list : pList; const name : pCHAR) : pNode; +FUNCTION FindPort(const name : pCHAR) : pMsgPort; +FUNCTION FindResident(const name : pCHAR) : pResident; +FUNCTION FindSemaphore(const sigSem : pCHAR) : pSignalSemaphore; +FUNCTION FindTask(const name : pCHAR) : pTask; +PROCEDURE Forbid; +PROCEDURE FreeEntry(entry : pMemList); +PROCEDURE FreePooled(poolHeader : POINTER; memory : POINTER; memSize : ULONG); +PROCEDURE FreeSignal(signalNum : LONGINT); +PROCEDURE FreeTrap(trapNum : LONGINT); +PROCEDURE FreeVec(memoryBlock : POINTER); +FUNCTION GetCC : ULONG; +FUNCTION GetMsg(port : pMsgPort) : pMessage; +PROCEDURE InitCode(startClass : ULONG; version : ULONG); +FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER; +PROCEDURE InitSemaphore(sigSem : pSignalSemaphore); +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 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); +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); +FUNCTION RemHead(list : pList) : pNode; +PROCEDURE RemIntServer(intNumber : LONGINT; interrupt_ : pInterrupt); +PROCEDURE RemLibrary(lib : pLibrary); +PROCEDURE RemMemHandler(memhand : pInterrupt); +PROCEDURE Remove(node : pNode); +PROCEDURE RemPort(port : pMsgPort); +PROCEDURE RemResource(resource : POINTER); +PROCEDURE RemSemaphore(sigSem : pSignalSemaphore); +FUNCTION RemTail(list : pList) : pNode; +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;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; +PROCEDURE Signal(task : pTask; signalSet : ULONG); +PROCEDURE StackSwap(newStack : pStackSwapStruct); +PROCEDURE SumKickData; +PROCEDURE SumLibrary(lib : pLibrary); +FUNCTION SuperState : POINTER; +FUNCTION Supervisor(userFunction : tPROCEDURE) : 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; +{ +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); +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 OpenLibrary(const libName : String; version : ULONG) : pLibrary; +FUNCTION OpenResource(const resName : String) : POINTER; +function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc :tPROCEDURE; putChData : POINTER): pointer; +} +function BitMask(no :shortint): longint; +function IsListEmpty( list : pList): boolean; +function IsMsgPortEmpty( mp : pMsgPort): boolean; + +IMPLEMENTATION + +uses pastoc; + +function BitMask(no :shortint): longint; +begin + BitMask := 1 shl no; +end; + +function IsListEmpty( list : pList): boolean; +begin + IsListEmpty := list^.lh_TailPred = pnode(list); +end; + +function IsMsgPortEmpty(mp: pMsgPort): boolean; +begin + with mp^ do + IsMsgPortEmpty := mp_MsgList.lh_TailPred = pNode(@mp_MsgList); +end; + +function AbortIO(ioRequest: pIORequest): LongInt; +type + TLocalCall = function(ioRequest : pIORequest; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 80)); + AbortIO := Call(ioRequest, AOS_ExecBase); +end; + +procedure AddDevice(device: pDevice); +type + TLocalCall = procedure(device: pDevice; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 72)); + Call(device, AOS_ExecBase); +end; + +procedure AddHead(list: pList; node: pNode); +type + TLocalCall = procedure(list : pList; node : pNode; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 40)); + Call(list, node, AOS_ExecBase); +end; + +procedure AddIntServer(intNumber: LONGINT; interrupt_: pInterrupt); +type + TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 28)); + Call(intNumber, interrupt_, AOS_ExecBase); +end; + +procedure AddLibrary(lib: pLibrary); +type + TLocalCall = procedure(lib: pLibrary; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 66)); + Call(lib, AOS_ExecBase); +end; + +procedure AddMemHandler(memhand: pInterrupt); +type + TLocalCall = procedure(memhand: pInterrupt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 129)); + Call(memhand, AOS_ExecBase); +end; + +procedure AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR); +type + TLocalCall = procedure(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 103)); + Call(size, attributes, pri, base, name, AOS_ExecBase); +end; + +PROCEDURE AddPort(port : pMsgPort); +type + TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 59)); + Call(port, AOS_ExecBase); +end; + +PROCEDURE AddResource(resource : POINTER); +type + TLocalCall = procedure(resource : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 81)); + Call(resource, AOS_ExecBase); +end; + +PROCEDURE AddSemaphore(sigSem : pSignalSemaphore); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 100)); + Call(sigSem, AOS_ExecBase); +end; + +PROCEDURE AddTail(list : pList; node : pNode); +type + TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 41)); + Call(list, node, AOS_ExecBase); +end; + +FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER; +type + TLocalCall = function(task : pTask;const initPC : POINTER;const finalPC : POINTER; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 47)); + AddTask := Call(task, initPC, finalPC, AOS_ExecBase); +end; + +PROCEDURE Alert(alertNum : ULONG); +type + TLocalCall = procedure(alertNum : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 18)); + Call(alertNum, AOS_ExecBase); +end; + +FUNCTION AllocAbs(byteSize : ULONG; location : POINTER) : POINTER; +type + TLocalCall = FUNCTION(byteSize : ULONG; location : POINTER; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 34)); + AllocAbs := Call(byteSize, location, AOS_ExecBase); +end; + +FUNCTION Allocate(freeList : pMemHeader; byteSize : ULONG) : POINTER; +type + TLocalCall = function(freeList : pMemHeader; byteSize : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 31)); + Allocate := Call(freeList, byteSize, AOS_ExecBase); +end; + +FUNCTION AllocEntry(entry : pMemList) : pMemList; +type + TLocalCall = function(entry : pMemList; LibBase: Pointer): pMemList; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 37)); + AllocEntry := Call(entry, AOS_ExecBase); +end; + +FUNCTION AllocMem(byteSize : ULONG; requirements : ULONG) : POINTER; +type + TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 33)); + AllocMem := Call(byteSize, requirements, AOS_ExecBase); +end; + +FUNCTION AllocPooled(poolHeader : POINTER; memSize : ULONG) : POINTER; +type + TLocalCall = function(poolHeader : POINTER; memSize : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 118)); + AllocPooled := Call(poolHeader, memSize, AOS_ExecBase); +end; + +FUNCTION AllocSignal(signalNum : LONGINT) : shortint; +type + TLocalCall = function(signalNum : LONGINT; LibBase: Pointer): shortint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 55)); + AllocSignal := Call(signalNum, AOS_ExecBase); +end; + +FUNCTION AllocTrap(trapNum : LONGINT) : LONGINT; +type + TLocalCall = function(trapNum : LONGINT; LibBase: Pointer): LONGINT; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 57)); + AllocTrap := Call(trapNum, AOS_ExecBase); +end; + +FUNCTION AllocVec(byteSize : ULONG; requirements : ULONG) : POINTER; +type + TLocalCall = function(byteSize : ULONG; requirements : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 114)); + AllocVec := Call(byteSize, requirements, AOS_ExecBase); +end; + +FUNCTION AttemptSemaphore(sigSem : pSignalSemaphore) : BOOLEAN; +type + TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 96)); + AttemptSemaphore := Call(sigSem, AOS_ExecBase); +end; + +FUNCTION AttemptSemaphoreShared(sigSem : pSignalSemaphore) : ULONG; +type + TLocalCall = function(sigSem : pSignalSemaphore; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 120)); + AttemptSemaphoreShared := Call(sigSem, AOS_ExecBase); +end; + +FUNCTION AvailMem(requirements : ULONG) : ULONG; +type + TLocalCall = function(requirements : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 36)); + AvailMem := Call(requirements, AOS_ExecBase); +end; + +PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG); +type + TLocalCall = procedure(address : POINTER; length : ULONG; caches : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 107)); + Call(address, length, caches, AOS_ExecBase); +end; + +PROCEDURE CacheClearU; +type + TLocalCall = procedure(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 106)); + Call(AOS_ExecBase); +end; + +FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG; +type + TLocalCall = function(cacheBits : ULONG; cacheMask : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 108)); + CacheControl := Call(cacheBits, cacheMask, AOS_ExecBase); +end; + +PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG); +type + TLocalCall = procedure(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 128)); + Call(address, length, flags, AOS_ExecBase); +end; + +FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER; +type + TLocalCall = function(const address : POINTER; VAR length : ULONG; flags : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 127)); + CachePreDMA := Call(address, length, flags, AOS_ExecBase); +end; + +PROCEDURE Cause(interrupt_ : pInterrupt); +type + TLocalCall = procedure(interrupt_ : pInterrupt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 30)); + Call(interrupt_, AOS_ExecBase); +end; + +FUNCTION CheckIO(ioRequest : pIORequest) : pIORequest; +type + TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): pIORequest; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 78)); + CheckIO := Call(ioRequest, AOS_ExecBase); +end; + +PROCEDURE ChildFree(tid : POINTER); +type + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 123)); + Call(tid, AOS_ExecBase); +end; + +PROCEDURE ChildOrphan(tid : POINTER); +type + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 124)); + Call(tid, AOS_ExecBase); +end; + +PROCEDURE ChildStatus(tid : POINTER); +type + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 125)); + Call(tid, AOS_ExecBase); +end; + +PROCEDURE ChildWait(tid : POINTER); +type + TLocalCall = procedure(tid : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 126)); + Call(tid, AOS_ExecBase); +end; + +PROCEDURE CloseDevice(ioRequest : pIORequest); +type + TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 75)); + Call(ioRequest, AOS_ExecBase); +end; + +PROCEDURE CloseLibrary(lib : pLibrary); +type + TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 69)); + Call(lib, AOS_ExecBase); +end; + +PROCEDURE ColdReboot; +type + TLocalCall = procedure(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 121)); + Call(AOS_ExecBase); +end; + +PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG); +type + TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 104)); + Call(source, dest, size, AOS_ExecBase); +end; + +PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG); +type + TLocalCall = procedure(const source : POINTER; dest : POINTER; size : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 105)); + Call(source, dest, size, AOS_ExecBase); +end; + +FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER; +type + TLocalCall = function(const port : pMsgPort; size : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 109)); + CreateIORequest := Call(port, size, AOS_ExecBase); +end; + +FUNCTION CreateMsgPort : pMsgPort; +type + TLocalCall = function(LibBase: Pointer): pMsgPort; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 111)); + CreateMsgPort := Call(AOS_ExecBase); +end; + +FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : +POINTER; +type + TLocalCall = function(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 116)); + CreatePool := Call(requirements, puddleSize, threshSize, AOS_ExecBase); +end; + +PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG); +type + TLocalCall = procedure(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 32)); + Call(freeList, memoryBlock, byteSize, AOS_ExecBase); +end; + +PROCEDURE Debug(flags : ULONG); +type + TLocalCall = procedure(flags : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 19)); + Call(flags, AOS_ExecBase); +end; + +PROCEDURE DeleteIORequest(iorequest : POINTER); +type + TLocalCall = procedure(iorequest : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 110)); + Call(iorequest, AOS_ExecBase); +end; + +PROCEDURE DeleteMsgPort(port : pMsgPort); +type + TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 112)); + Call(port, AOS_ExecBase); +end; + +PROCEDURE DeletePool(poolHeader : POINTER); +type + TLocalCall = procedure(poolHeader : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 117)); + Call(poolHeader, AOS_ExecBase); +end; + +PROCEDURE Disable; +type + TLocalCall = procedure(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 20)); + Call(AOS_ExecBase); +end; + +FUNCTION DoIO(ioRequest : pIORequest) : shortint; +type + TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 76)); + DoIO := Call(ioRequest, AOS_ExecBase); +end; + +PROCEDURE Enable; +type + TLocalCall = procedure(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 21)); + Call(AOS_ExecBase); +end; + +PROCEDURE Enqueue(list : pList; node : pNode); +type + TLocalCall = procedure(list : pList; node : pNode; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 45)); + Call(list, node, AOS_ExecBase); +end; + +PROCEDURE ExecFreeMem(memoryBlock : POINTER; byteSize : ULONG); +type + TLocalCall = procedure(memoryBlock : POINTER; byteSize : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 35)); + Call(memoryBlock, byteSize, AOS_ExecBase); +end; + +PROCEDURE ExecInsert(list : pList; node : pNode; pred : pNode); +type + TLocalCall = procedure(list : pList; node : pNode; pred : pNode; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 39)); + Call(list, node, pred, AOS_ExecBase); +end; + +FUNCTION FindName(list : pList; const name : pCHAR) : pNode; +type + TLocalCall = function(list : pList; const name : pCHAR; LibBase: Pointer): pNode; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 46)); + FindName := Call(list, name, AOS_ExecBase); +end; + +FUNCTION FindPort(const name : pCHAR) : pMsgPort; +type + TLocalCall = function(const name : pCHAR; LibBase: Pointer): pMsgPort; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 65)); + FindPort := Call(name, AOS_ExecBase); +end; + +FUNCTION FindResident(const name : pCHAR) : pResident; +type + TLocalCall = function(const name : pCHAR; LibBase: Pointer): pResident; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 16)); + FindResident := Call(name, AOS_ExecBase); +end; + +FUNCTION FindSemaphore(const sigSem : pCHAR) : pSignalSemaphore; +type + TLocalCall = function(const sigSem : pCHAR; LibBase: Pointer): pSignalSemaphore; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 99)); + FindSemaphore := Call(sigSem, AOS_ExecBase); +end; + +FUNCTION FindTask(const name : pCHAR) : pTask; +type + TLocalCall = function(const name : pCHAR; LibBase: Pointer): pTask; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 49)); + FindTask := Call(name, AOS_ExecBase); +end; + +PROCEDURE Forbid; +type + TLocalCall = procedure(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 22)); + Call(AOS_ExecBase); +end; + +PROCEDURE FreeEntry(entry : pMemList); +type + TLocalCall = procedure(entry : pMemList; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 38)); + Call(entry, AOS_ExecBase); +end; + +PROCEDURE FreePooled(poolHeader : POINTER; memory : POINTER; memSize : ULONG); +type + TLocalCall = procedure(poolHeader : POINTER; memory : POINTER; memSize : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 119)); + Call(poolHeader, memory, memSize, AOS_ExecBase); +end; + +PROCEDURE FreeSignal(signalNum : LONGINT); +type + TLocalCall = procedure(signalNum : LONGINT; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 56)); + Call(signalNum, AOS_ExecBase); +end; + +PROCEDURE FreeTrap(trapNum : LONGINT); +type + TLocalCall = procedure(trapNum : LONGINT; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 58)); + Call(trapNum, AOS_ExecBase); +end; + +PROCEDURE FreeVec(memoryBlock : POINTER); +type + TLocalCall = procedure(memoryBlock : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 115)); + Call(memoryBlock, AOS_ExecBase); +end; + +FUNCTION GetCC : ULONG; +type + TLocalCall = function(LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 88)); + GetCC := Call(AOS_ExecBase); +end; + +FUNCTION GetMsg(port : pMsgPort) : pMessage; +type + TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 62)); + GetMsg := Call(port, AOS_ExecBase); +end; + +PROCEDURE InitCode(startClass : ULONG; version : ULONG); +type + TLocalCall = procedure(startClass : ULONG; version : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 12)); + Call(startClass, version, AOS_ExecBase); +end; + +FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER; +type + TLocalCall = function(const resident_ : pResident; segList : ULONG; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 17)); + InitResident := Call(resident_, segList, AOS_ExecBase); +end; + +PROCEDURE InitSemaphore(sigSem : pSignalSemaphore); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 93)); + Call(sigSem, AOS_ExecBase); +end; + +PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG); +type + TLocalCall = procedure(const initTable : POINTER; memory : POINTER; size : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 13)); + Call(initTable, memory, size, AOS_ExecBase); +end; + +PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer); +type + TLocalCall = procedure(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 15)); + Call(target, functionArray, funcDispBase, AOS_ExecBase); +end; + +FUNCTION MakeLibrary(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG) : pLibrary; +type + TLocalCall = function(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG; LibBase: Pointer): pLibrary; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 14)); + MakeLibrary := Call(funcInit, structInit, libInit, dataSize, segList, AOS_ExecBase); +end; + +FUNCTION ObtainQuickVector(interruptCode : POINTER) : ULONG; +type + TLocalCall = function(interruptCode : POINTER; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 131)); + ObtainQuickVector := Call(interruptCode, AOS_ExecBase); +end; + +PROCEDURE ObtainSemaphore(sigSem : pSignalSemaphore); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 94)); + Call(sigSem, AOS_ExecBase); +end; + +PROCEDURE ObtainSemaphoreList(sigSem : pList); +type + TLocalCall = procedure(sigSem : pList; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 97)); + Call(sigSem, AOS_ExecBase); +end; + +PROCEDURE ObtainSemaphoreShared(sigSem : pSignalSemaphore); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 113)); + Call(sigSem, AOS_ExecBase); +end; + +FUNCTION OldOpenLibrary(const libName : pCHAR) : pLibrary; +type + TLocalCall = function(const libName : pCHAR; LibBase: Pointer): pLibrary; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 68)); + OldOpenLibrary := Call(libName, AOS_ExecBase); +end; + +FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; +flags : ULONG) : shortint; +type + TLocalCall = function(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG; LibBase: Pointer): shortint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 74)); + OpenDevice := Call(devName, unite, ioRequest, flags, AOS_ExecBase); +end; + +FUNCTION OpenLibrary(const libName : pCHAR; version : ULONG) : pLibrary; +type + TLocalCall = function(const libName : pCHAR; version : ULONG; LibBase: Pointer): pLibrary; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 92)); + OpenLibrary := Call(libName, version, AOS_ExecBase); +end; + +FUNCTION OpenResource(const resName : pCHAR) : POINTER; +type + TLocalCall = function(const resName : pCHAR; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 83)); + OpenResource := Call(resName, AOS_ExecBase); +end; + +PROCEDURE Permit; +type + TLocalCall = PROCEDURE(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 23)); + Call(AOS_ExecBase); +end; + +FUNCTION Procure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage) : BOOLEAN; +type + TLocalCall = function(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer): BOOLEAN; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 90)); + Procure := Call(sigSem, bidMsg, AOS_ExecBase); +end; + +PROCEDURE PutMsg(port : pMsgPort; message : pMessage); +type + TLocalCall = PROCEDURE(port : pMsgPort; message : pMessage; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 61)); + Call(port, message, AOS_ExecBase); +end; + +function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; +type + TLocalCall = function(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER; LibBase: Pointer): pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 87)); + RawDoFmt := Call(formatString, dataStream, putChProc, putChData, AOS_ExecBase); +end; + +PROCEDURE ReleaseSemaphore(sigSem : pSignalSemaphore); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 95)); + Call(sigSem, AOS_ExecBase); +end; + +PROCEDURE ReleaseSemaphoreList(sigSem : pList); +type + TLocalCall = procedure(sigSem : pList; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 98)); + Call(sigSem, AOS_ExecBase); +end; + +PROCEDURE RemDevice(device : pDevice); +type + TLocalCall = PROCEDURE(device : pDevice; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 73)); + Call(device, AOS_ExecBase); +end; + +FUNCTION RemHead(list : pList) : pNode; +type + TLocalCall = function(list : pList; LibBase: Pointer): pNode; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 43)); + RemHead := Call(list, AOS_ExecBase); +end; + +PROCEDURE RemIntServer(intNumber : LONGINT; interrupt_ : pInterrupt); +type + TLocalCall = procedure(intNumber : LONGINT; interrupt_ : pInterrupt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 29)); + Call(intNumber, interrupt_, AOS_ExecBase); +end; + +PROCEDURE RemLibrary(lib : pLibrary); +type + TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 67)); + Call(lib, AOS_ExecBase); +end; + +PROCEDURE RemMemHandler(memhand : pInterrupt); +type + TLocalCall = procedure(memhand : pInterrupt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 130)); + Call(memhand, AOS_ExecBase); +end; + +PROCEDURE Remove(node : pNode); +type + TLocalCall = procedure(node : pNode; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 42)); + Call(node, AOS_ExecBase); +end; + +PROCEDURE RemPort(port : pMsgPort); +type + TLocalCall = procedure(port : pMsgPort; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 60)); + Call(port, AOS_ExecBase); +end; + +PROCEDURE RemResource(resource : POINTER); +type + TLocalCall = procedure(resource : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 82)); + Call(resource, AOS_ExecBase); +end; + +PROCEDURE RemSemaphore(sigSem : pSignalSemaphore); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 101)); + Call(sigSem, AOS_ExecBase); +end; + +FUNCTION RemTail(list : pList) : pNode; +type + TLocalCall = function(list : pList; LibBase: Pointer): pNode; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 44)); + RemTail := Call(list, AOS_ExecBase); +end; + +PROCEDURE RemTask(task : pTask); +type + TLocalCall = procedure(task : pTask; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 48)); + Call(task, AOS_ExecBase); +end; + +PROCEDURE ReplyMsg(message : pMessage); +type + TLocalCall = procedure(message : pMessage; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 63)); + Call(message, AOS_ExecBase); +end; + +PROCEDURE SendIO(ioRequest : pIORequest); +type + TLocalCall = procedure(ioRequest : pIORequest; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 77)); + Call(ioRequest, AOS_ExecBase); +end; + +FUNCTION SetExcept(newSignals : ULONG; signalSet : ULONG) : ULONG; +type + TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 52)); + SetExcept := Call(newSignals, signalSet, AOS_ExecBase); +end; + +FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : POINTER; +type + TLocalCall = function(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE; LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 70)); + SetFunction := Call(lib, funcOffset, newFunction, AOS_ExecBase); +end; + +FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt; +type + TLocalCall = function(intNumber : LONGINT;const interrupt_ : pInterrupt; LibBase: Pointer): pInterrupt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 27)); + SetIntVector := Call(intNumber, interrupt_, AOS_ExecBase); +end; + +FUNCTION SetSignal(newSignals : ULONG; signalSet : ULONG) : ULONG; +type + TLocalCall = function(newSignals : ULONG; signalSet : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 51)); + SetSignal := Call(newSignals, signalSet, AOS_ExecBase); +end; + +FUNCTION SetSR(newSR : ULONG; mask : ULONG) : ULONG; +type + TLocalCall = function(newSR : ULONG; mask : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 24)); + SetSR := Call(newSR, mask, AOS_ExecBase); +end; + +FUNCTION SetTaskPri(task : pTask; priority : LONGINT) : shortint; +type + TLocalCall = function(task : pTask; priority : LONGINT; LibBase: Pointer): shortint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 50)); + SetTaskPri := Call(task, priority, AOS_ExecBase); +end; + +PROCEDURE Signal(task : pTask; signalSet : ULONG); +type + TLocalCall = procedure(task : pTask; signalSet : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 54)); + Call(task, signalSet, AOS_ExecBase); +end; + +PROCEDURE StackSwap(newStack : pStackSwapStruct); +type + TLocalCall = procedure(newStack : pStackSwapStruct; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 122)); + Call(newStack, AOS_ExecBase); +end; + +PROCEDURE SumKickData; +type + TLocalCall = procedure(LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 102)); + Call(AOS_ExecBase); +end; + +PROCEDURE SumLibrary(lib : pLibrary); +type + TLocalCall = procedure(lib : pLibrary; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 71)); + Call(lib, AOS_ExecBase); +end; + +FUNCTION SuperState : POINTER; +type + TLocalCall = function(LibBase: Pointer): POINTER; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 25)); + SuperState := Call(AOS_ExecBase); +end; + +FUNCTION Supervisor(userFunction : tPROCEDURE) : ULONG; +type + TLocalCall = function(userFunction : tPROCEDURE; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 5)); + Supervisor := Call(userFunction, AOS_ExecBase); +end; + +FUNCTION TypeOfMem(const address : POINTER) : ULONG; +type + TLocalCall = function(const address : POINTER; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 89)); + TypeOfMem := Call(address, AOS_ExecBase); +end; + +PROCEDURE UserState(sysStack : POINTER); +type + TLocalCall = procedure(sysStack : POINTER; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 26)); + Call(sysStack, AOS_ExecBase); +end; + +PROCEDURE Vacate(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage); +type + TLocalCall = procedure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 91)); + Call(sigSem, bidMsg, AOS_ExecBase); +end; + +FUNCTION Wait(signalSet : ULONG) : ULONG; +type + TLocalCall = function(signalSet : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 53)); + Wait := Call(signalSet, AOS_ExecBase); +end; + +FUNCTION WaitIO(ioRequest : pIORequest) : shortint; +type + TLocalCall = function(ioRequest : pIORequest; LibBase: Pointer): shortint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 79)); + WaitIO := Call(ioRequest, AOS_ExecBase); +end; + +FUNCTION WaitPort(port : pMsgPort) : pMessage; +type + TLocalCall = function(port : pMsgPort; LibBase: Pointer): pMessage; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, 64)); + WaitPort := Call(port, AOS_ExecBase); +end; +{ +PROCEDURE NewMinList(minlist : pMinList); +type + TLocalCall = procedure(; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Call(, AOS_ExecBase); +end; + +FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; + +FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode; +type + TLocalCall = function(; LibBase: Pointer): ; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_ExecBase, X)); + Result := Call(, AOS_ExecBase); +end; +} + +{PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : String); +BEGIN + AddMemList(size,attributes,pri,base,pas2c(name)); +END; +FUNCTION FindName(list : pList; const name : String) : pNode; +BEGIN + FindName := FindName(list,pas2c(name)); +END; +FUNCTION FindPort(const name : String) : pMsgPort; +BEGIN + FindPort := FindPort(pas2c(name)); +END; +FUNCTION FindResident(const name : String) : pResident; +BEGIN + FindResident := FindResident(pas2c(name)); +END; +FUNCTION FindSemaphore(const sigSem : String) : pSignalSemaphore; +BEGIN + FindSemaphore := FindSemaphore(pas2c(sigSem)); +END; +FUNCTION FindTask(const name : String) : pTask; +BEGIN + FindTask := FindTask(pas2c(name)); +END; +FUNCTION OldOpenLibrary(const libName : String) : pLibrary; +BEGIN + OldOpenLibrary := OldOpenLibrary(pas2c(libName)); +END; +FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest; +flags : ULONG) : shortint; +BEGIN + OpenDevice := OpenDevice(pas2c(devName),unite,ioRequest,flags); +END; +FUNCTION OpenLibrary(const libName : String; version : ULONG) : pLibrary; +BEGIN + OpenLibrary := OpenLibrary(pas2c(libName),version); +END; +FUNCTION OpenResource(const resName : String) : POINTER; +BEGIN + OpenResource := OpenResource(pas2c(resName)); +END; +function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; +BEGIN + RawDoFmt := RawDoFmt(pas2c(formatString),dataStream,putChProc,putChData); +END;} + +END. (* UNIT EXEC *) + + + + + diff --git a/rtl/aros/i386/doslibf.inc b/rtl/aros/i386/doslibf.inc index c8d4c3294e..0602e3da09 100644 --- a/rtl/aros/i386/doslibf.inc +++ b/rtl/aros/i386/doslibf.inc @@ -15,7 +15,7 @@ function Open(name: PChar; accessMode: longint): Cardinal; type - TOpen = function(name: PChar; accessMode: longint; Base: Pointer): Cardinal; stdcall; + TOpen = function(name: PChar; accessMode: longint; Base: Pointer): Cardinal; cdecl; var Call: TOpen; begin @@ -25,7 +25,7 @@ end; function dosClose(_file: Cardinal): boolean; type - TdosClose = function(_file: Cardinal; Base: Pointer): boolean; stdcall; + TdosClose = function(_file: Cardinal; Base: Pointer): boolean; cdecl; var Call: TdosClose; begin @@ -35,7 +35,7 @@ end; function dosRead(_file: Cardinal; buffer: Pointer; length: longint): longint; type - TdosRead = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; stdcall; + TdosRead = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; cdecl; var Call: TdosRead; begin @@ -45,7 +45,7 @@ end; function dosWrite(_file: Cardinal; buffer: Pointer; length: longint): longint; type - TdosWrite = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; stdcall; + TdosWrite = function(_file: Cardinal; buffer: Pointer; length: longint; Base: Pointer): longint; cdecl; var Call: TdosWrite; begin @@ -55,7 +55,7 @@ end; function dosInput: Cardinal; type - TdosInput = function(Base: Pointer): Cardinal; stdcall; + TdosInput = function(Base: Pointer): Cardinal; cdecl; var Call: TdosInput; begin @@ -65,7 +65,7 @@ end; function dosOutput: Cardinal; type - TdosOutput = function(Base: Pointer): Cardinal; stdcall; + TdosOutput = function(Base: Pointer): Cardinal; cdecl; var Call: TdosOutput; begin @@ -75,7 +75,7 @@ end; function dosSeek(_file: longint;position: longint;offset: longint): longint; type - TdosSeek = function(_file: longint;position: longint;offset: longint; Base: Pointer): longint; stdcall; + TdosSeek = function(_file: longint;position: longint;offset: longint; Base: Pointer): longint; cdecl; var Call: TdosSeek; begin @@ -85,7 +85,7 @@ end; function dosDeleteFile(name: PChar): boolean; type - TdosDeleteFile = function(name: PChar; Base: Pointer): boolean; stdcall; + TdosDeleteFile = function(name: PChar; Base: Pointer): boolean; cdecl; var Call: TdosDeleteFile; begin @@ -95,7 +95,7 @@ end; function dosRename(oldName: PChar;newName: PChar): boolean; type - TdosRename = function(oldName: PChar;newName: PChar; Base: Pointer): boolean; stdcall; + TdosRename = function(oldName: PChar;newName: PChar; Base: Pointer): boolean; cdecl; var Call: TdosRename; begin @@ -105,7 +105,7 @@ end; function Lock(name: PChar;_type: longint): longint; type - TLock = function(name: PChar;_type: longint; Base: Pointer): longint; stdcall; + TLock = function(name: PChar;_type: longint; Base: Pointer): longint; cdecl; var Call: TLock; begin @@ -115,7 +115,7 @@ end; function UnLock(lock: longint): longint; type - TUnLock = function(lock: longint; Base: Pointer): longint; stdcall; + TUnLock = function(lock: longint; Base: Pointer): longint; cdecl; var Call: TUnLock; begin @@ -126,7 +126,7 @@ end; function Examine(lock: longint; fileInfoBlock: PFileInfoBlock): boolean; type - TExamine = function(lock: longint; fileInfoBlock: PFileInfoBlock; Base: Pointer): boolean; stdcall; + TExamine = function(lock: longint; fileInfoBlock: PFileInfoBlock; Base: Pointer): boolean; cdecl; var Call: TExamine; begin @@ -136,7 +136,7 @@ end; function Info(lock: longint; parameterBlock: PInfoData): boolean; type - TInfo = function(lock: longint; parameterBlock: PInfoData; Base: Pointer): boolean; stdcall; + TInfo = function(lock: longint; parameterBlock: PInfoData; Base: Pointer): boolean; cdecl; var Call: TInfo; begin @@ -146,7 +146,7 @@ end; function dosCreateDir(name: PChar): longint; type - TdosCreateDir = function(name: PChar; Base: Pointer): longint; stdcall; + TdosCreateDir = function(name: PChar; Base: Pointer): longint; cdecl; var Call: TdosCreateDir; begin @@ -156,7 +156,7 @@ end; function CurrentDir(lock: longint): longint; type - TCurrentDir = function(lock: longint; Base: Pointer): longint; stdcall; + TCurrentDir = function(lock: longint; Base: Pointer): longint; cdecl; var Call: TCurrentDir; begin @@ -166,7 +166,7 @@ end; function IoErr: longint; type - TIoErr = function(Base: Pointer): longint; stdcall; + TIoErr = function(Base: Pointer): longint; cdecl; var Call: TIoErr; begin @@ -176,7 +176,7 @@ end; procedure dosExit(ErrCode: longint); type - TExit = procedure(ErrCode: longint; Base: Pointer); stdcall; + TExit = procedure(ErrCode: longint; Base: Pointer); cdecl; var Call: TExit; begin @@ -186,7 +186,7 @@ end; function SetProtection(name: PChar; protect: longword): boolean; type - TSetProtection = function(name: PChar; protect: longword; Base: Pointer): boolean; stdcall; + TSetProtection = function(name: PChar; protect: longword; Base: Pointer): boolean; cdecl; var Call: TSetProtection; begin @@ -196,7 +196,7 @@ end; function DateStamp(date: PDateStamp): PDateStamp; type - TDateStamp = function(date: PDateStamp; Base: Pointer): PDateStamp; stdcall; + TDateStamp = function(date: PDateStamp; Base: Pointer): PDateStamp; cdecl; var Call: TDateStamp; begin @@ -206,7 +206,7 @@ end; procedure Delay(ticks: LongWord); type - TDelay = procedure(ticks: LongWord; Base: Pointer); stdcall; + TDelay = procedure(ticks: LongWord; Base: Pointer); cdecl; var Call: TDelay; begin @@ -216,7 +216,7 @@ end; function SetFileDate(name: PChar; date: PDateStamp): boolean; type - TSetFileDate = function(name: PChar; date: PDateStamp; Base: Pointer): boolean; stdcall; + TSetFileDate = function(name: PChar; date: PDateStamp; Base: Pointer): boolean; cdecl; var Call: TSetFileDate; begin @@ -226,7 +226,7 @@ end; function NameFromLock(lock: longint; buffer: PChar; len: longint): boolean; type - TNameFromLock = function(lock: longint; buffer: PChar; len: longint; Base: Pointer): boolean; stdcall; + TNameFromLock = function(lock: longint; buffer: PChar; len: longint; Base: Pointer): boolean; cdecl; var Call: TNameFromLock; begin @@ -236,7 +236,7 @@ end; function SetFileSize(fh: longint; pos: longint; mode: longint): longint; type - TSetFileSize = function(fh: longint; pos: longint; mode: longint; Base: Pointer): longint; stdcall; + TSetFileSize = function(fh: longint; pos: longint; mode: longint; Base: Pointer): longint; cdecl; var Call: TSetFileSize; begin @@ -246,7 +246,7 @@ end; function Cli : pCommandLineInterface; type - TLocalCall = function(LibBase: Pointer): pCommandLineInterface; stdcall; + TLocalCall = function(LibBase: Pointer): pCommandLineInterface; cdecl; var Call: TLocalCall; begin @@ -256,7 +256,7 @@ end; function GetArgStr: PChar; type - TGetArgStr = function(Base: Pointer): PChar; stdcall; + TGetArgStr = function(Base: Pointer): PChar; cdecl; var Call: TGetArgStr; begin @@ -266,7 +266,7 @@ end; function GetCurrentDirName(buf: PChar; len: longint): boolean; type - TGetCurrentDirName = function(buf: PChar; len: longint; Base: Pointer): boolean; stdcall; + TGetCurrentDirName = function(buf: PChar; len: longint; Base: Pointer): boolean; cdecl; var Call: TGetCurrentDirName; begin @@ -276,7 +276,7 @@ end; function GetProgramName(buf: PChar; len: longint): boolean; type - TGetProgramName = function(buf: PChar; len: longint; Base: Pointer): boolean; stdcall; + TGetProgramName = function(buf: PChar; len: longint; Base: Pointer): boolean; cdecl; var Call: TGetProgramName; begin @@ -286,7 +286,7 @@ end; function GetProgramDir: longint; type - TGetProgramDir = function(Base: Pointer): longint; stdcall; + TGetProgramDir = function(Base: Pointer): longint; cdecl; var Call: TGetProgramDir; begin @@ -296,7 +296,7 @@ end; function SystemTagList(command: PChar; tags: PTagItem): longint; type - TSystemTagList = function(command: PChar; tags: PTagItem; Base: Pointer): longint; stdcall; + TSystemTagList = function(command: PChar; tags: PTagItem; Base: Pointer): longint; cdecl; var Call: TSystemTagList; begin @@ -306,7 +306,7 @@ end; function LockDosList(flags: longword): PDosList; type - TLockDosList = function(flags: longword; Base: Pointer): PDosList; stdcall; + TLockDosList = function(flags: longword; Base: Pointer): PDosList; cdecl; var Call: TLockDosList; begin @@ -316,7 +316,7 @@ end; procedure UnLockDosList(flags: longword); type - TUnLockDosList = procedure(flags: longword; Base: Pointer); stdcall; + TUnLockDosList = procedure(flags: longword; Base: Pointer); cdecl; var Call: TUnLockDosList; begin @@ -326,7 +326,7 @@ end; function NextDosEntry(dlist: PDosList; flags: longword): PDosList; type - TNextDosEntry = function(dlist: PDosList; flags: longword; Base: Pointer): PDosList; stdcall; + TNextDosEntry = function(dlist: PDosList; flags: longword; Base: Pointer): PDosList; cdecl; var Call: TNextDosEntry; begin @@ -336,7 +336,7 @@ end; function MatchFirst(pat: PChar; anchor: PAnchorPath): longint; type - TMatchFirst = function(pat: PChar; anchor: PAnchorPath; Base: Pointer): longint; stdcall; + TMatchFirst = function(pat: PChar; anchor: PAnchorPath; Base: Pointer): longint; cdecl; var Call: TMatchFirst; begin @@ -346,7 +346,7 @@ end; function MatchNext(anchor: PAnchorPath): longint; type - TMatchNext = function(anchor: PAnchorPath; Base: Pointer): longint; stdcall; + TMatchNext = function(anchor: PAnchorPath; Base: Pointer): longint; cdecl; var Call: TMatchNext; begin @@ -357,7 +357,7 @@ end; procedure MatchEnd(anchor: PAnchorPath); type - TMatchEnd = procedure(anchor: PAnchorPath; Base: Pointer); stdcall; + TMatchEnd = procedure(anchor: PAnchorPath; Base: Pointer); cdecl; var Call: TMatchEnd; begin @@ -368,7 +368,7 @@ end; function GetVar(name: PChar; buffer: PChar; size: longint; flags: longword): longint; type - TGetVar = function(name: PChar; buffer: PChar; size: longint; flags: longword; Base: Pointer): longint; stdcall; + TGetVar = function(name: PChar; buffer: PChar; size: longint; flags: longword; Base: Pointer): longint; cdecl; var Call: TGetVar; begin diff --git a/rtl/aros/i386/execd.inc b/rtl/aros/i386/execd.inc index 9740ab23f9..1444cae508 100644 --- a/rtl/aros/i386/execd.inc +++ b/rtl/aros/i386/execd.inc @@ -1777,7 +1777,6 @@ const SAL_Priority = (SAL_Dummy + 2); SAL_Name = (SAL_Dummy + 3); - {$include utild2.inc} diff --git a/rtl/aros/i386/execf.inc b/rtl/aros/i386/execf.inc index a12700f6d9..429cefc052 100644 --- a/rtl/aros/i386/execf.inc +++ b/rtl/aros/i386/execf.inc @@ -25,7 +25,7 @@ end; function execAllocMem(byteSize: Cardinal; requirements: Cardinal): Pointer; type - TAllocMem = function(byteSize: Cardinal; requirements: Cardinal; Base: Pointer): Pointer; stdcall; + TAllocMem = function(byteSize: Cardinal; requirements: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TAllocMem; begin @@ -35,7 +35,7 @@ end; procedure execFreeMem(memoryBlock: Pointer; byteSize: Cardinal); type - TFreeMem = function(memoryBlock: Pointer; byteSize: Cardinal; Base: Pointer): Pointer; stdcall; + TFreeMem = function(memoryBlock: Pointer; byteSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TFreeMem; begin @@ -45,7 +45,7 @@ end; function FindTask(name: PChar): PTask; type - TFindTask = function(name: PChar; Base: Pointer): PTask; stdcall; + TFindTask = function(name: PChar; Base: Pointer): PTask; cdecl; var Call: TFindTask; begin @@ -55,7 +55,7 @@ end; function SetSignal(newSignals: Cardinal; signalSet : Cardinal): Cardinal; type - TSetSignal = function(newSignals: Cardinal; signalSet : Cardinal; Base: Pointer): Cardinal; stdcall; + TSetSignal = function(newSignals: Cardinal; signalSet : Cardinal; Base: Pointer): Cardinal; cdecl; var Call: TSetSignal; begin @@ -65,7 +65,7 @@ end; function AllocSignal(signalNum: LongInt): ShortInt; type - TAllocSignal = function(signalNum: LongInt; Base: Pointer): ShortInt; stdcall; + TAllocSignal = function(signalNum: LongInt; Base: Pointer): ShortInt; cdecl; var Call: TAllocSignal; begin @@ -75,7 +75,7 @@ end; procedure FreeSignal(signalNum: LongInt); type - TFreeSignal = procedure(signalNum: LongInt; Base: Pointer); stdcall; + TFreeSignal = procedure(signalNum: LongInt; Base: Pointer); cdecl; var Call: TFreeSignal; begin @@ -85,7 +85,7 @@ end; procedure AddPort(port: PMsgPort); type - TAddPort = procedure(port: PMsgPort; Base: Pointer); stdcall; + TAddPort = procedure(port: PMsgPort; Base: Pointer); cdecl; var Call: TAddPort; begin @@ -95,7 +95,7 @@ end; procedure RemPort(port: PMsgPort); type - TRemPort = procedure(port: PMsgPort; Base: Pointer); stdcall; + TRemPort = procedure(port: PMsgPort; Base: Pointer); cdecl; var Call: TRemPort; begin @@ -105,7 +105,7 @@ end; function GetMsg(port: PMsgPort): PMessage; type - TGetMsg = function(port: PMsgPort; Base: Pointer): PMessage; stdcall; + TGetMsg = function(port: PMsgPort; Base: Pointer): PMessage; cdecl; var Call: TGetMsg; begin @@ -115,7 +115,7 @@ end; procedure ReplyMsg(message : pMessage); type - TLocalCall = procedure(message : pMessage; LibBase: Pointer); stdcall; + TLocalCall = procedure(message : pMessage; LibBase: Pointer); cdecl; var Call: TLocalCall; begin @@ -125,7 +125,7 @@ end; function WaitPort(port: PMsgPort): PMessage; type - TWaitPort = function(port: PMsgPort; Base: Pointer): PMessage; stdcall; + TWaitPort = function(port: PMsgPort; Base: Pointer): PMessage; cdecl; var Call: TWaitPort; begin @@ -135,7 +135,7 @@ end; procedure CloseLibrary(libHandle: PLibrary); type - TCloseLibrary = procedure(libHandle: PLibrary; Base: Pointer); stdcall; + TCloseLibrary = procedure(libHandle: PLibrary; Base: Pointer); cdecl; var Call: TCloseLibrary; begin @@ -145,7 +145,7 @@ end; function OpenDevice(devName: PChar; numunit: Cardinal; ioRequest: pIORequest; flags: Cardinal): ShortInt; type - TOpenDevice = function(devName: PChar; numunit: Cardinal; ioRequest: pIORequest; flags: Cardinal; Base: Pointer): ShortInt; stdcall; + TOpenDevice = function(devName: PChar; numunit: Cardinal; ioRequest: pIORequest; flags: Cardinal; Base: Pointer): ShortInt; cdecl; var Call: TOpenDevice; begin @@ -155,7 +155,7 @@ end; procedure CloseDevice(ioRequest: PIORequest); type - TCloseDevice = procedure(ioRequest: PIORequest; Base: Pointer); stdcall; + TCloseDevice = procedure(ioRequest: PIORequest; Base: Pointer); cdecl; var Call: TCloseDevice; begin @@ -165,7 +165,7 @@ end; function DoIO(ioRequest: PIORequest): ShortInt; type - TDoIO = function(ioRequest: PIORequest; Base: Pointer): ShortInt; stdcall; + TDoIO = function(ioRequest: PIORequest; Base: Pointer): ShortInt; cdecl; var Call: TDoIO; begin @@ -175,7 +175,7 @@ end; function OpenLibrary(libname: PChar; libver : Cardinal): Pointer; type - TOpenLibrary = function(libname: PChar; libver : Cardinal; Base: Pointer): Pointer; stdcall; + TOpenLibrary = function(libname: PChar; libver : Cardinal; Base: Pointer): Pointer; cdecl; var Call: TOpenLibrary; begin @@ -185,7 +185,7 @@ end; function CreatePool(requirements: Cardinal; puddleSize: Cardinal; threshSize: Cardinal): Pointer; type - TCreatePool = function(requirements: Cardinal; puddleSize: Cardinal; threshSize: Cardinal; Base: Pointer): Pointer; stdcall; + TCreatePool = function(requirements: Cardinal; puddleSize: Cardinal; threshSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TCreatePool; begin @@ -195,7 +195,7 @@ end; procedure DeletePool(poolHeader: Pointer); type - TDeletePool = procedure(poolHeader: Pointer; Base: Pointer); stdcall; + TDeletePool = procedure(poolHeader: Pointer; Base: Pointer); cdecl; var Call: TDeletePool; begin @@ -205,7 +205,7 @@ end; function AllocPooled(poolHeader: Pointer; memSize: Cardinal): Pointer; type - TAllocPooled = function (poolHeader: Pointer; memSize: Cardinal; Base: Pointer): Pointer; stdcall; + TAllocPooled = function (poolHeader: Pointer; memSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TAllocPooled; begin @@ -215,7 +215,7 @@ end; function FreePooled(poolHeader: Pointer; memory: Pointer; memSize: Cardinal): Pointer; type - TFreePooled = function (poolHeader: Pointer; memory: Pointer; memSize: Cardinal; Base: Pointer): Pointer; stdcall; + TFreePooled = function (poolHeader: Pointer; memory: Pointer; memSize: Cardinal; Base: Pointer): Pointer; cdecl; var Call: TFreePooled; begin @@ -223,3 +223,14 @@ begin FreePooled := Call(poolHeader, memory, memSize, LocalExecBase); end; +//function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer; +function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : POINTER; putChData : POINTER): pointer; +type + TLocalCall = function(const formatString : pCHAR;const dataStream : POINTER; putChProc : Pointer; putChData : POINTER; LibBase: Pointer): pointer; stdcall; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LocalExecBase, 87)); + RawDoFmt := Call(formatString, dataStream, putChProc, putChData, AOS_ExecBase); +end; + diff --git a/rtl/aros/i386/prt0.as b/rtl/aros/i386/prt0.as index 6587979786..a53b8d886d 100644 --- a/rtl/aros/i386/prt0.as +++ b/rtl/aros/i386/prt0.as @@ -10,64 +10,65 @@ _start: start: - /* Save stack pointer for exit() routine */ - movl %esp,STKPTR - /* Save the exec library base */ movl 12(%esp), %ecx movl %ecx, _ExecBase /* Save the command line pointer length to CommandLineLen */ - #movl 8(%esp),%ecx - #movl %ecx,CommandLineLen + movl 8(%esp),%ecx + movl %ecx,CommandLineLen /* Save the command line pointer to CommandLine */ - #movl 4(%esp),%eax - #movl %eax,CommandLine - #movl (%esp),%eax - #movl %eax,__ARGS - #test %eax,%eax - #jz .Ldont_nullit - - - /* Remove $0a character from end of string */ - #cmpb #0x0a,-1(%eax+%ecx:w) - #jne .Lcontt - - /* Decrement count by one to remove the $0a character */ - #subl #1,%ecx - -#.Lcontt: -# movb #0,0(%eax+%ecx:w) /* null terminate it */ -# movw %ecx,__ARGC - -.Ldont_nullit: - call PASCALMAIN + movl 4(%esp),%eax + movl %eax,CommandLine + + /* save all register */ + pushal + + /* Save stack pointer for exit() routine */ + movl %esp,STKPTR + + call PASCALMAIN + /* if returns from here set an empty returncode */ + xorl %eax, %eax + pushl %eax + pushl %eax + + + /* entry for stop the program*/ _haltproc: haltproc: + + /* get retun code from stack */ + movl 4(%esp),%eax + + /* save for later use */ + movl %eax,_returncode + + /* get back my stack */ movl STKPTR,%esp - movl _returncode,%eax + + /* get back all registers */ + popal + + /* reset returncode */ + movl _returncode, %eax + + /* bye bye */ ret /*----------------------------------------------------*/ .data - .global _returncode # return code to set on exit - .global __ARGS # pointer to the arguments - .global __ARGC # number of arguments .global CommandLineLen # byte length of command line - .global CommandLine # + .global CommandLine # comandline as PChar .global STKPTR # Used to terminate the program, initial SP .global _ExecBase # exec library base - .align 4 - _returncode: .long 0 - __ARGS: .long 0 - __ARGC: .word 0 +_returncode: .long 0 CommandLine: .long 0 CommandLineLen: .long 0 STKPTR: .long 0 _ExecBase: .long 0 - diff --git a/rtl/aros/i386/utilf.inc b/rtl/aros/i386/utilf.inc index 2d8851fabc..d151ffa413 100644 --- a/rtl/aros/i386/utilf.inc +++ b/rtl/aros/i386/utilf.inc @@ -15,7 +15,7 @@ procedure Amiga2Date(date_amiga: longword; cd: PClockData); type - TAmiga2Date = procedure(date_amiga: longword; cd: PClockData; Base: Pointer); stdcall; + TAmiga2Date = procedure(date_amiga: longword; cd: PClockData; Base: Pointer); cdecl; var Call: TAmiga2Date; begin @@ -25,7 +25,7 @@ end; function Date2Amiga(date: PClockData): longword; type - TDate2Amiga = function(date: PClockData; Base: Pointer): longword; stdcall; + TDate2Amiga = function(date: PClockData; Base: Pointer): longword; cdecl; var Call: TDate2Amiga; begin diff --git a/rtl/aros/inputevent.pas b/rtl/aros/inputevent.pas new file mode 100644 index 0000000000..4334950e05 --- /dev/null +++ b/rtl/aros/inputevent.pas @@ -0,0 +1,285 @@ +{ + 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 + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +unit inputevent; + +INTERFACE + +uses exec, utility, timer; + +const + +{------ constants -------------------------------------------------} + +{ --- InputEvent.ie_Class --- } +{ A NOP input event } + IECLASS_NULL = $00; +{ A raw keycode from the keyboard device } + IECLASS_RAWKEY = $01; +{ The raw mouse report from the game port device } + IECLASS_RAWMOUSE = $02; +{ A private console event } + IECLASS_EVENT = $03; +{ A Pointer Position report } + IECLASS_POINTERPOS = $04; +{ A timer event } + IECLASS_TIMER = $06; +{ select button pressed down over a Gadget (address in ie_EventAddress) } + IECLASS_GADGETDOWN = $07; +{ select button released over the same Gadget (address in ie_EventAddress) } + IECLASS_GADGETUP = $08; +{ some Requester activity has taken place. See Codes REQCLEAR and REQSET } + IECLASS_REQUESTER = $09; +{ this is a Menu Number transmission (Menu number is in ie_Code) } + IECLASS_MENULIST = $0A; +{ User has selected the active Window's Close Gadget } + IECLASS_CLOSEWINDOW = $0B; +{ this Window has a new size } + IECLASS_SIZEWINDOW = $0C; +{ the Window pointed to by ie_EventAddress needs to be refreshed } + IECLASS_REFRESHWINDOW = $0D; +{ new preferences are available } + IECLASS_NEWPREFS = $0E; +{ the disk has been removed } + IECLASS_DISKREMOVED = $0F; +{ the disk has been inserted } + IECLASS_DISKINSERTED = $10; +{ the window is about to be been made active } + IECLASS_ACTIVEWINDOW = $11; +{ the window is about to be made inactive } + IECLASS_INACTIVEWINDOW = $12; +{ extended-function pointer position report (V36) } + IECLASS_NEWPOINTERPOS = $13; +{ Help key report during Menu session (V36) } + IECLASS_MENUHELP = $14; +{ the Window has been modified with move, size, zoom, or change (V36) } + IECLASS_CHANGEWINDOW = $15; + + + +{ the last class } + + IECLASS_MAX = $15; + +{ --- InputEvent.ie_SubClass --- } +{ IECLASS_NEWPOINTERPOS } +{ like IECLASS_POINTERPOS } + IESUBCLASS_COMPATIBLE = $00; +{ ie_EventAddress points to struct IEPointerPixel } + IESUBCLASS_PIXEL = $01; +{ ie_EventAddress points to struct IEPointerTablet } + IESUBCLASS_TABLET = $02; + +{ pointed to by ie_EventAddress for IECLASS_NEWPOINTERPOS, + * and IESUBCLASS_PIXEL. + * + * You specify a screen and pixel coordinates in that screen + * at which you'd like the mouse to be positioned. + * Intuition will try to oblige, but there will be restrictions + * to positioning the pointer over offscreen pixels. + * + * IEQUALIFIER_RELATIVEMOUSE is supported for IESUBCLASS_PIXEL. + } +Type + + pIEPointerPixel = ^tIEPointerPixel; + tIEPointerPixel = record + iepp_Screen : Pointer; { pointer to an open screen } + iepp_Position : record + x,y : smallint; + end; + END; + +{ pointed to by ie_EventAddress for IECLASS_NEWPOINTERPOS, + * and IESUBCLASS_TABLET. + * + * You specify a range of values and a value within the range + * independently for each of X and Y (the minimum value of + * the ranges is always normalized to 0). + * + * Intuition will position the mouse proportionally within its + * natural mouse position rectangle limits. + * + * IEQUALIFIER_RELATIVEMOUSE is not supported for IESUBCLASS_TABLET. + } + + pIEPointerTablet = ^tIEPointerTablet; + tIEPointerTablet = record + iept_Range : record { 0 is min, these are max } + x,y : Word; + end; + iept_Value : record { between 0 AND iept_Range } + x,y : Word; + end; + iept_Pressure : Word; { -128 to 127 (unused, set to 0) } + END; + +{ The ie_EventAddress of an IECLASS_NEWPOINTERPOS event of subclass + * IESUBCLASS_NEWTABLET points at an IENewTablet structure. + * + * + * IEQUALIFIER_RELATIVEMOUSE is not supported for IESUBCLASS_NEWTABLET. + } + + pIENewTablet = ^tIENewTablet; + tIENewTablet = record + { Pointer to a hook you wish to be called back through, in + * order to handle scaling. You will be provided with the + * width and height you are expected to scale your tablet + * to, perhaps based on some user preferences. + * If NULL, the tablet's specified range will be mapped directly + * to that width and height for you, and you will not be + * called back. + } + ient_CallBack : pHook; + + { Post-scaling coordinates and fractional coordinates. + * DO NOT FILL THESE IN AT THE TIME THE EVENT IS WRITTEN! + * Your driver will be called back and provided information + * about the width and height of the area to scale the + * tablet into. It should scale the tablet coordinates + * (perhaps based on some preferences controlling aspect + * ratio, etc.) and place the scaled result into these + * fields. The ient_ScaledX and ient_ScaledY fields are + * in screen-pixel resolution, but the origin ( [0,0]-point ) + * is not defined. The ient_ScaledXFraction and + * ient_ScaledYFraction fields represent sub-pixel position + * information, and should be scaled to fill a UWORD fraction. + } + ient_ScaledX, ient_ScaledY, + ient_ScaledXFraction, ient_ScaledYFraction : WORD; + + { Current tablet coordinates along each axis: } + ient_TabletX, ient_TabletY : ULONG; + + { Tablet range along each axis. For example, if ient_TabletX + * can take values 0-999, ient_RangeX should be 1000. + } + ient_RangeX, ient_RangeY : ULONG; + + { Pointer to tag-list of additional tablet attributes. + * See for the tag values. + } + ient_TagList : pTagItem; + end; + + +CONST +{ --- InputEvent.ie_Code --- } +{ IECLASS_RAWKEY } + IECODE_UP_PREFIX = $80; + IECODE_KEY_CODE_FIRST = $00; + IECODE_KEY_CODE_LAST = $77; + IECODE_COMM_CODE_FIRST = $78; + IECODE_COMM_CODE_LAST = $7F; + +{ IECLASS_ANSI } + IECODE_C0_FIRST = $00; + IECODE_C0_LAST = $1F; + IECODE_ASCII_FIRST = $20; + IECODE_ASCII_LAST = $7E; + IECODE_ASCII_DEL = $7F; + IECODE_C1_FIRST = $80; + IECODE_C1_LAST = $9F; + IECODE_LATIN1_FIRST = $A0; + IECODE_LATIN1_LAST = $FF; + +{ IECLASS_RAWMOUSE } + IECODE_LBUTTON = $68; { also uses IECODE_UP_PREFIX } + IECODE_RBUTTON = $69; + IECODE_MBUTTON = $6A; + IECODE_NOBUTTON = $FF; + +{ IECLASS_EVENT } + IECODE_NEWACTIVE = $01; { active input window changed } + IECODE_NEWSIZE = $02; { resize of window } + IECODE_REFRESH = $03; { refresh of window } + +{ IECLASS_REQUESTER Codes } +{ REQSET is broadcast when the first Requester (not subsequent ones) opens + * in the Window + } + IECODE_REQSET = $01; +{ REQCLEAR is broadcast when the last Requester clears out of the Window } + IECODE_REQCLEAR = $00; + + +{ --- InputEvent.ie_Qualifier --- } + IEQUALIFIER_LSHIFT = $0001; + IEQUALIFIER_RSHIFT = $0002; + IEQUALIFIER_CAPSLOCK = $0004; + IEQUALIFIER_CONTROL = $0008; + IEQUALIFIER_LALT = $0010; + IEQUALIFIER_RALT = $0020; + IEQUALIFIER_LCOMMAND = $0040; + IEQUALIFIER_RCOMMAND = $0080; + IEQUALIFIER_NUMERICPAD = $0100; + IEQUALIFIER_REPEAT = $0200; + IEQUALIFIER_INTERRUPT = $0400; + IEQUALIFIER_MULTIBROADCAST = $0800; + IEQUALIFIER_MIDBUTTON = $1000; + IEQUALIFIER_RBUTTON = $2000; + IEQUALIFIER_LEFTBUTTON = $4000; + IEQUALIFIER_RELATIVEMOUSE = $8000; + + IEQUALIFIERB_LSHIFT = 0; + IEQUALIFIERB_RSHIFT = 1; + IEQUALIFIERB_CAPSLOCK = 2; + IEQUALIFIERB_CONTROL = 3; + IEQUALIFIERB_LALT = 4; + IEQUALIFIERB_RALT = 5; + IEQUALIFIERB_LCOMMAND = 6; + IEQUALIFIERB_RCOMMAND = 7; + IEQUALIFIERB_NUMERICPAD = 8; + IEQUALIFIERB_REPEAT = 9; + IEQUALIFIERB_INTERRUPT = 10; + IEQUALIFIERB_MULTIBROADCAST = 11; + IEQUALIFIERB_MIDBUTTON = 12; + IEQUALIFIERB_RBUTTON = 13; + IEQUALIFIERB_LEFTBUTTON = 14; + IEQUALIFIERB_RELATIVEMOUSE = 15; + + +{------ InputEvent ------------------------------------------------} + + type + pInputEvent = ^tInputEvent; + tInputEvent = record + ie_NextEvent : pInputEvent; + ie_Class : BYTE; + ie_SubClass : BYTE; + ie_Code : WORD; + ie_Qualifier : WORD; + ie_position : record + case longint of + 0 : ( ie_xy : record + ie_x : smallint; + ie_y : smallint; + end ); + 1 : ( ie_addr : APTR ); + 2 : ( ie_dead : record + ie_prev1DownCode : BYTE; + ie_prev1DownQual : BYTE; + ie_prev2DownCode : BYTE; + ie_prev2DownQual : BYTE; + end ); + end; + ie_TimeStamp : tTimeVal; + end; + +IMPLEMENTATION + +end. diff --git a/rtl/aros/intuition.pas b/rtl/aros/intuition.pas new file mode 100644 index 0000000000..f0986ced48 --- /dev/null +++ b/rtl/aros/intuition.pas @@ -0,0 +1,6090 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + + +{ + History: + Changed tNewWindow.MaxHeigth and tNewWindow.MaxWidth + from Word to Integer. + 30 May 2000. + + Added overlay functions for Pchar->Strings, functions + and procedures. + 14 Jul 2000. + + Added functions and procedures with array of const. + For use with fpc 1.0.7 They are in systemvartags. + 05 Nov 2002. + + Removed amigaoverlays, use smartlink instead. + 05 Nov 2002. + + Added the define use_amiga_smartlink. + 13 Jan 2003. + + Update for AmigaOS 3.9. + New consts and new records. + 04 Feb 2003. + + Changed integer > smallint. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se Nils Sjoholm + +} + +unit intuition; + +{$mode objfpc} + +interface + +uses + Exec, Utility, agraphics, inputevent, timer, layers; + +//uses exec, graphics, utility, inputevent, timer, layers; + +{ + * NOTE: intuition/iobsolete.h is included at the END of this file! + } +{ ======================================================================== } +{ === IntuiText ========================================================== } +{ ================================= ======================================= } +{ IntuiText is a series of strings that start with a screen location + * (always relative to the upper-left corner of something) and then the + * text of the string. The text is null-terminated. + } +type + PIntuiText = ^TIntuiText; + + TIntuiText = record + FrontPen, + BackPen: Byte; { the pen numbers for the rendering } + DrawMode: Byte; { the mode for rendering the text } + LeftEdge: SmallInt; { relative start location for the text } + TopEdge: SmallInt; { relative start location for the text } + ITextFont: PTextAttr; { if NULL, you accept the default } + IText: PChar; { pointer to null-terminated text } + NextText: PIntuiText; { continuation to TxWrite another text } + end; + + + +{ ======================================================================== } +{ === Border ============================================================= } +{ ======================================================================== } +{ Data type Border, used for drawing a series of lines which is intended for + * use as a border drawing, but which may, in fact, be used to render any + * arbitrary vector shape. + * The routine DrawBorder sets up the RastPort with the appropriate + * variables, then does a Move to the first coordinate, then does Draws + * to the subsequent coordinates. + * After all the Draws are done, if NextBorder is non-zero we call DrawBorder + * recursively + } +type + PBorder = ^TBorder; + + TBorder = record + LeftEdge, + TopEdge: SmallInt; { initial offsets from the origin } + FrontPen, + BackPen: Byte; { pens numbers for rendering } + DrawMode: Byte; { mode for rendering } + Count: ShortInt; { number of XY pairs } + XY: Pointer; { vector coordinate pairs rel to LeftTop} + NextBorder: PBorder; { pointer to any other Border too } + end; + +{ ======================================================================== } +{ === MenuItem =========================================================== } +{ ======================================================================== } + +type + + PMenuItem = ^TMenuItem; + + TMenuItem = record + NextItem: PMenuItem; { pointer to next in chained list } + LeftEdge, + TopEdge: SmallInt; { position of the select box } + Width, + Height: SmallInt; { dimensions of the select box } + Flags: Word; { see the defines below } + + MutualExclude: LongInt; { set bits mean this item excludes that } + + ItemFill: Pointer; { points to Image, IntuiText, or NULL } + + { when this item is pointed to by the cursor and the items highlight + * mode HIGHIMAGE is selected, this alternate image will be displayed + } + + SelectFill: Pointer; { points to Image, IntuiText, or NULL } + + Command: Char; { only if appliprog sets the COMMSEQ flag } + + SubItem: PMenuItem; { if non-zero, DrawMenu shows "->" } + + { The NextSelect field represents the menu number of next selected + * item (when user has drag-selected several items) + } + + NextSelect: Word; + end; + + +const + + { FLAGS SET BY THE APPLIPROG } + CHECKIT = $0001; { whether to check this item if selected } + ITEMTEXT = $0002; { set if textual, clear if graphical item } + COMMSEQ = $0004; { set if there's an command sequence } + MENUTOGGLE = $0008; { set to toggle the check of a menu item } + ITEMENABLED = $0010; { set if this item is enabled } + + { these are the SPECIAL HIGHLIGHT FLAG state meanings } + HIGHFLAGS = $00C0; { see definitions below for these bits } + HIGHIMAGE = $0000; { use the user's "select image" } + HIGHCOMP = $0040; { highlight by complementing the selectbox } + HIGHBOX = $0080; { highlight by "boxing" the selectbox } + HIGHNONE = $00C0; { don't highlight } + + { FLAGS SET BY BOTH APPLIPROG AND INTUITION } + Checked = $0100; { if CHECKIT, then set this when selected } + + { FLAGS SET BY INTUITION } + ISDRAWN = $1000; { this item's subs are currently drawn } + HIGHITEM = $2000; { this item is currently highlighted } + MENUTOGGLED = $4000; { this item was already toggled } + + +{ ======================================================================== } +{ === Menu =============================================================== } +{ ======================================================================== } +type + + PMenu = ^TMenu; + + TMenu = record + NextMenu: PMenu; { same level } + LeftEdge, + TopEdge: SmallInt; { position of the select box } + Width, + Height: SmallInt; { dimensions of the select box } + Flags: Word; { see flag definitions below } + MenuName: PChar; { text for this Menu Header } + FirstItem: PMenuItem; { pointer to first in chain } + + { these mysteriously-named variables are for internal use only } + + JazzX, + JazzY, + BeatX, + BeatY: SmallInt; + end; + +const + { FLAGS SET BY BOTH THE APPLIPROG AND INTUITION } + MENUENABLED = $0001; { whether or not this menu is enabled } + + { FLAGS SET BY INTUITION } + MIDRAWN = $0100; { this menu's items are currently drawn } + + +{ ======================================================================== } +{ === Gadget ============================================================= } +{ ======================================================================== } + +type + + PGadget = ^TGadget; + + TGadget = record + NextGadget: PGadget; { next gadget in the list } + + LeftEdge, + TopEdge: SmallInt; { "hit box" of gadget } + Width, + Height: SmallInt; { "hit box" of gadget } + + Flags: Word; { see below for list of defines } + + Activation: Word; { see below for list of defines } + + GadgetType: Word; { see below for defines } + + { appliprog can specify that the Gadget be rendered as either as Border + * or an Image. This variable points to which (or equals NULL if there's + * nothing to be rendered about this Gadget) + } + + GadgetRender: Pointer; + + { appliprog can specify "highlighted" imagery rather than algorithmic + * this can point to either Border or Image data + } + + SelectRender: Pointer; + + GadgetText: PIntuiText; { text for this gadget } + + { by using the MutualExclude Word, the appliprog can describe + * which gadgets mutually-exclude which other ones. The bits + * in MutualExclude correspond to the gadgets in object containing + * the gadget list. If this gadget is selected and a bit is set + * in this gadget's MutualExclude and the gadget corresponding to + * that bit is currently selected (e.g. bit 2 set and gadget 2 + * is currently selected) that gadget must be unselected. + * Intuition does the visual unselecting (with checkmarks) and + * leaves it up to the program to unselect internally + } + + MutualExclude: LongInt; + { set bits mean this gadget excludes that gadget } + + { pointer to a structure of special data required by Proportional, + * String and LongInt Gadgets + } + + SpecialInfo: Pointer; + + GadgetID: Word; { user-definable ID field } + UserData: Pointer; + { ptr to general purpose User data (ignored by In) } + end; + + PExtGadget = ^TExtGadget; + + TExtGadget = record + { The first fields match struct Gadget exactly } + NextGadget: PExtGadget; { Matches struct Gadget } + LeftEdge, TopEdge, { Matches struct Gadget } + Width, Height: SmallInt; { Matches struct Gadget } + Flags, { Matches struct Gadget } + Activation, { Matches struct Gadget } + GadgetType: Word; { Matches struct Gadget } + GadgetRender, { Matches struct Gadget } + SelectRender: Pointer; { Matches struct Gadget } + GadgetText: PIntuiText; { Matches struct Gadget } + MutualExclude: LongInt; { Matches struct Gadget } + SpecialInfo: Pointer; { Matches struct Gadget } + GadgetID: Word; { Matches struct Gadget } + UserData: Pointer; { Matches struct Gadget } + + { These fields only exist under V39 and only if GFLG_EXTENDED is set } + MoreFlags: LongWord; { see GMORE_ flags below } + BoundsLeftEdge, { Bounding extent for gadget, valid } + BoundsTopEdge, { only if GMORE_BOUNDS is set. The } + BoundsWidth, { GFLG_RELxxx flags affect these } + BoundsHeight: SmallInt; { coordinates as well. } + end; + + +const + { --- Gadget.Flags values --- } + { combinations in these bits describe the highlight technique to be used } + GFLG_GADGHIGHBITS = $0003; + GFLG_GADGHCOMP = $0000; { Complement the select box } + GFLG_GADGHBOX = $0001; { Draw a box around the image } + GFLG_GADGHIMAGE = $0002; { Blast in this alternate image } + GFLG_GADGHNONE = $0003; { don't highlight } + + GFLG_GADGIMAGE = $0004; { set IF GadgetRender AND SelectRender + * point to an Image structure, clear + * if they point to Border structures + } + +{ combinations in these next two bits specify to which corner the gadget's + * Left & Top coordinates are relative. If relative to Top/Left, + * these are "normal" coordinates (everything is relative to something in + * this universe). + * + * Gadget positions and dimensions are relative to the window or + * requester which contains the gadget + } + GFLG_RELBOTTOM = $0008; { vert. pos. is relative to bottom edge } + GFLG_RELRIGHT = $0010; { horiz. pos. is relative to right edge } + GFLG_RELWIDTH = $0020; { width is relative to req/window } + GFLG_RELHEIGHT = $0040; { height is relative to req/window } + +{ New for V39: GFLG_RELSPECIAL allows custom gadget implementors to + * make gadgets whose position and size depend in an arbitrary way + * on their window's dimensions. The GM_LAYOUT method will be invoked + * for such a gadget (or any other GREL_xxx gadget) at suitable times, + * such as when the window opens or the window's size changes. + } + GFLG_RELSPECIAL = $4000; { custom gadget has special relativity. + * Gadget box values are absolutes, but + * can be changed via the GM_LAYOUT method. + } + + GFLG_SELECTED = $0080; { you may initialize AND look at this } + +{ the GFLG_DISABLED flag is initialized by you and later set by Intuition + * according to your calls to On/OffGadget(). It specifies whether or not + * this Gadget is currently disabled from being selected + } + GFLG_DISABLED = $0100; + +{ These flags specify the type of text field that Gadget.GadgetText + * points to. In all normal (pre-V36) gadgets which you initialize + * this field should always be zero. Some types of gadget objects + * created from classes will use these fields to keep track of + * types of labels/contents that different from IntuiText, but are + * stashed in GadgetText. + } + + GFLG_LABELMASK = $3000; + GFLG_LABELITEXT = $0000; { GadgetText points to IntuiText } + GFLG_LABELSTRING = $1000; { GadgetText points to (UBYTE * ) } + GFLG_LABELIMAGE = $2000; { GadgetText points to Image (object) } + + { New for V37: GFLG_TABCYCLE } + GFLG_TABCYCLE = $0200; { (string OR custom) gadget participates in + * cycling activation with Tab or Shift-Tab + } +{ New for V37: GFLG_STRINGEXTEND. We discovered that V34 doesn't properly + * ignore the value we had chosen for the Gadget->Activation flag + * GACT_STRINGEXTEND. NEVER SET THAT FLAG WHEN RUNNING UNDER V34. + * The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is + * safe under V34, and equivalent to GACT_STRINGEXTEND under V37. + * (Note that the two flags are not numerically equal) + } + GFLG_STRINGEXTEND = $0400; { this String Gadget has StringExtend } + +{ New for V39: GFLG_IMAGEDISABLE. This flag is automatically set if + * the custom image of this gadget knows how to do disabled rendering + * (more specifically, if its IA_SupportsDisable attribute is TRUE). + * Intuition uses this to defer the ghosting to the image-class, + * instead of doing it itself (the old compatible way). + * Do not set this flag yourself - Intuition will do it for you. + } + + GFLG_IMAGEDISABLE = $0800; { Gadget's image knows how to do disabled + * rendering + } + +{ New for V39: If set, this bit means that the Gadget is actually + * a struct ExtGadget, with new fields and flags. All V39 boopsi + * gadgets are ExtGadgets. Never ever attempt to read the extended + * fields of a gadget if this flag is not set. + } + GFLG_EXTENDED = $8000; { Gadget is extended } + + { --- Gadget.Activation flag values --- } +{ Set GACT_RELVERIFY if you want to verify that the pointer was still over + * the gadget when the select button was released. Will cause + * an IDCMP_GADGETUP message to be sent if so. + } + GACT_RELVERIFY = $0001; + +{ the flag GACT_IMMEDIATE, when set, informs the caller that the gadget + * was activated when it was activated. This flag works in conjunction with + * the GACT_RELVERIFY flag + } + GACT_IMMEDIATE = $0002; + +{ the flag GACT_ENDGADGET, when set, tells the system that this gadget, + * when selected, causes the Requester to be ended. Requesters + * that are ended are erased and unlinked from the system. + } + GACT_ENDGADGET = $0004; + +{ the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive + * reports on mouse movements while this gadget is active. + * You probably want to set the GACT_IMMEDIATE flag when using + * GACT_FOLLOWMOUSE, since that's the only reasonable way you have of + * learning why Intuition is suddenly sending you a stream of mouse + * movement events. If you don't set GACT_RELVERIFY, you'll get at + * least one Mouse Position event. + } + GACT_FOLLOWMOUSE = $0008; + +{ if any of the BORDER flags are set in a Gadget that's included in the + * Gadget list when a Window is opened, the corresponding Border will + * be adjusted to make room for the Gadget + } + GACT_RIGHTBORDER = $0010; + GACT_LEFTBORDER = $0020; + GACT_TOPBORDER = $0040; + GACT_BOTTOMBORDER = $0080; + GACT_BORDERSNIFF = $8000; { neither set nor rely on this bit } + + GACT_TOGGLESELECT = $0100; { this bit for toggle-select mode } + GACT_BOOLEXTEND = $2000; { this Boolean Gadget has a BoolInfo } + + { should properly be in StringInfo, but aren't } + GACT_STRINGLEFT = $0000; { NOTE WELL: that this has value zero } + GACT_STRINGCENTER = $0200; + GACT_STRINGRIGHT = $0400; + GACT_LONGINT = $0800; { this String Gadget is for Long Ints } + GACT_ALTKEYMAP = $1000; { this String has an alternate keymap } + GACT_STRINGEXTEND = $2000; { this String Gadget has StringExtend } + { NOTE: NEVER SET GACT_STRINGEXTEND IF YOU + * ARE RUNNING ON LESS THAN V36! SEE + * GFLG_STRINGEXTEND (ABOVE) INSTEAD + } + + GACT_ACTIVEGADGET = $4000; { this gadget is "active". This flag + * is maintained by Intuition, and you + * cannot count on its value persisting + * while you do something on your program's + * task. It can only be trusted by + * people implementing custom gadgets + } + +{ note $8000 is used above (GACT_BORDERSNIFF); + * all Activation flags defined } + + { --- GADGET TYPES ------------------------------------------------------- } +{ These are the Gadget type definitions for the variable GadgetType + * gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED. + * first comes the mask for Gadget flags reserved for Gadget typing + } + GTYP_GADGETTYPE = $FC00; { all Gadget Global type flags (padded) } + GTYP_SYSGADGET = $8000; { 1 = Allocated by the system, 0 = by app. } + GTYP_SCRGADGET = $4000; { 1 = ScreenGadget, 0 = WindowGadget } + GTYP_GZZGADGET = $2000; { 1 = for WFLG_GIMMEZEROZERO borders } + GTYP_REQGADGET = $1000; { 1 = this is a Requester Gadget } + { system gadgets } + GTYP_SIZING = $0010; + GTYP_WDRAGGING = $0020; + GTYP_SDRAGGING = $0030; + GTYP_WUPFRONT = $0040; + GTYP_SUPFRONT = $0050; + GTYP_WDOWNBACK = $0060; + GTYP_SDOWNBACK = $0070; + GTYP_CLOSE = $0080; + { application gadgets } + GTYP_BOOLGADGET = $0001; + GTYP_GADGET0002 = $0002; + GTYP_PROPGADGET = $0003; + GTYP_STRGADGET = $0004; + GTYP_CUSTOMGADGET = $0005; + + +{* GTYP_GTYPEMASK is a mask you can apply to tell what class + * of gadget this is. The possible classes follow. + *} + GTYP_GTYPEMASK = $0007; + +{ This bit in GadgetType is reserved for undocumented internal use + * by the Gadget Toolkit, and cannot be used nor relied on by + * applications: $0100; + } + +{ New for V39. Gadgets which have the GFLG_EXTENDED flag set are + * actually ExtGadgets, which have more flags. The GMORE_xxx + * identifiers describe those flags. For GMORE_SCROLLRASTER, see + * important information in the ScrollWindowRaster() autodoc. + * NB: GMORE_SCROLLRASTER must be set before the gadget is + * added to a window. + } + GMORE_BOUNDS = $00000001; { ExtGadget has valid Bounds } + GMORE_GADGETHELP = $00000002; { This gadget responds to gadget help } + GMORE_SCROLLRASTER = $00000004; { This (custom) gadget uses ScrollRaster } + +{ ======================================================================== } +{ === BoolInfo======================================================= } +{ ======================================================================== } +{ This is the special data needed by an Extended Boolean Gadget + * Typically this structure will be pointed to by the Gadget field SpecialInfo + } +type + PBoolInfo = ^TBoolInfo; + + TBoolInfo = record + Flags: Word; { defined below } + Mask: Pointer; { bit mask for highlighting and selecting + * mask must follow the same rules as an Image + * plane. It's width and height are determined + * by the width and height of the gadget's + * select box. (i.e. Gadget.Width and .Height). + } + Reserved: LongWord; { set to 0 } + end; + +const + +{ set BoolInfo.Flags to this flag bit. + * in the future, additional bits might mean more stuff hanging + * off of BoolInfo.Reserved. +} + BOOLMASK = $0001; { extension is for masked gadget } + +{ ======================================================================== } +{ === PropInfo =========================================================== } +{ ======================================================================== } +{ this is the special data required by the proportional Gadget + * typically, this data will be pointed to by the Gadget variable SpecialInfo + } + +type + + PPropInfo = ^TPropInfo; + + TPropInfo = record + Flags: Word; { general purpose flag bits (see defines below) } + + { You initialize the Pot variables before the Gadget is added to + * the system. Then you can look here for the current settings + * any time, even while User is playing with this Gadget. To + * adjust these after the Gadget is added to the System, use + * ModifyProp(); The Pots are the actual proportional settings, + * where a value of zero means zero and a value of MAXPOT means + * that the Gadget is set to its maximum setting. + } + + HorizPot: Word; { 16-bit FixedPoint horizontal quantity percentage } + VertPot: Word; { 16-bit FixedPoint vertical quantity percentage } + + { the 16-bit FixedPoint Body variables describe what percentage of + * the entire body of stuff referred to by this Gadget is actually + * shown at one time. This is used with the AUTOKNOB routines, + * to adjust the size of the AUTOKNOB according to how much of + * the data can be seen. This is also used to decide how far + * to advance the Pots when User hits the Container of the Gadget. + * For instance, if you were controlling the display of a 5-line + * Window of text with this Gadget, and there was a total of 15 + * lines that could be displayed, you would set the VertBody value to + * (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3. + * Therefore, the AUTOKNOB would fill 1/3 of the container, and + * if User hits the Cotainer outside of the knob, the pot would + * advance 1/3 (plus or minus) If there's no body to show, or + * the total amount of displayable info is less than the display area, + * set the Body variables to the MAX. To adjust these after the + * Gadget is added to the System, use ModifyProp(); + } + + HorizBody: Word; { horizontal Body } + VertBody: Word; { vertical Body } + + { these are the variables that Intuition sets and maintains } + + CWidth: Word; + { Container width (with any relativity absoluted) } + CHeight: Word; + { Container height (with any relativity absoluted) } + HPotRes, + VPotRes: Word; { pot increments } + LeftBorder: Word; { Container borders } + TopBorder: Word; { Container borders } + end; + +const + { --- FLAG BITS ---------------------------------------------------------- } + AUTOKNOB = $0001; { this flag sez: gimme that old auto-knob } +{ NOTE: if you do not use an AUTOKNOB for a proportional gadget, + * you are currently limited to using a single Image of your own + * design: Intuition won't handle a linked list of images as + * a proportional gadget knob. + } + + FREEHORIZ = $0002; { IF set, the knob can move horizontally } + FREEVERT = $0004; { IF set, the knob can move vertically } + PROPBORDERLESS = $0008; { IF set, no border will be rendered } + KNOBHIT = $0100; { set when this Knob is hit } + PROPNEWLOOK = $0010; { set this IF you want to get the new + * V36 look + } + + KNOBHMIN = 6; { minimum horizontal size of the Knob } + KNOBVMIN = 4; { minimum vertical size of the Knob } + MAXBODY = $FFFF; { maximum body value } + MAXPOT = $FFFF; { maximum pot value } + +{ ======================================================================== } +{ === StringInfo ========================================================= } +{ ======================================================================== } +{ this is the special data required by the string Gadget + * typically, this data will be pointed to by the Gadget variable SpecialInfo + } + +type + + PStringInfo = ^TStringInfo; + + TStringInfo = record + { you initialize these variables, and then Intuition maintains them } + Buffer: PChar; + { the buffer containing the start and final string } + UndoBuffer: PChar; { optional buffer for undoing current entry } + BufferPos: SmallInt; { character position in Buffer } + MaxChars: SmallInt; + { max number of chars in Buffer (including NULL) } + DispPos: SmallInt; + { Buffer position of first displayed character } + + { Intuition initializes and maintains these variables for you } + + UndoPos: SmallInt; { character position in the undo buffer } + NumChars: SmallInt; { number of characters currently in Buffer } + DispCount: SmallInt; + { number of whole characters visible in Container } + CLeft, + CTop: SmallInt; { topleft offset of the container } + + { you can initialize this variable before the gadget is submitted to + * Intuition, and then examine it later to discover what LongInt + * the user has entered (if the user never plays with the gadget, + * the value will be unchanged from your initial setting) + } + Extension: Pointer; + _LongInt: LongInt; + + { If you want this Gadget to use your own Console keymapping, you + * set the ALTKEYMAP bit in the Activation flags of the Gadget, and then + * set this variable to point to your keymap. If you don't set the + * ALTKEYMAP, you'll get the standard ASCII keymapping. + } + + AltKeyMap: Pointer; + end; + + +{ ======================================================================== } +{ === Requester ========================================================== } +{ ======================================================================== } + +type + + PRequester = ^TRequester; + + TRequester = record + { the ClipRect and BitMap and used for rendering the requester } + OlderRequest: PRequester; + LeftEdge, + TopEdge: SmallInt; { dimensions of the entire box } + Width, + Height: SmallInt; { dimensions of the entire box } + RelLeft, + RelTop: SmallInt; { for Pointer relativity offsets } + + ReqGadget: PGadget; { pointer to a list of Gadgets } + ReqBorder: PBorder; { the box's border } + ReqText: PIntuiText; { the box's text } + Flags: Word; { see definitions below } + + { pen number for back-plane fill before draws } + + BackFill: Byte; + + { Layer in place of clip rect } + + ReqLayer: PLayer; + + ReqPad1: array [0..31] of Byte; + + { If the BitMap plane pointers are non-zero, this tells the system + * that the image comes pre-drawn (if the appliprog wants to define + * it's own box, in any shape or size it wants!); this is OK by + * Intuition as long as there's a good correspondence between + * the image and the specified Gadgets + } + + ImageBMap: PBitMap; { points to the BitMap of PREDRAWN imagery } + RWindow: Pointer; { added. points back to Window } + ReqImage: Pointer; + ReqPad2: array[0..31] of ShortInt; + end; + + +const + + { FLAGS SET BY THE APPLIPROG } + POINTREL = $0001; { if POINTREL set, TopLeft is relative to pointer} + PREDRAWN = $0002; { if ReqBMap points to predrawn Requester imagery } + NOISYREQ = $0004; + { if you don't want requester to filter input } + + SIMPLEREQ = $0010; + { to use SIMPLEREFRESH layer (recommended) } + + { New for V36 } + USEREQIMAGE = $0020; + { render linked list ReqImage after BackFill + * but before gadgets and text + } + NOREQBACKFILL = $0040; + { don't bother filling requester with Requester.BackFill pen } + + + { FLAGS SET BY INTUITION } + REQOFFWINDOW = $1000; { part of one of the Gadgets was offwindow } + REQACTIVE = $2000; { this requester is active } + SYSREQUEST = $4000; { this requester caused by system } + DEFERREFRESH = $8000; { this Requester stops a Refresh broadcast } + + + + +{ ======================================================================== } +{ === Image ============================================================== } +{ ======================================================================== } +{ This is a brief image structure for very simple transfers of + * image data to a RastPort + } + +type + PImage = ^TImage; + + TImage = record + LeftEdge: SmallInt; { starting offset relative to some origin } + TopEdge: SmallInt; { starting offsets relative to some origin } + Width: SmallInt; { pixel size (though data is Word-aligned) } + Height, + Depth: SmallInt; { pixel sizes } + ImageData: Pointer; { pointer to the actual Word-aligned bits } + + { the PlanePick and PlaneOnOff variables work much the same way as the + * equivalent GELS Bob variables. It's a space-saving + * mechanism for image data. Rather than defining the image data + * for every plane of the RastPort, you need define data only + * for the planes that are not entirely zero or one. As you + * define your Imagery, you will often find that most of the planes + * ARE just as color selectors. For instance, if you're designing + * a two-color Gadget to use colors two and three, and the Gadget + * will reside in a five-plane display, bit plane zero of your + * imagery would be all ones, bit plane one would have data that + * describes the imagery, and bit planes two through four would be + * all zeroes. Using these flags allows you to avoid wasting all + * that memory in this way: first, you specify which planes you + * want your data to appear in using the PlanePick variable. For + * each bit set in the variable, the next "plane" of your image + * data is blitted to the display. For each bit clear in this + * variable, the corresponding bit in PlaneOnOff is examined. + * If that bit is clear, a "plane" of zeroes will be used. + * If the bit is set, ones will go out instead. So, for our example: + * Gadget.PlanePick = $02; + * Gadget.PlaneOnOff = $01; + * Note that this also allows for generic Gadgets, like the + * System Gadgets, which will work in any number of bit planes. + * Note also that if you want an Image that is only a filled + * rectangle, you can get this by setting PlanePick to zero + * (pick no planes of data) and set PlaneOnOff to describe the pen + * color of the rectangle. + } + + PlanePick, + PlaneOnOff: Byte; + + { if the NextImage variable is not NULL, Intuition presumes that + * it points to another Image structure with another Image to be + * rendered + } + + NextImage: PImage; + end; + + +{ New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass + * of the IECLASS_NEWPOINTERPOS event. The ie_EventAddress of such + * an event points to a TabletData structure (see below). + * + * The TabletData structure contains certain elements including a taglist. + * The taglist can be used for special tablet parameters. A tablet driver + * should include only those tag-items the tablet supports. An application + * can listen for any tag-items that interest it. Note: an application + * must set the WA_TabletMessages attribute to TRUE to receive this + * extended information in its IntuiMessages. + * + * The definitions given here MUST be followed. Pay careful attention + * to normalization and the interpretation of signs. + * + * TABLETA_TabletZ: the current value of the tablet in the Z direction. + * This unsigned value should typically be in the natural units of the + * tablet. You should also provide TABLETA_RangeZ. + * + * TABLETA_RangeZ: the maximum value of the tablet in the Z direction. + * Normally specified along with TABLETA_TabletZ, this allows the + * application to scale the actual Z value across its range. + * + * TABLETA_AngleX: the angle of rotation or tilt about the X-axis. This + * number should be normalized to fill a signed long LongInt. Positive + * values imply a clockwise rotation about the X-axis when viewing + * from +X towards the origin. + * + * TABLETA_AngleY: the angle of rotation or tilt about the Y-axis. This + * number should be normalized to fill a signed long LongInt. Positive + * values imply a clockwise rotation about the Y-axis when viewing + * from +Y towards the origin. + * + * TABLETA_AngleZ: the angle of rotation or tilt about the Z axis. This + * number should be normalized to fill a signed long LongInt. Positive + * values imply a clockwise rotation about the Z-axis when viewing + * from +Z towards the origin. + * + * Note: a stylus that supports tilt should use the TABLETA_AngleX + * and TABLETA_AngleY attributes. Tilting the stylus so the tip + * points towards increasing or decreasing X is actually a rotation + * around the Y-axis. Thus, if the stylus tip points towards + * positive X, then that tilt is represented as a negative + * TABLETA_AngleY. Likewise, if the stylus tip points towards + * positive Y, that tilt is represented by positive TABLETA_AngleX. + * + * TABLETA_Pressure: the pressure reading of the stylus. The pressure + * should be normalized to fill a signed long LongInt. Typical devices + * won't generate negative pressure, but the possibility is not precluded. + * The pressure threshold which is considered to cause a button-click is + * expected to be set in a Preferences program supplied by the tablet + * vendor. The tablet driver would send IECODE_LBUTTON-type events as + * the pressure crossed that threshold. + * + * TABLETA_ButtonBits: ti_Data is a long LongInt whose bits are to + * be interpreted at the state of the first 32 buttons of the tablet. + * + * TABLETA_InProximity: ti_Data is a boolean. For tablets that support + * proximity, they should send the (TABLETA_InProximity,FALSE) tag item + * when the stylus is out of proximity. One possible use we can forsee + * is a mouse-blanking commodity which keys off this to blank the + * mouse. When this tag is absent, the stylus is assumed to be + * in proximity. + * + * TABLETA_ResolutionX: ti_Data is an unsigned long LongInt which + * is the x-axis resolution in dots per inch. + * + * TABLETA_ResolutionY: ti_Data is an unsigned long LongInt which + * is the y-axis resolution in dots per inch. + } + +{const + TABLETA_Dummy = (TAG_USER + $3A000) ; + TABLETA_TabletZ = (TABLETA_Dummy + $01); + TABLETA_RangeZ = (TABLETA_Dummy + $02); + TABLETA_AngleX = (TABLETA_Dummy + $03); + TABLETA_AngleY = (TABLETA_Dummy + $04); + TABLETA_AngleZ = (TABLETA_Dummy + $05); + TABLETA_Pressure = (TABLETA_Dummy + $06); + TABLETA_ButtonBits = (TABLETA_Dummy + $07); + TABLETA_InProximity = (TABLETA_Dummy + $08); + TABLETA_ResolutionX = (TABLETA_Dummy + $09); + TABLETA_ResolutionY = (TABLETA_Dummy + $0A);} + +{ If your window sets WA_TabletMessages to TRUE, then it will receive + * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData + * field points at a TabletData structure. This structure contains + * additional information about the input event. + } + +type + PTabletData = ^TTabletData; + + TTabletData = record + { Sub-pixel position of tablet, in screen coordinates, + * scaled to fill a UWORD fraction: + } + td_XFraction, td_YFraction: Word; + + { Current tablet coordinates along each axis: } + td_TabletX, td_TabletY: LongWord; + + { Tablet range along each axis. For example, if td_TabletX + * can take values 0-999, td_RangeX should be 1000. + } + td_RangeX, td_RangeY: LongWord; + + { Pointer to tag-list of additional tablet attributes. + * See for the tag values. + } + td_TagList: PTagItem; + end; + +{ If a tablet driver supplies a hook for ient_CallBack, it will be + * invoked in the standard hook manner. A0 will point to the Hook + * itself, A2 will point to the InputEvent that was sent, and + * A1 will point to a TabletHookData structure. The InputEvent's + * ie_EventAddress field points at the IENewTablet structure that + * the driver supplied. + * + * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver + * should scale the ient_TabletX and ient_TabletY fields and store the + * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and + * ient_ScaledYFraction. + * + * The tablet hook must currently return NULL. This is the only + * acceptable return-value under V39. + } + + PTabletHookData = ^TTabletHookData; + TTabletHookData = record + { Pointer to the active screen: + * Note: if there are no open screens, thd_Screen will be NULL. + * thd_Width and thd_Height will then describe an NTSC 64$400 + * screen. Please scale accordingly. + } + thd_Screen: Pointer; + + { The width and height (measured in pixels of the active screen) + * that your are to scale to: + } + thd_Width, + thd_Height: LongWord; + + { Non-zero if the screen or something about the screen + * changed since the last time you were invoked: + } + thd_ScreenChanged: LongInt; + end; + + +{ ======================================================================== } +{ === IntuiMessage ======================================================= } +{ ======================================================================== } + +type + + PIntuiMessage = ^TIntuiMessage; + + TIntuiMessage = record + ExecMessage: TMessage; + + { the Class bits correspond directly with the IDCMP Flags, except for the + * special bit LONELYMESSAGE (defined below) + } + + IClass: LongWord; + + { the Code field is for special values like MENU number } + + Code: Word; + + { the Qualifier field is a copy of the current InputEvent's Qualifier } + + Qualifier: Word; + + { IAddress contains particular addresses for Intuition functions, like + * the pointer to the Gadget or the Screen + } + + IAddress: Pointer; + + { when getting mouse movement reports, any event you get will have the + * the mouse coordinates in these variables. the coordinates are relative + * to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding) + } + + MouseX, + MouseY: SmallInt; + + { the time values are copies of the current system clock time. Micros + * are in units of microseconds, Seconds in seconds. + } + + Seconds, + Micros: LongWord; + + { the IDCMPWindow variable will always have the Pointer of the Window of + * this IDCMP + } + + IDCMPWindow: Pointer; + + { system-use variable } + + SpecialLink: PIntuiMessage; + end; + +{ New for V39: + * All IntuiMessages are now slightly extended. The ExtIntuiMessage + * structure has an additional field for tablet data, which is usually + * NULL. If a tablet driver which is sending IESUBCLASS_NEWTABLET + * events is installed in the system, windows with the WA_TabletMessages + * property set will find that eim_TabletData points to the TabletData + * structure. Applications must first check that this field is non-NULL; + * it will be NULL for certain kinds of message, including mouse activity + * generated from other than the tablet (i.e. the keyboard equivalents + * or the mouse itself). + * + * NEVER EVER examine any extended fields when running under pre-V39! + * + * NOTE: This structure is subject to grow in the future. Making + * assumptions about its size is A BAD IDEA. + } + + PExtIntuiMessage = ^TExtIntuiMessage; + TExtIntuiMessage = record + eim_IntuiMessage: TIntuiMessage; + eim_TabletData: PTabletData; + end; + + +const + + { --- IDCMP Classes ------------------------------------------------------ } +{ Please refer to the Autodoc for OpenWindow() and to the Rom Kernel + * Manual for full details on the IDCMP classes. + } + IDCMP_SIZEVERIFY = $00000001; + IDCMP_NEWSIZE = $00000002; + IDCMP_REFRESHWINDOW = $00000004; + IDCMP_MOUSEBUTTONS = $00000008; + IDCMP_MOUSEMOVE = $00000010; + IDCMP_GADGETDOWN = $00000020; + IDCMP_GADGETUP = $00000040; + IDCMP_REQSET = $00000080; + IDCMP_MENUPICK = $00000100; + IDCMP_CLOSEWINDOW = $00000200; + IDCMP_RAWKEY = $00000400; + IDCMP_REQVERIFY = $00000800; + IDCMP_REQCLEAR = $00001000; + IDCMP_MENUVERIFY = $00002000; + IDCMP_NEWPREFS = $00004000; + IDCMP_DISKINSERTED = $00008000; + IDCMP_DISKREMOVED = $00010000; + IDCMP_WBENCHMESSAGE = $00020000; { System use only } + IDCMP_ACTIVEWINDOW = $00040000; + IDCMP_INACTIVEWINDOW = $00080000; + IDCMP_DELTAMOVE = $00100000; + IDCMP_VANILLAKEY = $00200000; + IDCMP_INTUITICKS = $00400000; + { for notifications from "boopsi" gadgets } + IDCMP_IDCMPUPDATE = $00800000; { new for V36 } + { for getting help key report during menu session } + IDCMP_MENUHELP = $01000000; { new for V36 } + { for notification of any move/size/zoom/change window } + IDCMP_CHANGEWINDOW = $02000000; { new for V36 } + IDCMP_GADGETHELP = $04000000; { new for V39 } + + { NOTEZ-BIEN: $80000000 is reserved for internal use } + +{ the IDCMP Flags do not use this special bit, which is cleared when + * Intuition sends its special message to the Task, and set when Intuition + * gets its Message back from the Task. Therefore, I can check here to + * find out fast whether or not this Message is available for me to send + } + IDCMP_LONELYMESSAGE = $80000000; + + + { --- IDCMP Codes -------------------------------------------------------- } + { This group of codes is for the IDCMP_CHANGEWINDOW message } + CWCODE_MOVESIZE = $0000; { Window was moved and/or sized } + CWCODE_DEPTH = $0001; { Window was depth-arranged (new for V39) } + + { This group of codes is for the IDCMP_MENUVERIFY function } + MENUHOT = $0001; { IntuiWants verification OR MENUCANCEL } + MENUCANCEL = $0002; { HOT Reply of this cancels Menu operation } + MENUWAITING = $0003; { Intuition simply wants a ReplyMsg() ASAP } + +{ These are internal tokens to represent state of verification attempts + * shown here as a clue. + } + OKOK = MENUHOT; { guy didn't care } + OKABORT = $0004; { window rendered question moot } + OKCANCEL = MENUCANCEL; { window sent cancel reply } + + { This group of codes is for the IDCMP_WBENCHMESSAGE messages } + WBENCHOPEN = $0001; + WBENCHCLOSE = $0002; + + +{ A data structure common in V36 Intuition processing } +type + PIBox = ^TIBox; + + TIBox = record + Left, + Top, + Width, + Height: SmallInt; + end; + + +{ ======================================================================== } +{ === Window ============================================================= } +{ ======================================================================== } + +type + PWindow = ^TWindow; + + TWindow = record + NextWindow: PWindow; { for the linked list in a screen } + + LeftEdge, + TopEdge: SmallInt; { screen dimensions of window } + Width, + Height: SmallInt; { screen dimensions of window } + + MouseY, + MouseX: SmallInt; { relative to upper-left of window } + + MinWidth, + MinHeight: SmallInt; { minimum sizes } + MaxWidth, + MaxHeight: SmallInt; { maximum sizes } + + Flags: LongWord; { see below for defines } + MenuStrip: PMenu; { the strip of Menu headers } + Title: PChar; { the title text for this window } + FirstRequest: PRequester; { all active Requesters } + DMRequest: PRequester; { double-click Requester } + ReqCount: SmallInt; { count of reqs blocking Window } + WScreen: Pointer; { this Window's Screen } + RPort: PRastPort; { this Window's very own RastPort } + + { the border variables describe the window border. If you specify + * GIMMEZEROZERO when you open the window, then the upper-left of the + * ClipRect for this window will be upper-left of the BitMap (with correct + * offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when + * using SuperBitMap). If you don't specify ZeroZero, then you save + * memory (no allocation of RastPort, Layer, ClipRect and associated + * Bitmaps), but you also must offset all your writes by BorderTop, + * BorderLeft and do your own mini-clipping to prevent writing over the + * system gadgets + } + + BorderLeft, + BorderTop, + BorderRight, + BorderBottom: ShortInt; + BorderRPort: pRastPort; + + + { You supply a linked-list of Gadgets for your Window. + * This list DOES NOT include system gadgets. You get the standard + * window system gadgets by setting flag-bits in the variable Flags (see + * the bit definitions below) + } + + FirstGadget: PGadget; + + { these are for opening/closing the windows } + + Parent, + Descendant: PWindow; + + { sprite data information for your own Pointer + * set these AFTER you Open the Window by calling SetPointer() + } + + _Pointer: Pointer; { sprite data } + PtrHeight: ShortInt; + { sprite height (not including sprite padding) } + PtrWidth: ShortInt; + { sprite width (must be less than or equal to 16) } + XOffset, + YOffset: ShortInt; { sprite offsets } + + { the IDCMP Flags and User's and Intuition's Message Ports } + IDCMPFlags: LongWord; { User-selected flags } + UserPort, + WindowPort: PMsgPort; + MessageKey: PIntuiMessage; + + DetailPen, + BlockPen: Byte; { for bar/border/gadget rendering } + + { the CheckMark is a pointer to the imagery that will be used when + * rendering MenuItems of this Window that want to be checkmarked + * if this is equal to NULL, you'll get the default imagery + } + + CheckMark: PImage; + + ScreenTitle: PChar; { if non-null, Screen title when Window is active } + + { These variables have the mouse coordinates relative to the + * inner-Window of GIMMEZEROZERO Windows. This is compared with the + * MouseX and MouseY variables, which contain the mouse coordinates + * relative to the upper-left corner of the Window, GIMMEZEROZERO + * notwithstanding + } + + GZZMouseX: SmallInt; + GZZMouseY: SmallInt; + + { these variables contain the width and height of the inner-Window of + * GIMMEZEROZERO Windows + } + + GZZWidth: SmallInt; + GZZHeight: SmallInt; + + ExtData: Pointer; + + UserData: Pointer; + { general-purpose pointer to User data extension } + + {* jimm: NEW: 11/18/85: this pointer keeps a duplicate of what + * Window.RPort->Layer is _supposed_ to be pointing at + } + + WLayer: PLayer; + + { jimm: NEW 1.2: need to keep track of the font that + * OpenWindow opened, in case user SetFont's into RastPort + } + + IFont: PTextFont; + {* (V36) another flag Word (the Flags field is used up). + * At present, all flag values are system private. + * Until further notice, you may not change nor use this field. + *} + MoreFlags: LongWord; + + RelLeftEdge: SmallInt; // relative coordinates of the window + RelTopEdge: SmallInt; + + FirstChild: PWindow; // pointer to first child + PrevChild: PWindow; // if window is a child of a window + NextChild: PWindow; // then they are concatenated here. + Parent2: PWindow; // parent of this window + {**** Data beyond this point are Intuition Private. DO NOT USE ****} + + end; + +const + { --- Flags requested at OpenWindow() time by the application --------- } + WFLG_SIZEGADGET = $00000001; { include sizing system-gadget? } + WFLG_DRAGBAR = $00000002; { include dragging system-gadget? } + WFLG_DEPTHGADGET = $00000004; { include depth arrangement gadget? } + WFLG_CLOSEGADGET = $00000008; { include close-box system-gadget? } + + WFLG_SIZEBRIGHT = $00000010; { size gadget uses right border } + WFLG_SIZEBBOTTOM = $00000020; { size gadget uses bottom border } + + { --- refresh modes ------------------------------------------------------ } + { combinations of the WFLG_REFRESHBITS select the refresh type } + WFLG_REFRESHBITS = $000000C0; + WFLG_SMART_REFRESH = $00000000; + WFLG_SIMPLE_REFRESH = $00000040; + WFLG_SUPER_BITMAP = $00000080; + WFLG_OTHER_REFRESH = $000000C0; + + WFLG_BACKDROP = $00000100; { this is a backdrop window } + + WFLG_REPORTMOUSE = $00000200; { to hear about every mouse move } + + WFLG_GIMMEZEROZERO = $00000400; { a GimmeZeroZero window } + + WFLG_BORDERLESS = $00000800; { to get a Window sans border } + + WFLG_ACTIVATE = $00001000; { when Window opens, it's Active } + + + { --- Other User Flags --------------------------------------------------- } + WFLG_RMBTRAP = $00010000; { Catch RMB events for your own } + WFLG_NOCAREREFRESH = $00020000; { not to be bothered with REFRESH } + + { - V36 new Flags which the programmer may specify in NewWindow.Flags } + WFLG_NW_EXTENDED = $00040000; { extension data provided } + { see struct ExtNewWindow } + + { - V39 new Flags which the programmer may specify in NewWindow.Flags } + WFLG_NEWLOOKMENUS = $00200000; { window has NewLook menus } + + { These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF! } + WFLG_WINDOWACTIVE = $00002000; { this window is the active one } + WFLG_INREQUEST = $00004000; { this window is in request mode } + WFLG_MENUSTATE = $00008000; { Window is active with Menus on } + WFLG_WINDOWREFRESH = $01000000; { Window is currently refreshing } + WFLG_WBENCHWINDOW = $02000000; { WorkBench tool ONLY Window } + WFLG_WINDOWTICKED = $04000000; { only one timer tick at a time } + + { --- V36 Flags to be set only by Intuition ------------------------- } + WFLG_VISITOR = $08000000; { visitor window } + WFLG_ZOOMED = $10000000; { identifies "zoom state" } + WFLG_HASZOOM = $20000000; { windowhas a zoom gadget } + + { --- Other Window Values ---------------------------------------------- } + DEFAULTMOUSEQUEUE = (5); { no more mouse messages } + +{ --- see struct IntuiMessage for the IDCMP Flag definitions ------------- } + + +{ ======================================================================== } +{ === NewWindow ========================================================== } +{ ======================================================================== } + +type + + PNewWindow = ^TNewWindow; + + TNewWindow = record + LeftEdge, + TopEdge: SmallInt; { screen dimensions of window } + Width, + Height: SmallInt; { screen dimensions of window } + + DetailPen, + BlockPen: Byte; { for bar/border/gadget rendering } + + IDCMPFlags: LongWord; { User-selected IDCMP flags } + + Flags: LongWord; { see Window struct for defines } + + { You supply a linked-list of Gadgets for your Window. + * This list DOES NOT include system Gadgets. You get the standard + * system Window Gadgets by setting flag-bits in the variable Flags (see + * the bit definitions under the Window structure definition) + } + + FirstGadget: PGadget; + + { the CheckMark is a pointer to the imagery that will be used when + * rendering MenuItems of this Window that want to be checkmarked + * if this is equal to NULL, you'll get the default imagery + } + + CheckMark: PImage; + + Title: PChar; { the title text for this window } + + { the Screen pointer is used only if you've defined a CUSTOMSCREEN and + * want this Window to open in it. If so, you pass the Pointer of the + * Custom Screen structure in this variable. Otherwise, this variable + * is ignored and doesn't have to be initialized. + } + + Screen: Pointer; + + { SUPER_BITMAP Window? If so, put the Pointer of your BitMap structure + * in this variable. If not, this variable is ignored and doesn't have + * to be initialized + } + + BitMap: PBitMap; + + { the values describe the minimum and maximum sizes of your Windows. + * these matter only if you've chosen the WINDOWSIZING Gadget option, + * which means that you want to let the User to change the size of + * this Window. You describe the minimum and maximum sizes that the + * Window can grow by setting these variables. You can initialize + * any one these to zero, which will mean that you want to duplicate + * the setting for that dimension (if MinWidth == 0, MinWidth will be + * set to the opening Width of the Window). + * You can change these settings later using SetWindowLimits(). + * If you haven't asked for a SIZING Gadget, you don't have to + * initialize any of these variables. + } + + MinWidth, + MinHeight: SmallInt; { minimums } + MaxWidth, + MaxHeight: SmallInt; { maximums } + + { the type variable describes the Screen in which you want this Window to + * open. The type value can either be CUSTOMSCREEN or one of the + * system standard Screen Types such as WBENCHSCREEN. See the + * type definitions under the Screen structure + } + + WType: Word; { is "type" in C includes } + end; + + +{ The following structure is the future NewWindow. Compatibility + * issues require that the size of NewWindow not change. + * Data in the common part (NewWindow) indicates the the extension + * fields are being used. + * NOTE WELL: This structure may be subject to future extension. + * Writing code depending on its size is not allowed. + } + PExtNewWindow = ^TExtNewWindow; + TExtNewWindow = record + LeftEdge, TopEdge : SmallInt; + Width, Height : SmallInt; + + DetailPen, BlockPen : Byte; + IDCMPFlags : LongWord; + Flags : LongWord; + FirstGadget : PGadget; + + CheckMark : PImage; + + Title : PChar; + WScreen : Pointer; + WBitMap : pBitMap; + + MinWidth, MinHeight: SmallInt; + MaxWidth, MaxHeight: Word; + + { the type variable describes the Screen in which you want this Window to + * open. The type value can either be CUSTOMSCREEN or one of the + * system standard Screen Types such as WBENCHSCREEN. See the + * type definitions under the Screen structure. + * A new possible value for this field is PUBLICSCREEN, which + * defines the window as a 'visitor' window. See below for + * additional information provided. + } + WType: Word; + + { ------------------------------------------------------- * + * extensions for V36 + * if the NewWindow Flag value WFLG_NW_EXTENDED is set, then + * this field is assumed to point to an array ( or chain of arrays) + * of TagItem structures. See also ExtNewScreen for another + * use of TagItems to pass optional data. + * + * see below for tag values and the corresponding data. + } + Extension: PTagItem; + end; + +{ + * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow. + * They are values in a TagItem array passed as extension/replacement + * values for the data in NewWindow. OpenWindowTagList() can actually + * work well with a NULL NewWindow pointer. + } + +const + TAG_USER = $80000000; + TAG_DONE = 0; { terminates array of TagItems. ti_Data unused } + TAG_END = TAG_DONE; + WA_Dummy = (TAG_USER + 99); { $80000063 } + + { these tags simply override NewWindow parameters } + WA_Left = (WA_Dummy + $01); + WA_Top = (WA_Dummy + $02); + WA_Width = (WA_Dummy + $03); + WA_Height = (WA_Dummy + $04); + WA_DetailPen = (WA_Dummy + $05); + WA_BlockPen = (WA_Dummy + $06); + WA_IDCMP = (WA_Dummy + $07); + { "bulk" initialization of NewWindow.Flags } + WA_Flags = (WA_Dummy + $08); + WA_Gadgets = (WA_Dummy + $09); + WA_Checkmark = (WA_Dummy + $0A); + WA_Title = (WA_Dummy + $0B); + { means you don't have to call SetWindowTitles + * after you open your window + } + WA_ScreenTitle = (WA_Dummy + $0C); + WA_CustomScreen = (WA_Dummy + $0D); + WA_SuperBitMap = (WA_Dummy + $0E); + { also implies WFLG_SUPER_BITMAP property } + WA_MinWidth = (WA_Dummy + $0F); + WA_MinHeight = (WA_Dummy + $10); + WA_MaxWidth = (WA_Dummy + $11); + WA_MaxHeight = (WA_Dummy + $12); + + { The following are specifications for new features } + + WA_InnerWidth = (WA_Dummy + $13); + WA_InnerHeight = (WA_Dummy + $14); + { You can specify the dimensions of the interior + * region of your window, independent of what + * the border widths will be. You probably want + * to also specify WA_AutoAdjust to allow + * Intuition to move your window or even + * shrink it so that it is completely on screen. + } + + WA_PubScreenName = (WA_Dummy + $15); + { declares that you want the window to open as + * a visitor on the public screen whose name is + * pointed to by (UBYTE * ) ti_Data + } + WA_PubScreen = (WA_Dummy + $16); + { open as a visitor window on the public screen + * whose Pointer is in (struct Screen * ) ti_Data. + * To ensure that this screen remains open, you + * should either be the screen's owner, have a + * window open on the screen, or use LockPubScreen(). + } + WA_PubScreenFallBack = (WA_Dummy + $17); + { A Boolean, specifies whether a visitor window + * should "fall back" to the default public screen + * (or Workbench) if the named public screen isn't + * available + } + WA_WindowName = (WA_Dummy + $18); + { not implemented } + WA_Colors = (WA_Dummy + $19); + { a ColorSpec array for colors to be set + * when this window is active. This is not + * implemented, and may not be, since the default + * values to restore would be hard to track. + * We'd like to at least support per-window colors + * for the mouse pointer sprite. + } + WA_Zoom = (WA_Dummy + $1A); + { ti_Data points to an array of four Word's, + * the initial Left/Top/Width/Height values of + * the "alternate" zoom position/dimensions. + * It also specifies that you want a Zoom gadget + * for your window, whether or not you have a + * sizing gadget. + } + WA_MouseQueue = (WA_Dummy + $1B); + { ti_Data contains initial value for the mouse + * message backlog limit for this window. + } + WA_BackFill = (WA_Dummy + $1C); + { unimplemented at present: provides a "backfill + * hook" for your window's layer. + } + WA_RptQueue = (WA_Dummy + $1D); + { initial value of repeat key backlog limit } + + { These Boolean tag items are alternatives to the NewWindow.Flags + * boolean flags with similar names. + } + WA_SizeGadget = (WA_Dummy + $1E); + WA_DragBar = (WA_Dummy + $1F); + WA_DepthGadget = (WA_Dummy + $20); + WA_CloseGadget = (WA_Dummy + $21); + WA_Backdrop = (WA_Dummy + $22); + WA_ReportMouse = (WA_Dummy + $23); + WA_NoCareRefresh = (WA_Dummy + $24); + WA_Borderless = (WA_Dummy + $25); + WA_Activate = (WA_Dummy + $26); + WA_RMBTrap = (WA_Dummy + $27); + WA_WBenchWindow = (WA_Dummy + $28); { PRIVATE!! } + WA_SimpleRefresh = (WA_Dummy + $29); + { only specify if TRUE } + WA_SmartRefresh = (WA_Dummy + $2A); + { only specify if TRUE } + WA_SizeBRight = (WA_Dummy + $2B); + WA_SizeBBottom = (WA_Dummy + $2C); + + { New Boolean properties } + WA_AutoAdjust = (WA_Dummy + $2D); + { shift or squeeze the window's position and + * dimensions to fit it on screen. + } + + WA_GimmeZeroZero = (WA_Dummy + $2E); + { equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO } + + { New for V37: WA_MenuHelp (ignored by V36) } + WA_MenuHelp = (WA_Dummy + $2F); + { Enables IDCMP_MENUHELP: Pressing HELP during menus + * will return IDCMP_MENUHELP message. + } + + { New for V39: (ignored by V37 and earlier) } + WA_NewLookMenus = (WA_Dummy + $30); + { Set to TRUE if you want NewLook menus } + WA_AmigaKey = (WA_Dummy + $31); + { Pointer to image for Amiga-key equiv in menus } + WA_NotifyDepth = (WA_Dummy + $32); + { Requests IDCMP_CHANGEWINDOW message when + * window is depth arranged + * (imsg->Code = CWCODE_DEPTH) + } + + { WA_Dummy + $33 is obsolete } + + WA_Pointer = (WA_Dummy + $34); + { Allows you to specify a custom pointer + * for your window. ti_Data points to a + * pointer object you obtained via + * "pointerclass". NULL signifies the + * default pointer. + * This tag may be passed to OpenWindowTags() + * or SetWindowPointer(). + } + + WA_BusyPointer = (WA_Dummy + $35); + { ti_Data is boolean. Set to TRUE to + * request the standard busy pointer. + * This tag may be passed to OpenWindowTags() + * or SetWindowPointer(). + } + + WA_PointerDelay = (WA_Dummy + $36); + { ti_Data is boolean. Set to TRUE to + * request that the changing of the + * pointer be slightly delayed. The change + * will be called off if you call NewSetPointer() + * before the delay expires. This allows + * you to post a busy-pointer even if you think + * the busy-time may be very Word, without + * fear of a flashing pointer. + * This tag may be passed to OpenWindowTags() + * or SetWindowPointer(). + } + + WA_TabletMessages = (WA_Dummy + $37); + { ti_Data is a boolean. Set to TRUE to + * request that tablet information be included + * in IntuiMessages sent to your window. + * Requires that something (i.e. a tablet driver) + * feed IESUBCLASS_NEWTABLET InputEvents into + * the system. For a pointer to the TabletData, + * examine the ExtIntuiMessage->eim_TabletData + * field. It is UNSAFE to check this field + * when running on pre-V39 systems. It's always + * safe to check this field under V39 and up, + * though it may be NULL. + } + + WA_HelpGroup = (WA_Dummy + $38); + { When the active window has gadget help enabled, + * other windows of the same HelpGroup number + * will also get GadgetHelp. This allows GadgetHelp + * to work for multi-windowed applications. + * Use GetGroupID() to get an ID number. Pass + * this number as ti_Data to all your windows. + * See also the HelpControl() function. + } + + WA_HelpGroupWindow = (WA_Dummy + $39); + { When the active window has gadget help enabled, + * other windows of the same HelpGroup will also get + * GadgetHelp. This allows GadgetHelp to work + * for multi-windowed applications. As an alternative + * to WA_HelpGroup, you can pass a pointer to any + * other window of the same group to join its help + * group. Defaults to NULL, which has no effect. + * See also the HelpControl() function. + } +WA_ToolBox = (WA_Dummy + 58); + +// AROS specific tags + +WA_Priority = (WA_Dummy + 100); +WA_Parent = (WA_Dummy + 101); +WA_InFrontOf = (WA_Dummy + 102); +WA_Behind = (WA_Dummy + 103); +WA_Visible = (WA_Dummy + 104); +WA_Shape = (WA_Dummy + 105); +WA_ShapeHook = (WA_Dummy + 106); + + +{ HelpControl() flags: + * + * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more + * windows. + } + + HC_GADGETHELP = 1; + + +{ ======================================================================== } +{ === Remember =========================================================== } +{ ======================================================================== } +{ this structure is used for remembering what memory has been allocated to + * date by a given routine, so that a premature abort or systematic exit + * can deallocate memory cleanly, easily, and completely + } + +type + + PRemember = ^TRemember; + + TRemember = record + NextRemember: PRemember; + RememberSize: LongWord; + Memory: Pointer; + end; + + + { === Color Spec ====================================================== } + { How to tell Intuition about RGB values for a color table entry. } + + PColorSpec = ^TColorSpec; + + TColorSpec = record + ColorIndex: SmallInt; { -1 terminates an array of ColorSpec } + Red: Word; { only the _bottom_ 4 bits recognized } + Green: Word; { only the _bottom_ 4 bits recognized } + Blue: Word; { only the _bottom_ 4 bits recognized } + end; + + { === Easy Requester Specification ======================================= } + { see also autodocs for EasyRequest and BuildEasyRequest } + { NOTE: This structure may grow in size in the future } + + PEasyStruct = ^TEasyStruct; + + TEasyStruct = record + es_StructSize: LongWord; { should be sizeof (struct EasyStruct )} + es_Flags: LongWord; { should be 0 for now } + es_Title: PChar; { title of requester window } + es_TextFormat: PChar; { 'printf' style formatting string } + es_GadgetFormat: PChar; { 'printf' style formatting string } + end; + + + +{ ======================================================================== } +{ === Miscellaneous ====================================================== } +{ ======================================================================== } +const + { = MENU STUFF =========================================================== } + NOMENU = $001F; + NOITEM = $003F; + NOSUB = $001F; + MENUNULL = -1; + + + { = =RJ='s peculiarities ================================================= } + +{ these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT, + * I'll use a generic Width (for all resolutions) for the CheckMark. + * If COMMSEQ, likewise I'll use this generic stuff + } + + CHECKWIDTH = 19; + COMMWIDTH = 27; + LOWCHECKWIDTH = 13; + LOWCOMMWIDTH = 16; + +{ these are the AlertNumber defines. if you are calling DisplayAlert() + * the AlertNumber you supply must have the ALERT_TYPE bits set to one + * of these patterns + } + + ALERT_TYPE = $80000000; + RECOVERY_ALERT = $00000000; { the system can recover from this } + DEADEND_ALERT = $80000000; { no recovery possible, this is it } + + +{ When you're defining IntuiText for the Positive and Negative Gadgets + * created by a call to AutoRequest(), these defines will get you + * reasonable-looking text. The only field without a define is the IText + * field; you decide what text goes with the Gadget + } + + AUTOFRONTPEN = 0; + AUTOBACKPEN = 1; + AUTODRAWMODE = JAM2; + AUTOLEFTEDGE = 6; + AUTOTOPEDGE = 3; + +{ - + AUTOITEXTFONT = Nil; + AUTONEXTTEXT = Nil; +- } + + + { --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- } + + + SELECTUP = IECODE_LBUTTON + IECODE_UP_PREFIX; + SELECTDOWN = IECODE_LBUTTON; + MENUUP = IECODE_RBUTTON + IECODE_UP_PREFIX; + MENUDOWN = IECODE_RBUTTON; + ALTLEFT = IEQUALIFIER_LALT; + ALTRIGHT = IEQUALIFIER_RALT; + AMIGALEFT = IEQUALIFIER_LCOMMAND; + AMIGARIGHT = IEQUALIFIER_RCOMMAND; + AMIGAKEYS = AMIGALEFT + AMIGARIGHT; + + CURSORUP = $4C; + CURSORLEFT = $4F; + CURSORRIGHT = $4E; + CURSORDOWN = $4D; + KEYCODE_Q = $10; + KEYCODE_X = $32; + KEYCODE_N = $36; + KEYCODE_M = $37; + KEYCODE_V = $34; + KEYCODE_B = $35; + KEYCODE_LESS = $38; + KEYCODE_GREATER = $39; + +{ these are the display modes for which we have corresponding parameter + * settings in the config arrays + } +const + DMODECOUNT = $0002; { how many modes there are } + HIRESPICK = $0000; + LOWRESPICK = $0001; + + EVENTMAX = 10; { size of event array } + + { these are the system Gadget defines } + RESCOUNT = 2; + HIRESGADGET = 0; + LOWRESGADGET = 1; + + GADGETCOUNT = 8; + UPFRONTGADGET = 0; + DOWNBACKGADGET = 1; + SIZEGADGET = 2; + CLOSEGADGET = 3; + DRAGGADGET = 4; + SUPFRONTGADGET = 5; + SDOWNBACKGADGET = 6; + SDRAGGADGET = 7; + + +{ ======================================================================== } +{ === DrawInfo ========================================================= } +{ ======================================================================== } + +{ This is a packet of information for graphics rendering. It originates + * with a Screen, and is gotten using GetScreenDrawInfo( screen ); + } + +{ If you find dri_Version >= DRI_VERSION, you know this structure + * has at least the fields defined in this version of the include file + } +const + RI_VERSION = (1); { obsolete, will be removed } + DRI_VERSION = (1); + +type + + PDrawInfo = ^TDrawInfo; + + TDrawInfo = record + dri_Version: Word; { will be DRI_VERSION } + dri_NumPens: Word; { guaranteed to be >= numDrIPens } + dri_Pens: Pointer; { pointer to pen array } + + dri_Font: PTextFont; { screen default font } + dri_Depth: Word; { (initial) depth of screen bitmap } + + dri_Resolution: record { from DisplayInfo database for initial display mode } + x: Word; + y: Word; + end; + + dri_Flags: LongWord; { defined below } + { New for V39: dri_CheckMark, dri_AmigaKey. } + dri_CheckMark: PImage; { ImagePtr } { pointer to scaled checkmark image + * Will be NULL if DRI_VERSION < 2 + } + dri_AmigaKey: PImage; { ImagePtr } { pointer to scaled Amiga-key image + * Will be NULL if DRI_VERSION < 2 + } + + dri_Reserved: array[0..4] of LongWord; { avoid recompilation ;^) } + end; + +const + DRIF_NEWLOOK = $00000001; { specified SA_Pens, full treatment } + + { rendering pen number indexes into DrawInfo.dri_Pens[] } + DETAILPEN = ($0000); { compatible Intuition rendering pens } + BLOCKPEN = ($0001); { compatible Intuition rendering pens } + TEXTPEN = ($0002); { text on background } + SHINEPEN = ($0003); { bright edge on 3D objects } + SHADOWPEN = ($0004); { dark edge on 3D objects } + FILLPEN = ($0005); { active-window/selected-gadget fill } + FILLTEXTPEN = ($0006); { text over FILLPEN } + BACKGROUNDPEN = ($0007); { always color 0 } + HIGHLIGHTTEXTPEN = ($0008); { special color text, on background } + { New for V39, only present if DRI_VERSION >= 2: } + BARDETAILPEN = ($0009); { text/detail in screen-bar/menus } + BARBLOCKPEN = ($000A); { screen-bar/menus fill } + BARTRIMPEN = ($000B); { trim under screen-bar } + + NUMDRIPENS = ($0009); + +{ New for V39: It is sometimes useful to specify that a pen value + * is to be the complement of color zero to three. The "magic" numbers + * serve that purpose: + } + PEN_C3 = $FEFC; { Complement of color 3 } + PEN_C2 = $FEFD; { Complement of color 2 } + PEN_C1 = $FEFE; { Complement of color 1 } + PEN_C0 = $FEFF; { Complement of color 0 } + +{ ======================================================================== } +{ === Screen ============================================================= } +{ ======================================================================== } + +type + + PScreen = ^TScreen; + + TScreen = record + NextScreen: PScreen; { linked list of screens } + FirstWindow: PWindow; { linked list Screen's Windows } + + LeftEdge, + TopEdge: SmallInt; { parameters of the screen } + Width, + Height: SmallInt; { parameters of the screen } + + MouseY, + MouseX: SmallInt; { position relative to upper-left } + + Flags: Word; { see definitions below } + + Title: PChar; { null-terminated Title text } + DefaultTitle: PChar; { for Windows without ScreenTitle } + + { Bar sizes for this Screen and all Window's in this Screen } + BarHeight, + BarVBorder, + BarHBorder, + MenuVBorder, + MenuHBorder: ShortInt; + WBorTop, + WBorLeft, + WBorRight, + WBorBottom: ShortInt; + + Font: PTextAttr; { this screen's default font } + + { the display data structures for this Screen (note the prefix S)} + ViewPort: TViewPort; { describing the Screen's display } + RastPort: TRastPort; { describing Screen rendering } + BitMap: TBitMap; { extra copy of RastPort BitMap } + LayerInfo: TLayer_Info; { each screen gets a LayerInfo } + + { You supply a linked-list of Gadgets for your Screen. + * This list DOES NOT include system Gadgets. You get the standard + * system Screen Gadgets by default + } + + FirstGadget: PGadget; + + DetailPen, + BlockPen: Byte; { for bar/border/gadget rendering } + + { the following variable(s) are maintained by Intuition to support the + * DisplayBeep() color flashing technique + } + SaveColor0: Word; + + { This layer is for the Screen and Menu bars } + BarLayer: PLayer; + + ExtData: Pointer; + UserData: Pointer; + { general-purpose pointer to User data extension } + {**** Data below this point are SYSTEM PRIVATE ****} + + end; + +const + +{ The screen flags have the suffix "_f" added to avoid conflicts with + routine names. } + + { --- FLAGS SET BY INTUITION --------------------------------------------- } +{ The SCREENTYPE bits are reserved for describing various Screen types + * available under Intuition. + } + SCREENTYPE_f = $000F; { all the screens types available } + { --- the definitions for the Screen type ------------------------------- } + WBENCHSCREEN_f = $0001; { Ta Da! The Workbench } + CUSTOMSCREEN_f = $000F; { for that special look } + + SHOWTITLE_f = $0010; { this gets set by a call to ShowTitle() } + + BEEPING_f = $0020; { set when Screen is beeping } + + CUSTOMBITMAP_f = $0040; { if you are supplying your own BitMap } + + SCREENBEHIND_f = $0080; { if you want your screen to open behind + * already open screens + } + SCREENQUIET_f = $0100; { if you do not want Intuition to render + * into your screen (gadgets, title) } + SCREENHIRES = $0200; { do no use lowres gadgets (private) } + + NS_EXTENDED = $1000; { ExtNewScreen.Extension is valid } + { V36 applications can use OpenScreenTagList() instead of NS_EXTENDED } + + { New for V39: } + PENSHARED = $0400; { Screen opener set (SA_SharePens,TRUE) } + + + AUTOSCROLL = $4000; { screen is to autoscoll } + + STDSCREENHEIGHT = -1; { supply in NewScreen.Height } + STDSCREENWIDTH = -1; { supply in NewScreen.Width } + + + +{ + * Screen attribute tag ID's. These are used in the ti_Tag field of + * TagItem arrays passed to OpenScreenTagList() (or in the + * ExtNewScreen.Extension field). + } + +{ Screen attribute tags. Please use these versions, not those in + * iobsolete.h. + } +const + SA_Dummy = (TAG_USER + 32); +{ + * these items specify items equivalent to fields in NewScreen + } + SA_Left = (SA_Dummy + $0001); + SA_Top = (SA_Dummy + $0002); + SA_Width = (SA_Dummy + $0003); + SA_Height = (SA_Dummy + $0004); + { traditional screen positions and dimensions } + SA_Depth = (SA_Dummy + $0005); + { screen bitmap depth } + SA_DetailPen = (SA_Dummy + $0006); + { serves as default for windows, too } + SA_BlockPen = (SA_Dummy + $0007); + SA_Title = (SA_Dummy + $0008); + { default screen title } + SA_Colors = (SA_Dummy + $0009); + { ti_Data is an array of struct ColorSpec, + * terminated by ColorIndex = -1. Specifies + * initial screen palette colors. + } + SA_ErrorCode = (SA_Dummy + $000A); + { ti_Data points to LONG error code (values below)} + SA_Font = (SA_Dummy + $000B); + { equiv. to NewScreen.Font } + SA_SysFont = (SA_Dummy + $000C); + { Selects one of the preferences system fonts: + * 0 - old DefaultFont, fixed-width + * 1 - WB Screen preferred font + } + SA_Type = (SA_Dummy + $000D); + { equiv. to NewScreen.type } + SA_BitMap = (SA_Dummy + $000E); + { ti_Data is pointer to custom BitMap. This + * implies type of CUSTOMBITMAP + } + SA_PubName = (SA_Dummy + $000F); + { presence of this tag means that the screen + * is to be a public screen. Please specify + * BEFORE the two tags below + } + SA_PubSig = (SA_Dummy + $0010); + SA_PubTask = (SA_Dummy + $0011); + { Task ID and signal for being notified that + * the last window has closed on a public screen. + } + SA_DisplayID = (SA_Dummy + $0012); + { ti_Data is new extended display ID from + * . + } + SA_DClip = (SA_Dummy + $0013); + { ti_Data points to a rectangle which defines + * screen display clip region + } + SA_Overscan = (SA_Dummy + $0014); + { was S_STDDCLIP. Set to one of the OSCAN_ + * specifiers below to get a system standard + * overscan region for your display clip, + * screen dimensions (unless otherwise specified), + * and automatically centered position (partial + * support only so far). + * If you use this, you shouldn't specify + * SA_DClip. SA_Overscan is for "standard" + * overscan dimensions, SA_DClip is for + * your custom numeric specifications. + } + SA_Obsolete1 = (SA_Dummy + $0015); + { obsolete S_MONITORNAME } + + {* booleans *} + SA_ShowTitle = (SA_Dummy + $0016); + { boolean equivalent to flag SHOWTITLE } + SA_Behind = (SA_Dummy + $0017); + { boolean equivalent to flag SCREENBEHIND } + SA_Quiet = (SA_Dummy + $0018); + { boolean equivalent to flag SCREENQUIET } + SA_AutoScroll = (SA_Dummy + $0019); + { boolean equivalent to flag AUTOSCROLL } + SA_Pens = (SA_Dummy + $001A); + { pointer to ~0 terminated UWORD array, as + * found in struct DrawInfo + } + SA_FullPalette = (SA_Dummy + $001B); + { boolean: initialize color table to entire + * preferences palette (32 for V36), rather + * than compatible pens 0-3, 17-19, with + * remaining palette as returned by GetColorMap() + } + + SA_ColorMapEntries = (SA_Dummy + $001C); + { New for V39: + * Allows you to override the number of entries + * in the ColorMap for your screen. Intuition + * normally allocates (1<dri_Pens, + * Intuition obtains them in shared mode (see + * graphics.library/ObtainPen()). For compatibility, + * Intuition obtains the other pens of a public + * screen as PEN_EXCLUSIVE. Screens that wish to + * manage the pens themselves should generally set + * this tag to TRUE. This instructs Intuition to + * leave the other pens unallocated. + } + + SA_BackFill = (SA_Dummy + $0021); + { New for V39: + * provides a "backfill hook" for your screen's + * Layer_Info. + * See layers.library/InstallLayerInfoHook() + } + + SA_Interleaved = (SA_Dummy + $0022); + { New for V39: + * Boolean tag requesting that the bitmap + * allocated for you be interleaved. + * (Defaults to FALSE). + } + + SA_Colors32 = (SA_Dummy + $0023); + { New for V39: + * Tag to set the screen's initial palette colors + * at 32 bits-per-gun. ti_Data is a pointer + * to a table to be passed to the + * graphics.library/LoadRGB32() function. + * This format supports both runs of color + * registers and sparse registers. See the + * autodoc for that function for full details. + * Any color set here has precedence over + * the same register set by SA_Colors. + } + + SA_VideoControl = (SA_Dummy + $0024); + { New for V39: + * ti_Data is a pointer to a taglist that Intuition + * will pass to graphics.library/VideoControl(), + * upon opening the screen. + } + + SA_FrontChild = (SA_Dummy + $0025); + { New for V39: + * ti_Data is a pointer to an already open screen + * that is to be the child of the screen being + * opened. The child screen will be moved to the + * front of its family. + } + + SA_BackChild = (SA_Dummy + $0026); + { New for V39: + * ti_Data is a pointer to an already open screen + * that is to be the child of the screen being + * opened. The child screen will be moved to the + * back of its family. + } + + SA_LikeWorkbench = (SA_Dummy + $0027); + { New for V39: + * Set ti_Data to 1 to request a screen which + * is just like the Workbench. This gives + * you the same screen mode, depth, size, + * colors, etc., as the Workbench screen. + } + + SA_Reserved = (SA_Dummy + $0028); + { Reserved for private Intuition use } + + SA_MinimizeISG = (SA_Dummy + $0029); + { New for V40: + * For compatibility, Intuition always ensures + * that the inter-screen gap is at least three + * non-interlaced lines. If your application + * would look best with the smallest possible + * inter-screen gap, set ti_Data to TRUE. + * If you use the new graphics VideoControl() + * VC_NoColorPaletteLoad tag for your screen's + * ViewPort, you should also set this tag. + } + + +{ this is an obsolete tag included only for compatibility with V35 + * interim release for the A2024 and Viking monitors + } + NSTAG_EXT_VPMODE = (TAG_USER + 1); + + +{ OpenScreen error codes, which are returned in the (optional) LONG + * pointed to by ti_Data for the SA_ErrorCode tag item + } + OSERR_NOMONITOR = (1); { named monitor spec not available } + OSERR_NOCHIPS = (2); { you need newer custom chips } + OSERR_NOMEM = (3); { couldn't get normal memory } + OSERR_NOCHIPMEM = (4); { couldn't get chipmem } + OSERR_PUBNOTUNIQUE = (5); { public screen name already used } + OSERR_UNKNOWNMODE = (6); { don't recognize mode asked for } + +{ ======================================================================== } +{ === NewScreen ========================================================== } +{ ======================================================================== } + +type + + PNewScreen = ^TNewScreen; + + TNewScreen = record + LeftEdge, + TopEdge, + Width, + Height, + Depth: SmallInt; { screen dimensions } + + DetailPen, + BlockPen: Byte; { for bar/border/gadget rendering } + + ViewModes: Word; { the Modes for the ViewPort (and View) } + + SType: Word; { the Screen type (see defines above) } + + Font: PTextAttr; { this Screen's default text attributes } + + DefaultTitle: PChar; { the default title for this Screen } + + Gadgets: PGadget; { your own Gadgets for this Screen } + + { if you are opening a CUSTOMSCREEN and already have a BitMap + * that you want used for your Screen, you set the flags CUSTOMBITMAP in + * the type field and you set this variable to point to your BitMap + * structure. The structure will be copied into your Screen structure, + * after which you may discard your own BitMap if you want + } + + CustomBitMap: PBitMap; + end; + + +type + + PExtNewScreen = ^TExtNewScreen; + + TExtNewScreen = record + LeftEdge, TopEdge, Width, Height, Depth: SmallInt; + DetailPen, BlockPen: Byte; + ViewModes: Word; + ens_Type: Word; { type in C-Includes } + Font: PTextAttr; + DefaultTitle: PChar; + Gadgets: PGadget; + CustomBitMap: PBitMap; + Extension: PTagItem; + end; + + +const + { === Overscan Types === } + OSCAN_TEXT = (1); { entirely visible } + OSCAN_STANDARD = (2); { just past edges } + OSCAN_MAX = (3); { as much as possible } + OSCAN_VIDEO = (4); { even more than is possible } + + +{ === Public Shared Screen Node === } + +{ This is the representative of a public shared screen. + * This is an internal data structure, but some functions may + * present a copy of it to the calling application. In that case, + * be aware that the screen pointer of the structure can NOT be + * used safely, since there is no guarantee that the referenced + * screen will remain open and a valid data structure. + * + * Never change one of these. + } + +type + PPubScreenNode = ^TPubScreenNode; + + TPubScreenNode = record + psn_Node: TNode; { ln_Name is screen name } + psn_Screen: PScreen; + psn_Flags: Word; { below } + psn_Size: SmallInt; { includes name buffer } + psn_VisitorCount: SmallInt; { how many visitor windows } + psn_SigTask: PTask; { who to signal when visitors gone } + psn_SigBit: Byte; { which signal } + end; + +const + PSNF_PRIVATE = ($0001); + + MAXPUBSCREENNAME = (139); { names no longer, please } + + { pub screen modes } + SHANGHAI = $0001; { put workbench windows on pub screen } + POPPUBSCREEN = $0002; { pop pub screen to front when visitor opens } + +{ New for V39: Intuition has new screen depth-arrangement and movement + * functions called ScreenDepth() and ScreenPosition() respectively. + * These functions permit the old behavior of ScreenToFront(), + * ScreenToBack(), and MoveScreen(). ScreenDepth() also allows + * independent depth control of attached screens. ScreenPosition() + * optionally allows positioning screens even though they were opened + * (SA_Draggable,FALSE). + } + +{ For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK, + * and optionally also SDEPTH_INFAMILY. + * + * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify + * SDEPTH_INFAMILY. Commodities, "input helper" programs, + * or any other program that did not open a screen should never + * use that flag. (Note that this is a style-behavior + * requirement; there is no technical requirement that the + * task calling this function need be the task which opened + * the screen). + } + + SDEPTH_TOFRONT = (0); { Bring screen to front } + SDEPTH_TOBACK = (1); { Send screen to back } + SDEPTH_INFAMILY = (2); { Move an attached screen with + * respect to other screens of + * its family + } + + { Here's an obsolete name equivalent to SDEPTH_INFAMILY: } + SDEPTH_CHILDONLY = SDEPTH_INFAMILY; + + +{ For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE, + * or SPOS_MAKEVISIBLE to describe the kind of screen positioning you + * wish to perform: + * + * SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe + * the offset in coordinates you wish to move the screen by. + * SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe + * the absolute coordinates you wish to move the screen to. + * SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the + * screen which you would like autoscrolled into view. + * + * You may additionally set SPOS_FORCEDRAG along with any of the + * above. Set this if you wish to reposition an (SA_Draggable,FALSE) + * screen that you opened. + * + * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify + * SPOS_FORCEDRAG. Commodities, "input helper" programs, + * or any other program that did not open a screen should never + * use that flag. + } + + SPOS_RELATIVE = (0); { Coordinates are relative } + + SPOS_ABSOLUTE = (1); { Coordinates are expressed as + * absolutes, not relatives. + } + + SPOS_MAKEVISIBLE = (2); { Coordinates describe a box on + * the screen you wish to be + * made visible by autoscrolling + } + + SPOS_FORCEDRAG = (4); { Move non-draggable screen } + +{ New for V39: Intuition supports double-buffering in screens, + * with friendly interaction with menus and certain gadgets. + * For each buffer, you need to get one of these structures + * from the AllocScreenBuffer() call. Never allocate your + * own ScreenBuffer structures! + * + * The sb_DBufInfo field is for your use. See the graphics.library + * AllocDBufInfo() autodoc for details. + } +type + + PScreenBuffer = ^TScreenBuffer; + + TScreenBuffer = record + sb_BitMap: PBitMap; { BitMap of this buffer } + sb_DBufInfo: PDBufInfo; { DBufInfo for this buffer } + end; + +const +{ These are the flags that may be passed to AllocScreenBuffer(). + } + SB_SCREEN_BITMAP = 1; + SB_COPY_BITMAP = 2; + + +{ ======================================================================== } +{ === Preferences ======================================================== } +{ ======================================================================== } + +const + + { these are the definitions for the printer configurations } + FILENAME_SIZE = 30; { Filename size } + + POINTERSIZE = (1 + 16 + 1) * 2; { Size of Pointer data buffer } + +{ These defines are for the default font size. These actually describe the + * height of the defaults fonts. The default font type is the topaz + * font, which is a fixed width font that can be used in either + * eighty-column or sixty-column mode. The Preferences structure reflects + * which is currently selected by the value found in the variable FontSize, + * which may have either of the values defined below. These values actually + * are used to select the height of the default font. By changing the + * height, the resolution of the font changes as well. + } + TOPAZ_EIGHTY = 8; + TOPAZ_SIXTY = 9; + +type + + PPreferences = ^TPreferences; + + TPreferences = record + { the default font height } + FontHeight: ShortInt; { height for system default font } + + { constant describing what's hooked up to the port } + PrinterPort: Byte; { printer port connection } + + { the baud rate of the port } + BaudRate: Word; { baud rate for the serial port } + + { various timing rates } + KeyRptSpeed: ttimeval; { repeat speed for keyboard } + KeyRptDelay: ttimeval; { Delay before keys repeat } + DoubleClick: ttimeval; { Interval allowed between clicks } + + { Intuition Pointer data } + PointerMatrix: array [0..POINTERSIZE - 1] of Word; + { Definition of pointer sprite } + XOffset: ShortInt; { X-Offset for active 'bit' } + YOffset: ShortInt; { Y-Offset for active 'bit' } + color17: Word; {*********************************} + color18: Word; { Colours for sprite pointer } + color19: Word; {*********************************} + PointerTicks: Word; { Sensitivity of the pointer } + + { Workbench Screen colors } + color0: Word; {*********************************} + color1: Word; { Standard default colours } + color2: Word; { Used in the Workbench } + color3: Word; {*********************************} + + { positioning data for the Intuition View } + ViewXOffset: ShortInt; { Offset for top lefthand corner } + ViewYOffset: ShortInt; { X and Y dimensions } + ViewInitX, + ViewInitY: SmallInt; { View initial offset values } + + EnableCLI: boolean; { CLI availability switch } + + { printer configurations } + PrinterType: Word; { printer type } + PrinterFilename: array [0..FILENAME_SIZE - 1] of char; + { file for printer } + + { print format and quality configurations } + PrintPitch: Word; { print pitch } + PrintQuality: Word; { print quality } + PrintSpacing: Word; { number of lines per inch } + PrintLeftMargin: Word; { left margin in characters } + PrintRightMargin: Word; { right margin in characters } + PrintImage: Word; { positive or negative } + PrintAspect: Word; { horizontal or vertical } + PrintShade: Word; { b&w, half-tone, or color } + PrintThreshold: SmallInt; { darkness ctrl for b/w dumps } + + { print paper descriptors } + PaperSize: Word; { paper size } + PaperLength: Word; { paper length in number of lines } + PaperType: Word; { continuous or single sheet } + + { Serial device settings: These are six nibble-fields in three bytes } + { (these look a little strange so the defaults will map out to zero) } + SerRWBits: Byte; + { upper nibble = (8-number of read bits) } + { lower nibble = (8-number of write bits) } + SerStopBuf: Byte; + { upper nibble = (number of stop bits - 1) } + { lower nibble = (table value for BufSize) } + SerParShk: Byte; + { upper nibble = (value for Parity setting) } + { lower nibble = (value for Handshake mode) } + LaceWB: Byte; { if workbench is to be interlaced } + + WorkName: array [0..FILENAME_SIZE - 1] of char; + { temp file for printer } + + RowSizeChange: ShortInt; + ColumnSizeChange: ShortInt; + + PrintFlags: Word; { user preference flags } + PrintMaxWidth: Word; { max width of printed picture in 10ths/inch } + PrintMaxHeight: Word; { max height of printed picture in 10ths/inch } + PrintDensity: Byte; { print density } + PrintXOffset: Byte; { offset of printed picture in 10ths/inch } + + wb_Width: Word; { override default workbench width } + wb_Height: Word; { override default workbench height } + wb_Depth: Byte; { override default workbench depth } + + ext_size: Byte; { extension information -- do not touch! } + { extension size in blocks of 64 bytes } + end; + +const + + { Workbench Interlace (use one bit) } + LACEWB = $01; + LW_RESERVED = 1; { internal use only } + + { PrinterPort } + PARALLEL_PRINTER = $00; + SERIAL_PRINTER = $01; + + { BaudRate } + BAUD_110 = $00; + BAUD_300 = $01; + BAUD_1200 = $02; + BAUD_2400 = $03; + BAUD_4800 = $04; + BAUD_9600 = $05; + BAUD_19200 = $06; + BAUD_MIDI = $07; + + { PaperType } + FANFOLD = $00; + single = $80; + + { PrintPitch } + PICA = $000; + ELITE = $400; + FINE = $800; + + { PrintQuality } + DRAFT = $000; + LETTER = $100; + + { PrintSpacing } + SIX_LPI = $000; + EIGHT_LPI = $200; + + { Print Image } + IMAGE_POSITIVE = $00; + IMAGE_NEGATIVE = $01; + + { PrintAspect } + ASPECT_HORIZ = $00; + ASPECT_VERT = $01; + + { PrintShade } + SHADE_BW = $00; + SHADE_GREYSCALE = $01; + SHADE_COLOR = $02; + + { PaperSize } + US_LETTER = $00; + US_LEGAL = $10; + N_TRACTOR = $20; + W_TRACTOR = $30; + CUSTOM_PAPER = $40; + + { New PaperSizes for V36: } + EURO_A0 = $50; { European size A0: 841 x 1189 } + EURO_A1 = $60; { European size A1: 594 x 841 } + EURO_A2 = $70; { European size A2: 420 x 594 } + EURO_A3 = $80; { European size A3: 297 x 420 } + EURO_A4 = $90; { European size A4: 210 x 297 } + EURO_A5 = $A0; { European size A5: 148 x 210 } + EURO_A6 = $B0; { European size A6: 105 x 148 } + EURO_A7 = $C0; { European size A7: 74 x 105 } + EURO_A8 = $D0; { European size A8: 52 x 74 } + + { PrinterType } + CUSTOM_NAME = $00; + ALPHA_P_101 = $01; + BROTHER_15XL = $02; + CBM_MPS1000 = $03; + DIAB_630 = $04; + DIAB_ADV_D25 = $05; + DIAB_C_150 = $06; + EPSON = $07; + EPSON_JX_80 = $08; + OKIMATE_20 = $09; + QUME_LP_20 = $0A; + { new printer entries, 3 October 1985 } + HP_LASERJET = $0B; + HP_LASERJET_PLUS = $0C; + + { Serial Input Buffer Sizes } + SBUF_512 = $00; + SBUF_1024 = $01; + SBUF_2048 = $02; + SBUF_4096 = $03; + SBUF_8000 = $04; + SBUF_16000 = $05; + + { Serial Bit Masks } + SREAD_BITS = $F0; { for SerRWBits } + SWRITE_BITS = $0F; + + SSTOP_BITS = $F0; { for SerStopBuf } + SBUFSIZE_BITS = $0F; + + SPARITY_BITS = $F0; { for SerParShk } + SHSHAKE_BITS = $0F; + +{ Serial Parity (upper nibble, after being shifted by + * macro SPARNUM() ) + } + SPARITY_NONE = 0; + SPARITY_EVEN = 1; + SPARITY_ODD = 2; + +{ Serial Handshake Mode (lower nibble, after masking using + * macro SHANKNUM() ) + } + SHSHAKE_XON = 0; + SHSHAKE_RTS = 1; + SHSHAKE_NONE = 2; + + { new defines for PrintFlags } + + CORRECT_RED = $0001; { color correct red shades } + CORRECT_GREEN = $0002; { color correct green shades } + CORRECT_BLUE = $0004; { color correct blue shades } + + CENTER_IMAGE = $0008; { center image on paper } + + IGNORE_DIMENSIONS = $0000; { ignore max width/height settings } + BOUNDED_DIMENSIONS = $0010; { use max width/height as boundaries } + ABSOLUTE_DIMENSIONS = $0020; { use max width/height as absolutes } + PIXEL_DIMENSIONS = $0040; { use max width/height as prt pixels } + MULTIPLY_DIMENSIONS = $0080; { use max width/height as multipliers } + + INTEGER_SCALING = $0100; { force integer scaling } + + ORDERED_DITHERING = $0000; { ordered dithering } + HALFTONE_DITHERING = $0200; { halftone dithering } + FLOYD_DITHERING = $0400; { Floyd-Steinberg dithering } + + ANTI_ALIAS = $0800; { anti-alias image } + GREY_SCALE2 = $1000; { for use with hi-res monitor } + + { masks used for checking bits } + + CORRECT_RGB_MASK = CORRECT_RED + CORRECT_GREEN + CORRECT_BLUE; + DIMENSIONS_MASK = BOUNDED_DIMENSIONS + ABSOLUTE_DIMENSIONS + + PIXEL_DIMENSIONS + MULTIPLY_DIMENSIONS; + DITHERING_MASK = HALFTONE_DITHERING + FLOYD_DITHERING; + + + + +{ ======================================================================== } +{ === IntuitionBase ====================================================== } +{ ======================================================================== } +{ + * Be sure to protect yourself against someone modifying these data as + * you look at them. This is done by calling: + * + * lock = LockIBase(0), which returns an Integer. When done call + * UnlockIBase(lock) where lock is what LockIBase() returned. + } + +type + + PIntuitionBase = ^TIntuitionBase; + + TIntuitionBase = record + { IntuitionBase should never be directly modified by programs } + { even a little bit, guys/gals; do you hear me? } + + LibNode: TLibrary; + + ViewLord: tView; + + ActiveWindow: PWindow; + ActiveScreen: PScreen; + + { the FirstScreen variable points to the frontmost Screen. Screens are + * then maintained in a front to back order using Screen.NextScreen + } + + FirstScreen: PScreen; { for linked list of all screens } + + Flags: LongWord; { see definitions below } + MouseY, + MouseX: SmallInt; { mouse position relative to View } + + Seconds: LongWord; { timestamp of most current input event } + Micros: LongWord; { timestamp of most current input event } + + { I told you this was private. + * The data beyond this point has changed, is changing, and + * will continue to change. + } + + end; + + +{ + * Package of information passed to custom and 'boopsi' + * gadget 'hook' functions. This structure is READ ONLY. + } +type + + PGadgetInfo = ^TGadgetInfo; + + TGadgetInfo = record + gi_Screen: PScreen; { ScreenPtr } + gi_Window: PWindow; + { null for screen gadgets }{ WindowPtr } + gi_Requester: PRequester; + { null IF not GTYP_REQGADGET }{ RequesterPtr } + + { rendering information: + * don't use these without cloning/locking. + * Official way is to call ObtainRPort() + } + gi_RastPort: PRastPort; { RastPortPtr } + gi_Layer: pLayer; { LayerPtr } + + { copy of dimensions of screen/window/g00/req(/group) + * that gadget resides in. Left/Top of this box is + * offset from window mouse coordinates to gadget coordinates + * screen gadgets: 0,0 (from screen coords) + * window gadgets (no g00): 0,0 + * GTYP_GZZGADGETs (borderlayer): 0,0 + * GZZ innerlayer gadget: borderleft, bordertop + * Requester gadgets: reqleft, reqtop + } + gi_Domain: TIBox; + + gi_Pens: record + DetailPen: Byte; + BlockPen: Byte; + end; + + { the Detail and Block pens in gi_DrInfo->dri_Pens[] are + * for the screen. Use the above for window-sensitive + * colors. + } + gi_DrInfo: PDrawInfo; { DrawInfoPtr } + + { reserved space: this structure is extensible + * anyway, but using these saves some recompilation + } + gi_Reserved: array[0..5] of LongWord; + end; + + {** system private data structure for now **} + { prop gadget extra info } + + PPGX = ^TPGX; + + TPGX = record + pgx_Container: TIBox; + pgx_NewKnob: TIBox; + end; + +{ this casts MutualExclude for easy assignment of a hook + * pointer to the unused MutualExclude field of a custom gadget + } + +{** User visible handles on objects, classes, messages **} +type + Object_ = LongWord; + PObject_ = ^Object_; + ClassID = ^Byte; + +{ + you can use this type to point to a 'generic' message, + * in the object-oriented programming parlance. Based on + * the value of 'MethodID', you dispatch to processing + * for the various message types. The meaningful parameter + * packet structure definitions are defined below. + +typedef struct + LongWord MethodID; + method-specific data follows, some examples below + *Msg; } + + PMsg = ^TMsg; + + TMsg = record + MethodID: LongWord; + end; + +{ + * Class id strings for Intuition classes. + * There's no real reason to use the uppercase constants + * over the lowercase strings, but this makes a good place + * to list the names of the built-in classes. + } +const + ROOTCLASS: PChar = 'rootclass'; { classusr.h } + IMAGECLASS: PChar = 'imageclass'; { imageclass.h } + FRAMEICLASS: PChar = 'frameiclass'; + SYSICLASS: PChar = 'sysiclass'; + FILLRECTCLASS: PChar = 'fillrectclass'; + GADGETCLASS: PChar = 'gadgetclass'; { gadgetclass.h } + PROPGCLASS: PChar = 'propgclass'; + STRGCLASS: PChar = 'strgclass'; + BUTTONGCLASS: PChar = 'buttongclass'; + FRBUTTONCLASS: PChar = 'frbuttonclass'; + GROUPGCLASS: PChar = 'groupgclass'; + ICCLASS: PChar = 'icclass'; { icclass.h } + MODELCLASS: PChar = 'modelclass'; + ITEXTICLASS: PChar = 'itexticlass'; + POINTERCLASS: PChar = 'pointerclass'; { pointerclass.h } + + +{ Dispatched method ID's + * NOTE: Applications should use Intuition entry points, not direct + * DoMethod() calls, for NewObject, DisposeObject, SetAttrs, + * SetGadgetAttrs, and GetAttr. + } + + OM_Dummy = ($100); + OM_NEW = ($101); { 'object' parameter is 'true class' } + OM_DISPOSE = ($102); { delete self (no parameters) } + OM_SET = ($103); { set attributes (in tag list) } + OM_GET = ($104); { return single attribute value } + OM_ADDTAIL = ($105); { add self to a List (let root do it) } + OM_REMOVE = ($106); { remove self from list } + OM_NOTIFY = ($107); { send to self: notify dependents } + OM_UPDATE = ($108); { notification message from somebody } + OM_ADDMEMBER = ($109); { used by various classes with lists } + OM_REMMEMBER = ($10A); { used by various classes with lists } + +{ Parameter 'Messages' passed to methods } + +{ OM_NEW and OM_SET } +type + PopSet = ^TopSet; + + TopSet = record + MethodID: LongWord; + ops_AttrList: PTagItem; { new attributes } + ops_GInfo: PGadgetInfo; { always there for gadgets, + * when SetGadgetAttrs() is used, + * but will be NULL for OM_NEW + } + end; + + { OM_NOTIFY, and OM_UPDATE } + + PopUpdate = ^TopUpdate; + + TopUpdate = record + MethodID: LongWord; + opu_AttrList: PTagItem; { new attributes } + opu_GInfo: PGadgetInfo; { non-NULL when SetGadgetAttrs OR + * notification resulting from gadget + * input occurs. + } + opu_Flags: LongWord; { defined below } + end; + +{ this flag means that the update message is being issued from + * something like an active gadget, a la GACT_FOLLOWMOUSE. When + * the gadget goes inactive, it will issue a final update + * message with this bit cleared. Examples of use are for + * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes + * for buttons. + } +const + OPUF_INTERIM = 1; + +{ OM_GET } +type + + popGet = ^topGet; + + topGet = record + MethodID, + opg_AttrID: LongWord; + opg_Storage: Pointer; { may be other types, but 'int' + * types are all LongWord + } + end; + + { OM_ADDTAIL } + + PopAddTail = ^TopAddTail; + + TopAddTail = record + MethodID: LongWord; + opat_List: pList; + end; + +{ OM_ADDMEMBER, OM_REMMEMBER } +type + + PopMember = ^TopMember; + + TopMember = record + MethodID: LongWord; + opam_Object: PObject_; + end; + + + +{*****************************************} +{** 'White box' access to struct IClass **} +{*****************************************} + +{ This structure is READ-ONLY, and allocated only by Intuition } +type + + PIClass = ^TIClass; + + TIClass = record + cl_Dispatcher: THook; + cl_Reserved: LongWord; { must be 0 } + cl_Super: PIClass; + cl_ID: ClassID; + + { where within an object is the instance data for this class? } + cl_InstOffset: Word; + cl_InstSize: Word; + + cl_UserData: LongWord; { per-class data of your choice } + cl_SubclassCount: LongWord; + { how many direct subclasses? } + cl_ObjectCount: LongWord; + { how many objects created of this class? } + cl_Flags: LongWord; + end; + +const + CLF_INLIST = $00000001; { class is in public class list } + + + +{************************************************} +{** 'White box' access to struct _Object **} +{************************************************} + +{ + * We have this, the instance data of the root class, PRECEDING + * the 'object'. This is so that Gadget objects are Gadget pointers, + * and so on. If this structure grows, it will always have o_Class + * at the end, so the macro OCLASS(o) will always have the same + * offset back from the pointer returned from NewObject(). + * + * This data structure is subject to change. Do not use the o_Node + * embedded structure. + } +type + P_Object = ^T_Object; + + T_Object = record + o_Node: TMinNode; + 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: is included at the END of this file! + } + +{ 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); + + { (PChar) 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); + + { (BOOL) Reserved for system use to indicate that the + * gadget belongs to the system. Defaults to FALSE. } + GA_SysGadget = (GA_Dummy + $001D); + + { (UWord) Reserved for system use to indicate the + * gadget type. } + GA_SysGType = (GA_Dummy + $001E); + + { (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); + + { (struct Gadget * ) Next gadget in the linked list. } + GA_Next = (GA_Dummy + $0020); + + { (struct DrawInfo * ) Some gadgets need a DrawInfo at creation time } + GA_DrawInfo = (GA_Dummy + $0021); + + { 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); + + { (Object * ) Label is an image object. } + GA_LabelImage = (GA_Dummy + $0023); + + { New for V37: + * Boolean indicates that this gadget is to participate in + * cycling activation with Tab or Shift-Tab. + } + GA_TabCycle = (GA_Dummy + $0024); + + { New for V39: + * Boolean indicates that this gadget sends gadget-help + } + GA_GadgetHelp = (GA_Dummy + $0025); + + { 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); + + { 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; + { (PChar) 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; + { (PChar) 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); + PGA_Freedom = (PGA_Dummy + $0001); + { only one of FREEVERT or FREEHORIZ } + PGA_Borderless = (PGA_Dummy + $0002); + PGA_HorizPot = (PGA_Dummy + $0003); + PGA_HorizBody = (PGA_Dummy + $0004); + PGA_VertPot = (PGA_Dummy + $0005); + PGA_VertBody = (PGA_Dummy + $0006); + PGA_Total = (PGA_Dummy + $0007); + PGA_Visible = (PGA_Dummy + $0008); + PGA_Top = (PGA_Dummy + $0009); + { New for V37: } + PGA_NewLook = (PGA_Dummy + $000A); + + { STRGCLASS attributes } + + STRINGA_Dummy = (TAG_USER + $32000); + STRINGA_MaxChars = (STRINGA_Dummy + $0001); + STRINGA_Buffer = (STRINGA_Dummy + $0002); + STRINGA_UndoBuffer = (STRINGA_Dummy + $0003); + STRINGA_WorkBuffer = (STRINGA_Dummy + $0004); + STRINGA_BufferPos = (STRINGA_Dummy + $0005); + STRINGA_DispPos = (STRINGA_Dummy + $0006); + STRINGA_AltKeyMap = (STRINGA_Dummy + $0007); + STRINGA_Font = (STRINGA_Dummy + $0008); + STRINGA_Pens = (STRINGA_Dummy + $0009); + STRINGA_ActivePens = (STRINGA_Dummy + $000A); + STRINGA_EditHook = (STRINGA_Dummy + $000B); + STRINGA_EditModes = (STRINGA_Dummy + $000C); + + { booleans } + STRINGA_ReplaceMode = (STRINGA_Dummy + $000D); + STRINGA_FixedFieldMode = (STRINGA_Dummy + $000E); + STRINGA_NoFilterMode = (STRINGA_Dummy + $000F); + + STRINGA_Justification = (STRINGA_Dummy + $0010); + { GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT } + STRINGA_LongVal = (STRINGA_Dummy + $0011); + STRINGA_TextVal = (STRINGA_Dummy + $0012); + + STRINGA_ExitHelp = (STRINGA_Dummy + $0013); + { STRINGA_ExitHelp is new for V37, and ignored by V36. + * Set this if you want the gadget to exit when Help is + * pressed. Look for a code of $5F, the rawkey code for Help + } + + SG_DEFAULTMAXCHARS = (128); + + { Gadget Layout related attributes } + + LAYOUTA_Dummy = (TAG_USER + $38000); + 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; + LORIENT_HORIZ = 1; + LORIENT_VERT = 2; + + + { Gadget Method ID's } + + GM_Dummy = (-1); { not used for anything } + GM_HITTEST = (0); { return GMR_GADGETHIT IF you are clicked on + * (whether or not you are disabled). + } + GM_RENDER = (1); { draw yourself, in the appropriate state } + GM_GOACTIVE = (2); { you are now going to be fed input } + GM_HANDLEINPUT = (3); { handle that input } + GM_GOINACTIVE = (4); { whether or not by choice, you are done } + GM_HELPTEST = (5); { Will you send gadget help if the mouse is + * at the specified coordinates? See below + * for possible GMR_ values. + } + GM_LAYOUT = (6); { re-evaluate your size based on the GadgetInfo + * Domain. Do NOT re-render yourself yet, you + * will be called when it is time... + } + +{ Parameter "Messages" passed to gadget class methods } + +{ GM_HITTEST } +type + + PgpHitTest = ^TgpHitTest; + + TgpHitTest = record + MethodID: LongWord; + gpht_GInfo: PGadgetInfo; + gpht_Mouse: record + x: SmallInt; + y: SmallInt; + end; + end; + +const +{ For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit, + * otherwise return zero. + * + * For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit. + * Typically, return GMR_HELPHIT if you were hit. + * It is possible to pass a UWord to the application via the Code field + * of the IDCMP_GADGETHELP message. Return GMR_HELPCODE or'd with + * the UWord-sized result you wish to return. + * + * GMR_HELPHIT yields a Code value of ((UWord) ~0), which should + * mean "nothing particular" to the application. + } + + GMR_GADGETHIT = ($00000004); { GM_HITTEST hit } + + GMR_NOHELPHIT = ($00000000); { GM_HELPTEST didn't hit } + GMR_HELPHIT = ($FFFFFFFF); { GM_HELPTEST hit, return code = ~0 } + GMR_HELPCODE = ($00010000); { GM_HELPTEST hit, return low Word as code } + + +{ GM_RENDER } +type + pgpRender = ^tgpRender; + + tgpRender = record + MethodID: LongWord; + gpr_GInfo: PGadgetInfo; { gadget context } + gpr_RPort: PRastPort; { all ready for use } + gpr_Redraw: LongInt; { might be a "highlight pass" } + end; + +{ values of gpr_Redraw } +const + GREDRAW_UPDATE = (2); { incremental update, e.g. prop slider } + GREDRAW_REDRAW = (1); { redraw gadget } + GREDRAW_TOGGLE = (0); { toggle highlight, IF applicable } + +{ GM_GOACTIVE, GM_HANDLEINPUT } +type + + PgpInput = ^TgpInput; + + TgpInput = record + MethodID: LongWord; + gpi_GInfo: PGadgetInfo; + gpi_IEvent: PInputEvent; + gpi_Termination: Pointer; + gpi_Mouse: record + x: SmallInt; + y: SmallInt; + end; + {* (V39) Pointer to TabletData structure, if this event originated + * from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if + * not. + * + * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39! + * IT WILL BE INVALID! + *} + gpi_TabletData: PTabletData; + end; + +{ GM_HANDLEINPUT and GM_GOACTIVE return code flags } +{ return GMR_MEACTIVE (0) alone if you want more input. + * Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally + * GMR_VERIFY. + } +const + GMR_MEACTIVE = (0); + GMR_NOREUSE = (2); + GMR_REUSE = (4); + GMR_VERIFY = (8); { you MUST set cgp_Termination } + +{ New for V37: + * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE, + * which instructs Intuition to activate the next or previous gadget + * that has GFLG_TABCYCLE set. + } + GMR_NEXTACTIVE = (16); + GMR_PREVACTIVE = (32); + +{ GM_GOINACTIVE } +type + + PgpGoInactive = ^TgpGoInactive; + + TgpGoInactive = record + MethodID: LongWord; + gpgi_GInfo: PGadgetInfo; + + { V37 field only! DO NOT attempt to read under V36! } + gpgi_Abort: LongWord; { gpgi_Abort=1 IF gadget was aborted + * by Intuition and 0 if gadget went + * inactive at its own request + } + end; + +{* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when + * the gadget is added to the window (or when the window opens, if + * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets + * list), or when the window is resized. Your gadget can set the + * GA_RelSpecial property to get GM_LAYOUT events without Intuition + * changing the interpretation of your gadget select box. This + * allows for completely arbitrary resizing/repositioning based on + * window size. + *} +{* GM_LAYOUT *} +type + + PgpLayout = ^TgpLayout; + + TgpLayout = record + MethodID: LongWord; + gpl_GInfo: PGadgetInfo; + gpl_Initial: LongWord; {* non-zero if this method was invoked + * during AddGList() or OpenWindow() + * time. zero if this method was invoked + * during window resizing. + *} + 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: LongWord; + 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: LongWord; + gpkt_GInfo: PGadgetInfo; + gpkt_IMsg: PIntuiMessage; { The IntuiMessage that triggered this } + gpkt_VanillaKey: LongWord; + 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: LongWord; { 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: LongWord; + gpki_GInfo: PGadgetInfo; + gpki_Abort: LongWord; + end; + +const + ICM_Dummy = ($0401); { used for nothing } + ICM_SETLOOP = ($0402); { set/increment loop counter } + ICM_CLEARLOOP = ($0403); { clear/decrement loop counter } + ICM_CHECKLOOP = ($0404); { set/increment loop } + + { no parameters for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP } + + { interconnection attributes used by icclass, modelclass, and gadgetclass } + ICA_Dummy = (TAG_USER + $40000); + ICA_TARGET = (ICA_Dummy + 1); + { interconnection target } + ICA_MAP = (ICA_Dummy + 2); + { interconnection map tagitem list } + ICSPECIAL_CODE = (ICA_Dummy + 3); + { a "pseudo-attribute", see below. } + +{ Normally, the value for ICA_TARGET is some object pointer, + * but if you specify the special value ICTARGET_IDCMP, notification + * will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's + * IDCMP port. See the definition of IDCMP_IDCMPUPDATE. + * + * When you specify ICTARGET_IDCMP for ICA_TARGET, the map you + * specify will be applied to derive the attribute list that is + * sent with the IDCMP_IDCMPUPDATE message. If you specify a map list + * which results in the attribute tag id ICSPECIAL_CODE, the + * lower sixteen bits of the corresponding ti_Data value will + * be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage. + } + ICTARGET_IDCMP = (not 0); + + +const + CUSTOMIMAGEDEPTH = (-1); +{ if image.Depth is this, it's a new Image class object } + + +{****************************************************} +const + IA_Dummy = (TAG_USER + $20000); + IA_Left = (IA_Dummy + $01); + IA_Top = (IA_Dummy + $02); + IA_Width = (IA_Dummy + $03); + IA_Height = (IA_Dummy + $04); + IA_FGPen = (IA_Dummy + $05); + { IA_FGPen also means "PlanePick" } + IA_BGPen = (IA_Dummy + $06); + { IA_BGPen also means "PlaneOnOff" } + IA_Data = (IA_Dummy + $07); + { bitplanes, for classic image, + * other image classes may use it for other things + } + IA_LineWidth = (IA_Dummy + $08); + IA_Pens = (IA_Dummy + $0E); + { pointer to UWord pens[], + * ala DrawInfo.Pens, MUST be + * terminated by ~0. Some classes can + * choose to have this, or SYSIA_DrawInfo, + * or both. + } + IA_Resolution = (IA_Dummy + $0F); + { packed uwords for x/y resolution into a LongWord + * ala DrawInfo.Resolution + } + + {*** see class documentation to learn which ****} + {*** classes recognize these ****} + IA_APattern = (IA_Dummy + $10); + IA_APatSize = (IA_Dummy + $11); + IA_Mode = (IA_Dummy + $12); + IA_Font = (IA_Dummy + $13); + IA_Outline = (IA_Dummy + $14); + IA_Recessed = (IA_Dummy + $15); + IA_DoubleEmboss = (IA_Dummy + $16); + IA_EdgesOnly = (IA_Dummy + $17); + + {*** "sysiclass" attributes ****} + SYSIA_Size = (IA_Dummy + $0B); + { 's below } + SYSIA_Depth = (IA_Dummy + $0C); + { this is unused by Intuition. SYSIA_DrawInfo + * is used instead for V36 + } + SYSIA_Which = (IA_Dummy + $0D); + { see 's below } + SYSIA_DrawInfo = (IA_Dummy + $18); + { pass to sysiclass, please } + + {**** obsolete: don't use these, use IA_Pens ****} + SYSIA_Pens = IA_Pens; + IA_ShadowPen = (IA_Dummy + $09); + IA_HighlightPen = (IA_Dummy + $0A); + + { New for V39: } + SYSIA_ReferenceFont = (IA_Dummy + $19); + { Font to use as reference for scaling + * certain sysiclass images + } + IA_SupportsDisable = (IA_Dummy + $1a); + { By default, Intuition ghosts gadgets itself, + * instead of relying on IDS_DISABLED or + * IDS_SELECTEDDISABLED. An imageclass that + * supports these states should return this attribute + * as TRUE. You cannot set or clear this attribute, + * however. + } + + IA_FrameType = (IA_Dummy + $1b); + { Starting with V39, FrameIClass recognizes + * several standard types of frame. Use one + * of the FRAME_ specifiers below. Defaults + * 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. + (LongWord) + } + + {* next attribute: (IA_Dummy + $1c) *} + + {***********************************************} + + { data values for SYSIA_Size } + SYSISIZE_MEDRES = (0); + SYSISIZE_LOWRES = (1); + SYSISIZE_HIRES = (2); + +{ + * SYSIA_Which tag data values: + * Specifies which system gadget you want an image for. + * Some numbers correspond to internal Intuition s + } + DEPTHIMAGE = ($00); + ZOOMIMAGE = ($01); + SIZEIMAGE = ($02); + CLOSEIMAGE = ($03); + SDEPTHIMAGE = ($05); { screen depth gadget } + LEFTIMAGE = ($0A); + UPIMAGE = ($0B); + RIGHTIMAGE = ($0C); + DOWNIMAGE = ($0D); + CHECKIMAGE = ($0E); + MXIMAGE = ($0F); { mutual exclude "button" } + {* New for V39: *} + 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" } + IM_HITTEST = $203; { return TRUE IF click hits image } + IM_ERASE = $204; { erase yourself } + IM_MOVE = $205; { draw new AND erase old, smoothly } + + IM_DRAWFRAME = $206; { draw with specified dimensions } + 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); + IDS_SELECTED = (1); { for selected gadgets } + IDS_DISABLED = (2); { for disabled gadgets } + IDS_BUSY = (3); { for future functionality } + IDS_INDETERMINATE = (4); { for future functionality } + 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; + +{ IM_FRAMEBOX } +type + + PimpFrameBox = ^TimpFrameBox; + + TimpFrameBox = record + MethodID: LongWord; + imp_ContentsBox: PIBox; { input: relative box of contents } + imp_FrameBox: PIBox; { output: rel. box of encl frame } + imp_DrInfo: PDrawInfo; + imp_FrameFlags: LongWord; + end; + +const + FRAMEF_SPECIFY = (1); { Make do with the dimensions of FrameBox + * provided. + } + +{ IM_DRAW, IM_DRAWFRAME } +type + + PimpDraw = ^TimpDraw; + + TimpDraw = record + MethodID: LongWord; + imp_RPort: PRastPort; + imp_Offset: record + x: Word; + y: Word; + end; + imp_State: LongWord; + imp_DrInfo: PDrawInfo; + + { these parameters only valid for IM_DRAWFRAME } + imp_Dimensions: record + Width: Word; + Height: Word; + end; + end; + + { IM_ERASE, IM_ERASEFRAME } + { NOTE: This is a subset of impDraw } + + PimpErase = ^TimpErase; + + TimpErase = record + MethodID: LongWord; + imp_RPort: PRastPort; + imp_Offset: record + x: Word; + y: Word; + end; + + { these parameters only valid for IM_ERASEFRAME } + imp_Dimensions: record + Width: Word; + Height: Word; + end; + end; + + { IM_HITTEST, IM_HITFRAME } + + PimpHitTest = ^TimpHitTest; + + TimpHitTest = record + MethodID: LongWord; + imp_Point: record + x: Word; + y: Word; + end; + + { these parameters only valid for IM_HITFRAME } + imp_Dimensions: record + Width: Word; + Height: Word; + 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: LongWord; + 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 +{ The following tags are recognized at NewObject() time by + * pointerclass: + * + * POINTERA_BitMap (struct BitMap * ) - Pointer to bitmap to + * get pointer imagery from. Bitplane data need not be + * in chip RAM. + * POINTERA_XOffset (Long) - X-offset of the pointer hotspot. + * POINTERA_YOffset (Long) - Y-offset of the pointer hotspot. + * POINTERA_WordWidth (LongWord) - designed width of the pointer in words + * POINTERA_XResolution (LongWord) - one of the POINTERXRESN_ flags below + * POINTERA_YResolution (LongWord) - one of the POINTERYRESN_ flags below + * + } + + POINTERA_Dummy = (TAG_USER + $39000); + + POINTERA_BitMap = (POINTERA_Dummy + $01); + POINTERA_XOffset = (POINTERA_Dummy + $02); + POINTERA_YOffset = (POINTERA_Dummy + $03); + POINTERA_WordWidth = (POINTERA_Dummy + $04); + POINTERA_XResolution = (POINTERA_Dummy + $05); + POINTERA_YResolution = (POINTERA_Dummy + $06); + +{ These are the choices for the POINTERA_XResolution attribute which + * will determine what resolution pixels are used for this pointer. + * + * POINTERXRESN_DEFAULT (ECS-compatible pointer width) + * = 70 ns if SUPERHIRES-type mode, 140 ns if not + * + * POINTERXRESN_SCREENRES + * = Same as pixel speed of screen + * + * POINTERXRESN_LORES (pointer always in lores-like pixels) + * = 140 ns in 15kHz modes, 70 ns in 31kHz modes + * + * POINTERXRESN_HIRES (pointer always in hires-like pixels) + * = 70 ns in 15kHz modes, 35 ns in 31kHz modes + * + * POINTERXRESN_140NS (pointer always in 140 ns pixels) + * = 140 ns always + * + * POINTERXRESN_70NS (pointer always in 70 ns pixels) + * = 70 ns always + * + * POINTERXRESN_35NS (pointer always in 35 ns pixels) + * = 35 ns always + } + + POINTERXRESN_DEFAULT = 0; + POINTERXRESN_140NS = 1; + POINTERXRESN_70NS = 2; + POINTERXRESN_35NS = 3; + + POINTERXRESN_SCREENRES = 4; + POINTERXRESN_LORES = 5; + POINTERXRESN_HIRES = 6; + +{ These are the choices for the POINTERA_YResolution attribute which + * will determine what vertical resolution is used for this pointer. + * + * POINTERYRESN_DEFAULT + * = In 15 kHz modes, the pointer resolution will be the same + * as a non-interlaced screen. In 31 kHz modes, the pointer + * will be doubled vertically. This means there will be about + * 200-256 pointer lines per screen. + * + * POINTERYRESN_HIGH + * POINTERYRESN_HIGHASPECT + * = Where the hardware/software supports it, the pointer resolution + * will be high. This means there will be about 400-480 pointer + * lines per screen. POINTERYRESN_HIGHASPECT also means that + * when the pointer comes out double-height due to hardware/software + * restrictions, its width would be doubled as well, if possible + * (to preserve aspect). + * + * POINTERYRESN_SCREENRES + * POINTERYRESN_SCREENRESASPECT + * = Will attempt to match the vertical resolution of the pointer + * to the screen's vertical resolution. POINTERYRESN_SCREENASPECT also + * means that when the pointer comes out double-height due to + * hardware/software restrictions, its width would be doubled as well, + * if possible (to preserve aspect). + * + } + + POINTERYRESN_DEFAULT = 0; + POINTERYRESN_HIGH = 2; + POINTERYRESN_HIGHASPECT = 3; + POINTERYRESN_SCREENRES = 4; + POINTERYRESN_SCREENRESASPECT = 5; + +{ Compatibility note: + * + * The AA chipset supports variable sprite width and resolution, but + * the setting of width and resolution is global for all sprites. + * When no other sprites are in use, Intuition controls the sprite + * width and sprite resolution for correctness based on pointerclass + * attributes specified by the creator of the pointer. Intuition + * controls sprite resolution with the VTAG_DEFSPRITERESN_SET tag + * to VideoControl(). Applications can override this on a per-viewport + * basis with the VTAG_SPRITERESN_SET tag to VideoControl(). + * + * If an application uses a sprite other than the pointer sprite, + * Intuition will automatically regenerate the pointer sprite's image in + * a compatible width. This might involve BitMap scaling of the imagery + * you supply. + * + * If any sprites other than the pointer sprite were obtained with the + * old GetSprite() call, Intuition assumes that the owner of those + * sprites is unaware of sprite resolution, hence Intuition will set the + * default sprite resolution (VTAG_DEFSPRITERESN_SET) to ECS-compatible, + * instead of as requested by the various pointerclass attributes. + * + * No resolution fallback occurs when applications use ExtSprites. + * Such applications are expected to use VTAG_SPRITERESN_SET tag if + * necessary. + * + * NB: Under release V39, only sprite width compatibility is implemented. + * Sprite resolution compatibility was added for V40. + } + + +type + + PStringExtend = ^TStringExtend; + + TStringExtend = record + { display specifications } + Font: PTextFont; { must be an open Font (not TextAttr) } + Pens: array[0..1] of Byte; { color of text/backgroun } + ActivePens: array[0..1] of Byte; { colors when gadget is active } + + { edit specifications } + InitialModes: LongWord; { initial mode flags, below } + EditHook: PHook; { IF non-NULL, must supply WorkBuffer } + WorkBuffer: PChar; { must be as large as StringInfo.Buffer} + + Reserved: array[0..3] of LongWord; { set to 0 } + end; + + pSGWork = ^tSGWork; + + tSGWork = record + { set up when gadget is first activated } + Gad: PGadget; { the contestant itself } + { Gadget in C-Includes } + StrInfo: PStringInfo; + { easy access to sinfo }{ StrInfo in C-Includes } + WorkBuffer: PChar; { intuition's planned result } + PrevBuffer: PChar; { what was there before } + Modes: LongWord; { current mode } + + { modified for each input event } + IEvent: PInputEvent; { actual event: do not change } + Code: Word; { character code, IF one Byte } + BufferPos: SmallInt; { cursor position } + NumChars: SmallInt; + Actions: LongWord; { what Intuition will do } + LongInt_: LongInt; { temp storage for LongInt } + + GInfo: PGadgetInfo; + { see cghooks.h }{ GadgetInfo in C-Includes } + EditOp: Word; { from constants below } + end; + +{ SGWork.EditOp - + * These values indicate what basic type of operation the global + * editing hook has performed on the string before your gadget's custom + * editing hook gets called. You do not have to be concerned with the + * value your custom hook leaves in the EditOp field, only if you + * write a global editing hook. + * + * For most of these general edit operations, you'll want to compare + * the BufferPos and NumChars of the StringInfo (before global editing) + * and SGWork (after global editing). + } + +const + EO_NOOP = ($0001); + { did nothing } + EO_DELBACKWARD = ($0002); + { deleted some chars (maybe 0). } + EO_DELFORWARD = ($0003); + { deleted some characters under and in front of the cursor } + EO_MOVECURSOR = ($0004); + { moved the cursor } + EO_ENTER = ($0005); + { "enter" or "return" key, terminate } + EO_RESET = ($0006); + { current Intuition-style undo } + EO_REPLACECHAR = ($0007); + { replaced one character and (maybe) advanced cursor } + EO_INSERTCHAR = ($0008); + { inserted one char into string or added one at end } + EO_BADFORMAT = ($0009); + { didn't like the text data, e.g., Bad LONGINT } + EO_BIGCHANGE = ($000A); { unused by Intuition } + { complete or major change to the text, e.g. new string } + EO_UNDO = ($000B); { unused by Intuition } + { some other style of undo } + EO_CLEAR = ($000C); + { clear the string } + EO_SPECIAL = ($000D); { unused by Intuition } + { some operation that doesn't fit into the categories here } + + + { Mode Flags definitions (ONLY first group allowed as InitialModes) } + SGM_REPLACE = (1); { replace mode } +{ please initialize StringInfo with in-range value of BufferPos + * if you are using SGM_REPLACE mode. + } + + SGM_FIXEDFIELD = (2); { fixed length buffer } + { always set SGM_REPLACE, too } + SGM_NOFILTER = (4); { don't filter control chars } + + { SGM_EXITHELP is new for V37, and ignored by V36: } + SGM_EXITHELP = (128); { exit with code = $5F IF HELP hit } + + + { These Mode Flags are for internal use only } + SGM_NOCHANGE = (8); { no edit changes yet } + SGM_NOWORKB = (16); { Buffer == PrevBuffer } + SGM_CONTROL = (32); { control char escape mode } + SGM_LONGINT = (64); { an intuition LongInt gadget } + + { String Gadget Action Flags (put in SGWork.Actions by EditHook) } + SGA_USE = ($1); { use contents of SGWork } + SGA_END = ($2); { terminate gadget, code in Code field } + SGA_BEEP = ($4); { flash the screen for the user } + SGA_REUSE = ($8); { reuse input event } + SGA_REDISPLAY = ($10); { gadget visuals changed } + + { New for V37: } + SGA_NEXTACTIVE = ($20); { Make next possible gadget active. } + SGA_PREVACTIVE = ($40); { Make previous possible gadget active.} + + { function id for only existing custom string gadget edit hook } + + SGH_KEY = (1); { process editing keystroke } + SGH_CLICK = (2); { process mouse click cursor position } + +{ Here's a brief summary of how the custom string gadget edit hook works: + * You provide a hook in StringInfo.Extension.EditHook. + * The hook is called in the standard way with the 'object' + * a pointer to SGWork, and the 'message' a pointer to a command + * block, starting either with (LongWord) SGH_KEY, SGH_CLICK, + * or something new. + * + * You return 0 if you don't understand the command (SGH_KEY is + * required and assumed). Return non-zero if you implement the + * command. + * + * SGH_KEY: + * There are no parameters following the command LongWord. + * + * Intuition will put its idea of proper values in the SGWork + * before calling you, and if you leave SGA_USE set in the + * SGWork.Actions field, Intuition will use the values + * found in SGWork fields WorkBuffer, NumChars, BufferPos, + * and LongInt, copying the WorkBuffer back to the StringInfo + * Buffer. + * + * NOTE WELL: You may NOT change other SGWork fields. + * + * If you clear SGA_USE, the string gadget will be unchanged. + * + * If you set SGA_END, Intuition will terminate the activation + * of the string gadget. If you also set SGA_REUSE, Intuition + * will reuse the input event after it deactivates your gadget. + * + * In this case, Intuition will put the value found in SGWork.Code + * into the IntuiMessage.Code field of the IDCMP_GADGETUP message it + * sends to the application. + * + * If you set SGA_BEEP, Intuition will call DisplayBeep(); use + * this if the user has typed in error, or buffer is full. + * + * Set SGA_REDISPLAY if the changes to the gadget warrant a + * gadget redisplay. Note: cursor movement requires a redisplay. + * + * Starting in V37, you may set SGA_PREVACTIVE or SGA_NEXTACTIVE + * when you set SGA_END. This tells Intuition that you want + * the next or previous gadget with GFLG_TABCYCLE to be activated. + * + * SGH_CLICK: + * This hook command is called when Intuition wants to position + * the cursor in response to a mouse click in the string gadget. + * + * Again, here are no parameters following the command LongWord. + * + * This time, Intuition has already calculated the mouse position + * character cell and put it in SGWork.BufferPos. The previous + * BufferPos value remains in the SGWork.StringInfo.BufferPos. + * + * Intuition will again use the SGWork fields listed above for + * SGH_KEY. One restriction is that you are NOT allowed to set + * SGA_END or SGA_REUSE for this command. Intuition will not + * stand for a gadget which goes inactive when you click in it. + * + * You should always leave the SGA_REDISPLAY flag set, since Intuition + * uses this processing when activating a string gadget. + } + +type + PNewDecorator = ^TNewDecorator; + TNewDecorator = record + nd_Node: TNode; + nd_Port: PMsgPort; + nd_cnt: LongWord; + nd_Pattern: PChar; + nd_IntPattern: PChar; + nd_Window: PObject_; + nd_Screen: PObject_; + nd_Menu: PObject_; + end; + + + + + +function ActivateGadget(Gadgets: PGadget; Window: PWindow; + Requester: PRequester): Boolean; +procedure ActivateWindow(Window: PWindow); +procedure AddClass(ClassPtr: PIClass); +function AddGadget(Window: PWindow; Gadget: PGadget; Position: LongWord): Word; +function AddGList(Window: PWindow; Gadget: PGadget; Position: LongWord; + NumGad: LongInt; Requester: PRequester): Word; +function AllocIntuiMessage(Window: PWindow): PIntuiMessage; +function AllocRemember(var RememberKey: PRemember; Size: LongWord; + Flags: LongWord): Pointer; +function AllocScreenBuffer(Sc: PScreen; Bm: PBitMap; Flags: LongWord): PScreenBuffer; +procedure AlohaWorkbench(MsgPort: PMsgPort); +function AutoRequest(Window: PWindow; const Body: PIntuiText; + const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; + NFlag: LongWord; Width: LongWord; Height: LongWord): Boolean; +procedure BeginRefresh(Window: PWindow); +function BuildEasyRequestArgs(Window : PWindow;const easyStruct : PEasyStruct; idcmp : LongWord;const args : Pointer) : PWindow; +function BuildSysRequest(Window: PWindow; const Body: PIntuiText; + const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; + Width: LongWord; Height: LongWord): PWindow; +function ChangeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer): LongWord; +procedure ChangeWindowBox(Window: PWindow; left: LongInt; top: LongInt; + Width: LongInt; Height: LongInt); +function ClearDMRequest(Window: PWindow): Boolean; +procedure ClearMenuStrip(Window: PWindow); +procedure ClearPointer(Window: PWindow); +procedure CloseScreen(Screen: PScreen); +procedure CloseWindow(Window: PWindow); +function CloseWorkBench: Boolean; +procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); +function ChangeWindowShape(Window: PWindow; NewShape: PRegion; CallBack: PHook): PRegion; +procedure CurrentTime(var Seconds: LongWord; var Micros: LongWord); +function DisplayAlert(AlertNumber: LongWord; + const string_: PChar; Height: LongWord): Boolean; +procedure DisplayBeep(Screen: PScreen); +procedure DisposeObject(obj : Pointer); +function DoGadgetMethodA(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg): LongWord; +function DoNotify(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate): Pointer; +function DoubleClick(SSeconds: LongWord; SMicros: LongWord; + CSeconds: LongWord; CMicros: LongWord): Boolean; +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 : LongWord;const DrawInfo : PDrawInfo); +function EasyRequestArgs(Window: PWindow; + const EasyStruct: PEasyStruct; IdcmpPtr: PLongWord; const args: Pointer): LongInt; +procedure EndRefresh(Window: PWindow; Complete: Boolean); +procedure EndRequest(Requester: PRequester; Window: PWindow); +function EndScreenNotify(Notify: Pointer): Boolean; +procedure EraseImage(Rp : PRastPort; Image : PImage; LeftOffset : LongInt; TopOffset : LongInt); +function FindClass(ClassID: PChar): PIClass; +function FreeClass(ClassPtr : PIClass) : Boolean; +procedure FreeICData(ICData: Pointer); +procedure FreeIntuiMessage(IMsg: PIntuiMessage); +procedure FreeMonitorList(Obj: Pointer); +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: psmallint); +function GetAttr(attrID: LongWord; obj: Pointer; storagePtr: PLongWord): LongWord; +procedure GetDefaultPubScreen(nameBuffer : PChar); +function GetDefPrefs(preferences: PPreferences; Size: LongInt): PPreferences; +function GetMonitorList(Tags: PTagItem): Pointer; +function GetPrefs(preferences: PPreferences; Size: LongInt): PPreferences; +function GetScreenData(buffer: Pointer; Size: LongWord; type_: LongWord; + const Screen: PScreen): Boolean; +function GetScreenDrawInfo(Screen : PScreen) : PDrawInfo; +procedure HelpControl(Win: PWindow; Flags: LongWord); +procedure HideWindow(Window: PWindow); +procedure InitRequester(Requester: PRequester); +function IntuiTextLength(const iText: PIntuiText): LongInt; +function ItemAddress(const menuStrip: pMenu; menuNumber: LongWord): PMenuItem; +function IsWindowVisible(Window: PWindow): LongWord; +procedure LendMenus(FromWindow: PWindow; ToWindow: PWindow); +function LockIBase(LockNumber: LongWord): LongWord; +function LockPubScreen(const Name: PChar): PScreen; +function LockPubScreenList: PList; +function MakeClass(const classID : PChar;const superClassID : PChar;const superClassPtr : PIClass; instanceSize : LongWord; Flags : LongWord) : PIClass; +function MakeScreen(Screen: PScreen): LongInt; +function ModifyIDCMP(Window: PWindow; Flags: LongWord): Boolean; +procedure ModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; + Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; + HorizBody: LongWord; VertBody: LongWord); +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: LongWord; HorizPot: LongWord; + VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; NumGad: LongInt); +function NewObjectA(ClassPtr : PIClass;const classID : PChar;const tagList : PTagItem) : Pointer; +function NextObject(ObjectPtrPtr: Pointer): PIClass; +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: LongWord); +procedure OnGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); +procedure OnMenu(Window: PWindow; MenuNumber: LongWord); +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: LongWord; +function PointInImage(point : LongWord; Image : PImage) : Boolean; +procedure PrintIText(Rp: PRastPort; + const IText: PIntuiText; Left: LongInt; Top: LongInt); +function PubScreenStatus(Screen: PScreen; StatusFlags: LongWord): Word; +function QueryOverscan(DisplayID: LongWord; Rect: pRectangle; + OScanType: LongInt): LongInt; +procedure RefreshGadgets(Gadgets: PGadget; Window: PWindow; Requester: PRequester); +procedure RefreshGList(Gadgets: PGadget; Window: PWindow; + Requester: PRequester; NumGad: LongInt); +procedure RefreshWindowFrame(Window: PWindow); +procedure ReleaseGIRPort(Rp: PRastPort); +function RemakeDisplay: LongInt; +procedure RemoveClass(ClassPtr: PIClass); +function RemoveGadget(Window: PWindow; Gadget: PGadget): Word; +function RemoveGList(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt): Word; +procedure ReportMouse(flag: LongInt; Window: PWindow); +function Request(Requester: PRequester; Window: PWindow): Boolean; +function ResetMenuStrip(Window : PWindow; menu : pMenu) : Boolean; +function RethinkDisplay: LongInt; +procedure ScreenDepth(Screen: PScreen; Flags: LongWord; Reserved: Pointer); +procedure ScreenPosition(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt); +procedure ScreenToBack(Screen: PScreen); +procedure ScreenToFront(Screen: PScreen); +procedure ScrollWindowRaster(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt); +procedure ScrollWindowRasterNoFill(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word); +procedure SendIntuiMessage(Window: PWindow; IMsg: PIntuiMessage); +function SetAttrsA(obj: Pointer; const TagList: PTagItem): LongWord; +procedure SetDefaultPubScreen(const Name: PChar); +procedure SetDefaultScreenFont(TextFont: PTextFont); +function SetDMRequest(Window: PWindow; Requester: PRequester): Boolean; +function SetEditHook(hook: PHook): PHook; +function SetGadgetAttrsA(Gadget : PGadget; Window : PWindow; Requester : PRequester;const TagList : PTagItem) : LongWord; +function SetMenuStrip(Window: PWindow; menu: pMenu): Boolean; +function SetMouseQueue(Window: PWindow; queueLength: LongWord): LongInt; +procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; + Width: LongInt; XOffset: LongInt; YOffset: LongInt); +function SetPointerBounds(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem): LongWord; +function SetPrefs(const Preferences: PPreferences; Size: LongInt; + Inform: LongInt): PPreferences; +function SetPubScreenModes(modes: LongWord): Word; +procedure SetWindowPointerA(Win : PWindow;const Taglist : PTagItem); +procedure SetWindowTitles(Window: PWindow; const WindowTitle: PChar; + const ScreenTitle: PChar); +procedure ShowTitle(Screen: PScreen; showIt: LongInt); +procedure ShowWindow(Window: PWindow); +procedure SizeWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); +function StartScreenNotifyTagList(Tags: PTagItem): Pointer; +function SysReqHandler(Window : PWindow; IdcmpPtr : PLongWord; waitInput : LongInt) : LongInt; +function TimedDisplayAlert(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord): Boolean; +procedure UnlockIBase(LockNumber: LongWord); +procedure UnlockPubScreen(const Name: PChar; Screen: PScreen); +procedure UnlockPubScreenList; +function ViewAddress: PView; +function ViewPortAddress(const Window: PWindow): PViewPort; +function WBenchToBack: Boolean; +function WBenchToFront: Boolean; +procedure WindowAction(Window: PWindow; Action: LongWord; Tags: PTagItem); +function WindowLimits(Window: PWindow; WidthMin: LongInt; HeightMin: LongInt; + WidthMax: LongWord; HeightMax: LongWord): Boolean; +procedure WindowToBack(Window: PWindow); +procedure WindowToFront(Window: PWindow); +procedure ZipWindow(Window: PWindow); + +function SetAttrs(Obj: Pointer; const Tags: array of const): LongWord; + +function OCLASS(O: Pointer): PIClass; + +function Has_Children(Win: PWindow): Boolean; +function Is_Children(Win: PWindow): Boolean; + +{ Intuition macros } +{ +function INST_DATA (Cl: PIClass; O: P_Object): Pointer; +function SIZEOF_INSTANCE (Cl: PIClass): LongInt; +function BASEOBJECT (O: P_Object): Pointer; +function _OBJ(O: P_Object): P_Object; +function __OBJECT (O: Pointer): P_Object; +function OCLASS (O: Pointer): PIClass; +function SHIFTITEM (N: SmallInt): Word; +function SHIFTMENU (N: SmallInt): Word; +function SHIFTSUB (N: SmallInt): Word; +function FULLMENUNUM (Menu, Item, Sub: SmallInt): Word; +function IM_BGPEN (Im: PImage): Byte; +function IM_BOX (Im: PImage): PIBox; +function IM_FGPEN (Im: PImage): Byte; +function GADGET_BOX (G: PGadget): PIBox; +function CUSTOM_HOOK (Gadget: PGadget): PHook; +function ITEMNUM(N : Word): Word; +function MENUNUM(N : Word): Word; +function SUBNUM(N : Word): Word; } + +//function DisplayAlert(AlertNumber : LongWord;const String_ : string; Height : LongWord) : Boolean; +//function LockPubScreen(const Name : string) : PScreen; +//function MakeClass(const ClassID : string;const superClassID : PChar;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; +//function MakeClass(const ClassID : PChar;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; +//function MakeClass(const ClassID : string;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : 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 : LongWord;const String_ : string; Height : LongWord; Time : LongWord) : Boolean; +//PROCEDURE UnlockPubScreen(const Name : string; Screen : PScreen); + +implementation + +uses + tagsarray, longarray; + + +{ +function INST_DATA (Cl: PIClass; O: P_Object): Pointer; +begin + INST_DATA := Pointer(LongInt(O) + Cl^.cl_InstOffset); +end; + +function SIZEOF_INSTANCE (Cl: PIClass): LongInt; +begin + SIZEOF_INSTANCE := Cl^.cl_InstOffset + Cl^.cl_InstSize + sizeof(T_Object); +end; + +function BASEOBJECT (O: P_Object): Pointer; +begin + BASEOBJECT := Pointer(LongInt(O) + sizeof(T_Object)); +end; + +function _OBJ(O: P_Object): P_Object; +begin + _OBJ := P_Object(O); +END; + +function __OBJECT (O: Pointer): P_Object; +begin + __OBJECT := P_Object(LongInt(O) - sizeof(T_Object)) +end; + +function OCLASS (O: Pointer): PIClass; +var + Obj: P_Object; +begin + Obj := P_Object(LongInt(O) - sizeof(T_Object)); + OCLASS := Obj^.o_Class; +end; + +function SHIFTITEM (N: SmallInt): Word; +begin + SHIFTITEM := (N and $3f) shl 5 +end; + +function SHIFTMENU (N: SmallInt): Word; +begin + SHIFTMENU := N and $1f +end; + +function SHIFTSUB (N: SmallInt): Word; +begin + SHIFTSUB := (N and $1f) shl 11 +end; + +function FULLMENUNUM (Menu, Item, Sub: SmallInt): Word; +begin + FULLMENUNUM := ((Sub and $1f) shl 11) or + ((Item and $3f) shl 5) or + (Menu and $1f) +end; +} + + +{ The next functons _BGPEN AND _FGPEN aren't a full replacement of the + C macros because the C preprocessor makes it possible to set the + A/BPen values of the Image class objects as well. This can't work + in pascal, of course! +} +{ +function IM_BGPEN (Im: PImage): Byte; +begin + IM_BGPEN := Im^.PlaneOnOff; +end; + +function IM_BOX (Im: PImage): PIBox; +begin + IM_BOX := PIBox(@Im^.LeftEdge); +END; + +function IM_FGPEN (Im: PImage): Byte; +begin + IM_FGPEN := Im^.PlanePick; +end; + +function GADGET_BOX (G: PGadget): PIBox; +begin + GADGET_BOX := PIBox(@G^.LeftEdge); +end; + +function CUSTOM_HOOK (Gadget: PGadget): PHook; +begin + CUSTOM_HOOK := PHook(Gadget^.MutualExclude); +end; + +function ITEMNUM( N : Word): Word; +begin + ITEMNUM := (N shr 5) and $3F +end; + +function MENUNUM( N : Word): Word; +begin + MENUNUM := N and $1f +end; + +function SUBNUM( N : Word): Word; +begin + SUBNUM := (N shr 11) and $1f +end;} + + + + +{ +function DisplayAlert(AlertNumber : LongWord;const String_ : string; Height : LongWord) : Boolean; +begin + DisplayAlert := DisplayAlert(AlertNumber,pas2c(String_),Height); +end; + +function LockPubScreen(const Name : string) : PScreen; +begin + LockPubScreen := LockPubScreen(pas2c(Name)); +end; + +function MakeClass(const ClassID : string;const superClassID : PChar;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; +begin + MakeClass := MakeClass(pas2c(ClassID),superClassID,SuperClassPtr,InstanceSize,Flags); +end; + +function MakeClass(const ClassID : PChar;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; +begin + MakeClass := MakeClass(ClassID,pas2c(superClassID),SuperClassPtr,InstanceSize,Flags); +end; + +function MakeClass(const ClassID : string;const superClassID : string;const SuperClassPtr : PIClass; InstanceSize : LongWord; Flags : LongWord) : PIClass; +begin + MakeClass := MakeClass(pas2c(ClassID),pas2c(superClassID),SuperClassPtr,InstanceSize,Flags); +end; + +function NewObjectA(ClassPtr : PIClass;const ClassID : string;const TagList : PTagItem) : Pointer; +begin + NewObjectA := NewObjectA(ClassPtr,pas2c(ClassID),Taglist); +end; + +PROCEDURE SetDefaultPubScreen(const Name : string); +begin + SetDefaultPubScreen(pas2c(Name)); +end; + +PROCEDURE SetWindowTitles(Window : PWindow;const WindowTitle : string;const ScreenTitle : PChar); +begin + SetWindowTitles(Window,pas2c(WindowTitle),ScreenTitle); +end; + +PROCEDURE SetWindowTitles(Window : PWindow;const WindowTitle : PChar;const ScreenTitle : string); +begin + SetWindowTitles(Window,WindowTitle,pas2c(ScreenTitle)); +end; + +PROCEDURE SetWindowTitles(Window : PWindow;const WindowTitle : string;const ScreenTitle : string); +begin + SetWindowTitles(Window,pas2c(WindowTitle),pas2c(ScreenTitle)); +end; + +function TimedDisplayAlert(AlertNumber : LongWord;const String_ : string; Height : LongWord; Time : LongWord) : Boolean; +begin + TimedDisplayAlert := TimedDisplayAlert(AlertNumber,pas2c(String_),Height,Time); +end; + +PROCEDURE UnlockPubScreen(const Name : string; Screen : PScreen); +begin + UnlockPubScreen(pas2c(Name),Screen); +end; + } +var + IntuitionBase: Pointer; + + +function AddGadget(Window: PWindow; Gadget: PGadget; Position: LongWord): Word; +type + TLocalCall = function(Window: PWindow; Gadget: PGadget; Position: LongWord; + Base: Pointer): Word; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 7)); + AddGadget := Call(Window, Gadget, Position, IntuitionBase); +end; + +function ClearDMRequest(Window: PWindow): Boolean; +type + TLocalCall = function(Window: PWindow; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 8)); + Result := Call(Window, IntuitionBase); +end; + +procedure ClearMenuStrip(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 9)); + Call(Window, IntuitionBase); +end; + +procedure ClearPointer(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 10)); + Call(Window, IntuitionBase); +end; + +procedure CloseScreen(Screen: PScreen); +type + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 11)); + Call(Screen, IntuitionBase); +end; + +procedure CloseWindow(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 12)); + Call(Window, IntuitionBase); +end; + +function CloseWorkBench: Boolean; +type + TLocalCall = function(Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 13)); + Result := Call(IntuitionBase); +end; + +procedure CurrentTime(var Seconds: LongWord; var Micros: LongWord); +type + TLocalCall = procedure(var Seconds: LongWord; var Micros: LongWord; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 14)); + Call(Seconds, Micros, IntuitionBase); +end; + +function DisplayAlert(AlertNumber: LongWord; + const String_: PChar; Height: LongWord): Boolean; +type + TLocalCall = function(AlertNumber: LongWord; + const String_: PChar; Height: LongWord; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 15)); + Result := Call(AlertNumber, String_, Height, IntuitionBase); +end; + +procedure DisplayBeep(Screen: PScreen); +type + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 16)); + Call(Screen, IntuitionBase); +end; + +function DoubleClick(SSeconds: LongWord; SMicros: LongWord; + CSeconds: LongWord; CMicros: LongWord): Boolean; +type + TLocalCall = function(SSeconds: LongWord; SMicros: LongWord; + CSeconds: LongWord; CMicros: LongWord; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 17)); + Result := Call(SSeconds, SMicros, CSeconds, CMicros, IntuitionBase); +end; + +procedure DrawBorder(Rp: PRastPort; + const Border: PBorder; LeftOffset: LongInt; TopOffset: LongInt); +type + TLocalCall = procedure(Rp: PRastPort; + const Border: PBorder; LeftOffset: LongInt; TopOffset: LongInt; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 18)); + Call(Rp, Border, LeftOffset, TopOffset, IntuitionBase); +end; + +procedure DrawImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; + TopOffset: LongInt); +type + TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; + TopOffset: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 19)); + Call(Rp, Image, LeftOffset, TopOffset, IntuitionBase); +end; + +procedure EndRequest(Requester: PRequester; Window: PWindow); +type + TLocalCall = procedure(Requester: PRequester; Window: PWindow; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 20)); + Call(Requester, Window, IntuitionBase); +end; + +function GetDefPrefs(Preferences: PPreferences; Size: LongInt): PPreferences; +type + TLocalCall = function(Preferences: PPreferences; Size: LongInt; + Base: Pointer): PPreferences; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 21)); + Result := Call(Preferences, Size, IntuitionBase); +end; + +function GetPrefs(Preferences: PPreferences; Size: LongInt): PPreferences; +type + TLocalCall = function(Preferences: PPreferences; Size: LongInt; + Base: Pointer): PPreferences; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 22)); + Result := Call(Preferences, Size, IntuitionBase); +end; + +procedure InitRequester(Requester: PRequester); +type + TLocalCall = procedure(Requester: PRequester; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 23)); + Call(Requester, IntuitionBase); +end; + +function ItemAddress(const MenuStrip: PMenu; MenuNumber: LongWord): PMenuItem; +type + TLocalCall = function(const MenuStrip: PMenu; MenuNumber: LongWord; + Base: Pointer): PMenuItem; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 24)); + Result := Call(MenuStrip, MenuNumber, IntuitionBase); +end; + +function ModifyIDCMP(Window: PWindow; Flags: LongWord): Boolean; +type + TLocalCall = function(Window: PWindow; Flags: LongWord; Base: Pointer): Boolean; + cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 25)); + Result := Call(Window, Flags, IntuitionBase); +end; + +procedure ModifyProp(Gadget: PGadget; Window: PWindow; Requester: PRequester; + Flags: LongWord; HorizPot: LongWord; VertPot: LongWord; + HorizBody: LongWord; VertBody: LongWord); +type + TLocalCall = procedure(Gadget: PGadget; Window: PWindow; + Requester: PRequester; Flags: LongWord; HorizPot: LongWord; + VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 26)); + Call(Gadget, Window, Requester, Flags, HorizPot, VertPot, HorizBody, + VertBody, IntuitionBase); +end; + +procedure MoveScreen(Screen: PScreen; Dx: LongInt; Dy: LongInt); +type + TLocalCall = procedure(Screen: PScreen; Dx: LongInt; Dy: LongInt; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 27)); + Call(Screen, Dx, Dy, IntuitionBase); +end; + +procedure MoveWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); +type + TLocalCall = procedure(Window: PWindow; Dx: LongInt; Dy: LongInt; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 28)); + Call(Window, Dx, Dy, IntuitionBase); +end; + +procedure OffGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); +type + TLocalCall = procedure(Gadget: PGadget; Window: PWindow; + Requester: PRequester; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 29)); + Call(Gadget, Window, Requester, IntuitionBase); +end; + +procedure OffMenu(Window: PWindow; MenuNumber: LongWord); +type + TLocalCall = procedure(Window: PWindow; MenuNumber: LongWord; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 30)); + Call(Window, MenuNumber, IntuitionBase); +end; + +procedure OnGadget(Gadget: PGadget; Window: PWindow; Requester: PRequester); +type + TLocalCall = procedure(Gadget: PGadget; Window: PWindow; + Requester: PRequester; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 31)); + Call(Gadget, Window, Requester, IntuitionBase); +end; + +procedure OnMenu(Window: PWindow; MenuNumber: LongWord); +type + TLocalCall = procedure(Window: PWindow; MenuNumber: LongWord; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 32)); + Call(Window, MenuNumber, IntuitionBase); +end; + +function OpenScreen(const NewScreen: PNewScreen): PScreen; +type + TLocalCall = function(const NewScreen: PNewScreen; Base: Pointer): PScreen; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 33)); + Result := Call(NewScreen, IntuitionBase); +end; + +function OpenWindow(const NewWindow: PNewWindow): PWindow; +type + TLocalCall = function(const NewWindow: PNewWindow; Base: Pointer): PWindow; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 34)); + Result := Call(NewWindow, IntuitionBase); +end; + +function OpenWorkBench: LongWord; +type + TLocalCall = function(Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 35)); + Result := Call(IntuitionBase); +end; + +procedure PrintIText(Rp: PRastPort; + const IText: PIntuiText; Left: LongInt; Top: LongInt); +type + TLocalCall = procedure(Rp: PRastPort; + const IText: PIntuiText; Left: LongInt; Top: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 36)); + Call(Rp, IText, Left, Top, IntuitionBase); +end; + +procedure RefreshGadgets(gadgets: PGadget; Window: PWindow; Requester: PRequester); +type + TLocalCall = procedure(gadgets: PGadget; Window: PWindow; + Requester: PRequester; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 37)); + Call(gadgets, Window, Requester, IntuitionBase); +end; + +function RemoveGadget(Window: PWindow; Gadget: PGadget): Word; +type + TLocalCall = function(Window: PWindow; Gadget: PGadget; Base: Pointer): Word; + cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 38)); + Result := Call(Window, Gadget, IntuitionBase); +end; + +procedure ReportMouse(flag: LongInt; Window: PWindow); +type + TLocalCall = procedure(flag: LongInt; Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 39)); + Call(flag, Window, IntuitionBase); +end; + +function Request(Requester: PRequester; Window: PWindow): Boolean; +type + TLocalCall = function(Requester: PRequester; Window: PWindow; + Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 40)); + Result := Call(Requester, Window, IntuitionBase); +end; + +procedure ScreenToBack(Screen: PScreen); +type + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 41)); + Call(Screen, IntuitionBase); +end; + +procedure ScreenToFront(Screen: PScreen); +type + TLocalCall = procedure(Screen: PScreen; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 42)); + Call(Screen, IntuitionBase); +end; + +function SetDMRequest(Window: PWindow; Requester: PRequester): Boolean; +type + TLocalCall = function(Window: PWindow; Requester: PRequester; + Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 43)); + Result := Call(Window, Requester, IntuitionBase); +end; + +function SetMenuStrip(Window: PWindow; Menu: pMenu): Boolean; +type + TLocalCall = function(Window: PWindow; Menu: pMenu; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 44)); + Result := Call(Window, Menu, IntuitionBase); +end; + +procedure SetPointer(Window: PWindow; Pointer_: PWord; Height: LongInt; + Width: LongInt; XOffset: LongInt; YOffset: LongInt); +type + TLocalCall = procedure(Window: PWindow; Pointer_: PWord; Height: LongInt; + Width: LongInt; XOffset: LongInt; YOffset: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 45)); + Call(Window, Pointer_, Height, Width, XOffset, YOffset, IntuitionBase); +end; + +procedure SetWindowTitles(Window: PWindow; const WindowTitle: PChar; + const ScreenTitle: PChar); +type + TLocalCall = procedure(Window: PWindow; const WindowTitle: PChar; + const ScreenTitle: PChar; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 46)); + Call(Window, WindowTitle, ScreenTitle, IntuitionBase); +end; + +procedure ShowTitle(Screen: PScreen; showIt: LongInt); +type + TLocalCall = procedure(Screen: PScreen; showIt: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 47)); + Call(Screen, showit, IntuitionBase); +end; + +procedure SizeWindow(Window: PWindow; Dx: LongInt; Dy: LongInt); +type + TLocalCall = procedure(Window: PWindow; Dx: LongInt; Dy: LongInt; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 48)); + Call(Window, Dx, Dy, IntuitionBase); +end; + +function ViewAddress: PView; +type + TLocalCall = function(Base: Pointer): PView; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 49)); + Result := Call(IntuitionBase); +end; + +function ViewPortAddress(const Window: PWindow): PViewPort; +type + TLocalCall = function(Window: PWindow; Base: Pointer): PViewPort; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 50)); + Result := Call(Window, IntuitionBase); +end; + +procedure WindowToBack(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 51)); + Call(Window, IntuitionBase); +end; + +procedure WindowToFront(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 52)); + Call(Window, IntuitionBase); +end; + +function WindowLimits(Window: PWindow; WidthMin: LongInt; HeightMin: LongInt; + WidthMax: LongWord; HeightMax: LongWord): Boolean; +type + TLocalCall = function(Window: PWindow; WidthMin: LongInt; + HeightMin: LongInt; WidthMax: LongWord; HeightMax: LongWord; + Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 53)); + Result := Call(Window, WidthMin, HeightMin, WidthMax, HeightMax, IntuitionBase); +end; + +function SetPrefs(const Preferences: PPreferences; Size: LongInt; + Inform: LongInt): PPreferences; +type + TLocalCall = function(const Preferences: PPreferences; Size: LongInt; + Inform: LongInt; Base: Pointer): PPreferences; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 54)); + Result := Call(Preferences, Size, Inform, IntuitionBase); +end; + +function IntuiTextLength(const IText: PIntuiText): LongInt; +type + TLocalCall = function(const IText: PIntuiText; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 55)); + Result := Call(IText, IntuitionBase); +end; + +function WBenchToBack: Boolean; +type + TLocalCall = function(Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 56)); + Result := Call(IntuitionBase); +end; + +function WBenchToFront: Boolean; +type + TLocalCall = function(Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 57)); + Result := Call(IntuitionBase); +end; + +function AutoRequest(Window: PWindow; const Body: PIntuiText; + const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; + NFlag: LongWord; Width: LongWord; Height: LongWord): Boolean; +type + TLocalCall = function(Window: PWindow; const Body: PIntuiText; + const PosText: PIntuiText; const NegText: PIntuiText; PFlag: LongWord; + NFlag: LongWord; Width: LongWord; Height: LongWord; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 58)); + Result := Call(Window, Body, PosText, NegText, PFlag, NFlag, Width, + Height, IntuitionBase); +end; + +procedure BeginRefresh(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 59)); + Call(Window, IntuitionBase); +end; + +function BuildSysRequest(Window: PWindow; const Body: PIntuiText; + const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; + Width: LongWord; Height: LongWord): PWindow; +type + TLocalCall = function(Window: PWindow; const Body: PIntuiText; + const PosText: PIntuiText; const NegText: PIntuiText; Flags: LongWord; + Width: LongWord; Height: LongWord; Base: Pointer): PWindow; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 60)); + Result := Call(Window, Body, PosText, NegText, Flags, Width, Height, IntuitionBase); +end; + +procedure EndRefresh(Window: PWindow; Complete: Boolean); +type + TLocalCall = procedure(Window: PWindow; Complete: Boolean; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 61)); + Call(Window, Complete, IntuitionBase); +end; + +procedure FreeSysRequest(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 62)); + Call(Window, IntuitionBase); +end; + +function MakeScreen(Screen: PScreen): LongInt; +type + TLocalCall = function(Screen: PScreen; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 63)); + Result := Call(Screen, IntuitionBase); +end; + +function RemakeDisplay: LongInt; +type + TLocalCall = function(Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 64)); + Result := Call(IntuitionBase); +end; + +function RethinkDisplay: LongInt; +type + TLocalCall = function(Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 65)); + Result := Call(IntuitionBase); +end; + +function AllocRemember(var RememberKey: PRemember; Size: LongWord; + Flags: LongWord): Pointer; +type + TLocalCall = function(var RememberKey: PRemember; Size: LongWord; + Flags: LongWord; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 66)); + Result := Call(RememberKey, Size, Flags, IntuitionBase); +end; + +procedure AlohaWorkbench(MsgPort: PMsgPort); +type + TLocalCall = procedure(MsgPort: PMsgPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 67)); + Call(MsgPort, IntuitionBase); +end; + +procedure FreeRemember(var RememberKey: PRemember; ReallyForget: LongInt); +type + TLocalCall = procedure(var RememberKey: PRemember; ReallyForget: LongInt; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 68)); + Call(RememberKey, ReallyForget, IntuitionBase); +end; + +function LockIBase(LockNumber: LongWord): LongWord; +type + TLocalCall = function(LockNumber: LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 69)); + Result := Call(LockNumber, IntuitionBase); +end; + +procedure UnlockIBase(LockNumber: LongWord); +type + TLocalCall = procedure(LockNumber: LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 70)); + Call(LockNumber, IntuitionBase); +end; + +function GetScreenData(buffer: Pointer; Size: LongWord; type_: LongWord; + const Screen: PScreen): Boolean; +type + TLocalCall = function(buffer: Pointer; Size: LongWord; type_: LongWord; + const Screen: PScreen; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 71)); + Result := Call(buffer, Size, type_, Screen, IntuitionBase); +end; + +procedure RefreshGList(gadgets: PGadget; Window: PWindow; + Requester: PRequester; NumGad: LongInt); +type + TLocalCall = procedure(gadgets: PGadget; Window: PWindow; + Requester: PRequester; NumGad: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 72)); + Call(gadgets, Window, Requester, NumGad, IntuitionBase); +end; + +function AddGList(Window: PWindow; Gadget: PGadget; Position: LongWord; + NumGad: LongInt; Requester: PRequester): Word; +type + TLocalCall = function(Window: PWindow; Gadget: PGadget; Position: LongWord; + NumGad: LongInt; Requester: PRequester; Base: Pointer): Word; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 73)); + Result := Call(Window, Gadget, Position, NumGad, Requester, IntuitionBase); +end; + +function RemoveGList(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt): Word; +type + TLocalCall = function(RemPtr: PWindow; Gadget: PGadget; NumGad: LongInt; + Base: Pointer): Word; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 74)); + Result := Call(RemPtr, Gadget, NumGad, IntuitionBase); +end; + +procedure ActivateWindow(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 75)); + Call(Window, IntuitionBase); +end; + +procedure RefreshWindowFrame(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 76)); + Call(Window, IntuitionBase); +end; + +function ActivateGadget(gadgets: PGadget; Window: PWindow; + Requester: PRequester): Boolean; +type + TLocalCall = function(gadgets: PGadget; Window: PWindow; + Requester: PRequester; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 77)); + Result := Call(gadgets, Window, Requester, IntuitionBase); +end; + +procedure NewModifyProp(Gadget: PGadget; Window: PWindow; + Requester: PRequester; Flags: LongWord; HorizPot: LongWord; + VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; NumGad: LongInt); +type + TLocalCall = procedure(Gadget: PGadget; Window: PWindow; + Requester: PRequester; Flags: LongWord; HorizPot: LongWord; + VertPot: LongWord; HorizBody: LongWord; VertBody: LongWord; + NumGad: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 78)); + Call(Gadget, Window, Requester, Flags, HorizPot, VertPot, HorizBody, + VertBody, NumGad, IntuitionBase); +end; + +function QueryOverscan(DisplayID: LongWord; Rect: pRectangle; + OScanType: LongInt): LongInt; +type + TLocalCall = function(DisplayID: LongWord; Rect: pRectangle; + OScanType: LongInt; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 79)); + Result := Call(DisplayID, Rect, OScanType, IntuitionBase); +end; + +procedure MoveWindowInFrontOf(Window: PWindow; BehindWindow: PWindow); +type + TLocalCall = procedure(Window: PWindow; BehindWindow: PWindow; + Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 80)); + Call(Window, BehindWindow, IntuitionBase); +end; + +procedure ChangeWindowBox(Window: PWindow; Left: LongInt; Top: LongInt; + Width: LongInt; Height: LongInt); +type + TLocalCall = procedure(Window: PWindow; Left: LongInt; Top: LongInt; + Width: LongInt; Height: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 81)); + Call(Window, Left, Top, Width, Height, IntuitionBase); +end; + +function SetEditHook(hook: PHook): PHook; +type + TLocalCall = function(hook: PHook; Base: Pointer): PHook; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 82)); + Result := Call(hook, IntuitionBase); +end; + +function SetMouseQueue(Window: PWindow; queueLength: LongWord): LongInt; +type + TLocalCall = function(Window: PWindow; queueLength: LongWord; + Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 83)); + Result := Call(Window, queueLength, IntuitionBase); +end; + +procedure ZipWindow(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 84)); + Call(Window, IntuitionBase); +end; + +function LockPubScreen(const Name: PChar): PScreen; +type + TLocalCall = function(const Name: PChar; Base: Pointer): PScreen; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 85)); + Result := Call(Name, IntuitionBase); +end; + +procedure UnlockPubScreen(const Name: PChar; Screen: PScreen); +type + TLocalCall = procedure(const Name: PChar; Screen: PScreen; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 86)); + Call(Name, Screen, IntuitionBase); +end; + +function LockPubScreenList: pList; +type + TLocalCall = function(Base: Pointer): pList; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 87)); + Result := Call(IntuitionBase); +end; + +procedure UnlockPubScreenList; +type + TLocalCall = procedure(Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 88)); + Call(IntuitionBase); +end; + +function NextPubScreen(const Screen: PScreen; Namebuf: PChar): PChar; +type + TLocalCall = function(const Screen: PScreen; Namebuf: PChar; + Base: Pointer): PChar; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 89)); + Result := Call(Screen, Namebuf, IntuitionBase); +end; + +procedure SetDefaultPubScreen(const Name: PChar); +type + TLocalCall = procedure(const Name: PChar; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 90)); + Call(Name, IntuitionBase); +end; + +function SetPubScreenModes(modes: LongWord): Word; +type + TLocalCall = function(modes: LongWord; Base: Pointer): Word; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 91)); + Result := Call(modes, IntuitionBase); +end; + +function PubScreenStatus(Screen: PScreen; StatusFlags: LongWord): Word; +type + TLocalCall = function(Screen: PScreen; StatusFlags: LongWord; + Base: Pointer): Word; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 92)); + Result := Call(Screen, StatusFlags, IntuitionBase); +end; + +function ObtainGIRPort(GInfo: PGadgetInfo): PRastPort; +type + TLocalCall = function(GInfo: PGadgetInfo; Base: Pointer): PRastPort; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 93)); + Result := Call(GInfo, IntuitionBase); +end; + +procedure ReleaseGIRPort(Rp: PRastPort); +type + TLocalCall = procedure(Rp: PRastPort; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 94)); + Call(Rp, IntuitionBase); +end; + +procedure GadgetMouse(Gadget: PGadget; GInfo: PGadgetInfo; mousePoint: psmallint); +type + TLocalCall = procedure(Gadget: PGadget; GInfo: PGadgetInfo; + mousePoint: psmallint; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 95)); + Call(Gadget, GInfo, mousePoint, IntuitionBase); +end; + +function SetIPrefs(Data: Pointer; Length: LongWord; Typ: LongWord): LongWord; +type + TLocalCall = function(Data: Pointer; Length: LongWord; Typ: LongWord; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 96)); + Result := Call(Data, Length, Typ, IntuitionBase); +end; + +procedure GetDefaultPubScreen(NameBuffer: PChar); +type + TLocalCall = procedure(NameBuffer: PChar; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 97)); + Call(NameBuffer, IntuitionBase); +end; + +function EasyRequestArgs(Window: PWindow; + const easyStruct: PEasyStruct; IdcmpPtr: PLongWord; const args: Pointer): LongInt; +type + TLocalCall = function(Window: PWindow; + const easyStruct: PEasyStruct; IdcmpPtr: PLongWord; + const args: Pointer; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 98)); + EasyRequestArgs := Call(Window, easyStruct, IdcmpPtr, args, IntuitionBase); +end; + +function BuildEasyRequestArgs(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer): PWindow; +type + TLocalCall = function(Window: PWindow;const EasyStruct: PEasyStruct; Idcmp: LongWord;const Args: Pointer; Base: Pointer): PWindow; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 99)); + Result := Call(Window, EasyStruct, Idcmp, Args, IntuitionBase); +end; + +function SysReqHandler(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt): LongInt; +type + TLocalCall = function(Window: PWindow; IdcmpPtr: PLongWord; WaitInput: LongInt; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 100)); + Result := Call(Window, IdcmpPtr, WaitInput, IntuitionBase); +end; + +function OpenWindowTagList(const NewWindow: PNewWindow; + const TagList: PTagItem): PWindow; +type + TOpenWindowTagList = function(const NewWindow: PNewWindow; + const TagList: PTagItem; Base: Pointer): PWindow; cdecl; +var + Call: TOpenWindowTagList; +begin + Call := TOpenWindowTagList(GetLibAdress(IntuitionBase, 101)); + OpenWindowTagList := Call(NewWindow, TagList, IntuitionBase); +end; + +function OpenScreenTagList(const NewScreen: PNewScreen;const tagList: PTagItem): PScreen; +type + TLocalCall = function(const NewScreen: PNewScreen;const tagList: PTagItem; Base: Pointer): PScreen; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 102)); + Result := Call(NewScreen, tagList, IntuitionBase); +end; + +procedure DrawImageState(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo); +type + TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; State: LongWord;const DrawInfo: PDrawInfo; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 103)); + Call(Rp, Image, LeftOffset, TopOffset, State, DrawInfo, IntuitionBase); +end; + +function PointInImage(Point: LongWord; Image: PImage): Boolean; +type + TLocalCall = function(Point: LongWord; Image: PImage; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 104)); + Result := Call(Point, Image, IntuitionBase); +end; + +procedure EraseImage(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt); +type + TLocalCall = procedure(Rp: PRastPort; Image: PImage; LeftOffset: LongInt; TopOffset: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 105)); + Call(Rp, Image, LeftOffset, TopOffset, IntuitionBase); +end; + +function NewObjectA(ClassPtr: PIClass;const ClassID: PChar;const TagList: PTagItem): Pointer; +type + TLocalCall = function(ClassPtr: PIClass;const ClassID: PChar; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 106)); + Result := Call(ClassPtr, ClassID, IntuitionBase); +end; + +procedure DisposeObject(Obj: Pointer); +type + TLocalCall = procedure(Obj: Pointer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 107)); + Call(Obj, IntuitionBase); +end; + +function SetAttrsA(Obj: Pointer; const TagList: PTagItem): LongWord; +type + TLocalCall = function(Obj: Pointer; + const TagList: PTagItem; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 108)); + Result := Call(Obj, TagList, IntuitionBase); +end; + +function GetAttr(attrID: LongWord; Obj: Pointer; storagePtr: PLongWord): LongWord; +type + TLocalCall = function(attrID: LongWord; Obj: Pointer; storagePtr: PLongWord; + Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 109)); + Result := Call(attrID, Obj, storagePtr, IntuitionBase); +end; + +function SetGadgetAttrsA(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem): LongWord; +type + TLocalCall = function(Gadget: PGadget; Window: PWindow; Requester: PRequester;const TagList: PTagItem; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 110)); + Result := Call(Gadget, Window, Requester, TagList, IntuitionBase); +end; + +function NextObject(ObjectPtrPtr: Pointer): PIClass; +type + TLocalCall = function(ObjectPtrPtr: Pointer; Base: Pointer): PIClass; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 111)); + Result := Call(ObjectPtrPtr, IntuitionBase); +end; + +function FindClass(ClassID: PChar): PIClass; +type + TLocalCall = function(ClassID: PChar; Base: Pointer): PIClass; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 112)); + Result := Call(ClassID, IntuitionBase); +end; + +function MakeClass(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord): PIClass; +type + TLocalCall = function(const ClassID: PChar;const SuperClassID: PChar;const SuperClassPtr: PIClass; InstanceSize: LongWord; Flags: LongWord; Base: Pointer): PIClass; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 113)); + Result := Call(ClassID, SuperClassID, SuperClassPtr, InstanceSize, Flags, IntuitionBase); +end; + +procedure AddClass(ClassPtr: PIClass); +type + TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 114)); + Call(ClassPtr, IntuitionBase); +end; + +function GetScreenDrawInfo(Screen : PScreen) : PDrawInfo; +type + TLocalCall = function(Screen: PScreen; Base: Pointer): PDrawInfo; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 115)); + Result := Call(Screen, IntuitionBase); +end; + +procedure FreeScreenDrawInfo(Screen : PScreen; DrawInfo : PDrawInfo); +type + TLocalCall = procedure(Screen : PScreen; DrawInfo : PDrawInfo; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 116)); + Call(Screen, DrawInfo, IntuitionBase); +end; + +function ResetMenuStrip(Window: PWindow; Menu: PMenu) : Boolean; +type + TLocalCall = function(Window: PWindow; Menu: PMenu; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 117)); + Result := Call(Window, Menu, IntuitionBase); +end; + +procedure RemoveClass(ClassPtr : PIClass); +type + TLocalCall = procedure(ClassPtr: PIClass; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 118)); + Call(ClassPtr, IntuitionBase); +end; + +function FreeClass(ClassPtr : PIClass) : Boolean; +type + TLocalCall = function(ClassPtr : PIClass; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 119)); + Result := Call(ClassPtr, IntuitionBase); +end; + +function AllocScreenBuffer(Sc: PScreen; Bm: PBitMap; Flags: LongWord): PScreenBuffer; +type + TLocalCall = function(Sc: PScreen; Bm: PBitMap; Flags: LongWord; Base: Pointer): PScreenBuffer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 128)); + Result := Call(Sc, Bm, Flags, IntuitionBase); +end; + +procedure FreeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer); +type + TLocalCall = procedure(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 129)); + Call(Sc, Sb, IntuitionBase); +end; + +function ChangeScreenBuffer(Sc: PScreen; Sb: PScreenBuffer): LongWord; +type + TLocalCall = function(Sc: PScreen; Sb: PScreenBuffer; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 130)); + Result := Call(Sc, Sb, IntuitionBase); +end; + +procedure ScreenDepth(Screen: PScreen; Flags: LongWord; Reserved: Pointer); +type + TLocalCall = procedure(Screen: PScreen; Flags: LongWord; Reserved: Pointer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 131)); + Call(Screen, Flags, Reserved, IntuitionBase); +end; + +procedure ScreenPosition(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt); +type + TLocalCall = procedure(Screen: PScreen; Flags: LongWord; X1: LongInt; Y1: LongInt; X2: LongInt; Y2: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 132)); + Call(Screen, Flags, X1, Y1, X2, Y2, IntuitionBase); +end; + +procedure ScrollWindowRaster(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt); +type + TLocalCall = procedure(Win: PWindow; Dx: LongInt; Dy: LongInt; XMin: LongInt; YMin: LongInt; XMax: LongInt; YMax: LongInt; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 133)); + Call(Win, Dx, Dy, XMin, YMin, XMax, YMax, IntuitionBase); +end; + +procedure LendMenus(FromWindow: PWindow; ToWindow: PWindow); +type + TLocalCall = procedure(FromWindow: PWindow; ToWindow: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 134)); + Call(FromWindow, ToWindow, IntuitionBase); +end; + +function DoGadgetMethodA(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg): LongWord; +type + TLocalCall = function(Gad: PGadget; Win: PWindow; Req: PRequester; Message: TMsg; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 135)); + Result := Call(Gad, Win, Req, Message, IntuitionBase); +end; + +procedure SetWindowPointerA(Win: PWindow;const Taglist: PTagItem); +type + TLocalCall = procedure(Win: PWindow;const Taglist: PTagItem; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 136)); + Call(Win, Taglist, IntuitionBase); +end; + +function TimedDisplayAlert(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord): Boolean; +type + TLocalCall = function(AlertNumber: LongWord;const String_: PChar; Height: LongWord; Time: LongWord; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 137)); + Result := Call(AlertNumber, String_, Height, Time, IntuitionBase); +end; + +procedure HelpControl(Win: PWindow; Flags: LongWord); +type + TLocalCall = procedure(Win: PWindow; Flags: LongWord; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 138)); + Call(Win, Flags, IntuitionBase); +end; + +function IsWindowVisible(Window: PWindow): LongWord; +type + TLocalCall = function(Window: PWindow; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 139)); + Result := Call(Window, IntuitionBase); +end; + +procedure ShowWindow(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 140)); + Call(Window, IntuitionBase); +end; + +procedure HideWindow(Window: PWindow); +type + TLocalCall = procedure(Window: PWindow; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 141)); + Call(Window, IntuitionBase); +end; + +function ChangeWindowShape(Window: PWindow; NewShape: PRegion; CallBack: PHook): PRegion; +type + TLocalCall = function(Window: PWindow; NewShape: PRegion; CallBack: PHook; Base: Pointer): PRegion; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 143)); + Result := Call(Window, NewShape, CallBack, IntuitionBase); +end; + +procedure SetDefaultScreenFont(TextFont: PTextFont); +type + TLocalCall = procedure(TextFont: PTextFont; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 144)); + Call(TextFont, IntuitionBase); +end; + +function DoNotify(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate): Pointer; +type + TLocalCall = function(Cl: PClass; O: PObject_; Ic: Pointer; Msg: TopUpdate; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 145)); + Result := Call(Cl, O, Ic, Msg, IntuitionBase); +end; + +procedure FreeICData(ICData: Pointer); +type + TLocalCall = procedure(ICData: Pointer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 146)); + Call(ICData, IntuitionBase); +end; + +function AllocIntuiMessage(Window: PWindow): PIntuiMessage; +type + TLocalCall = function(Window: PWindow; Base: Pointer): PIntuiMessage; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 148)); + Result := Call(Window, IntuitionBase); +end; + +procedure FreeIntuiMessage(IMsg: PIntuiMessage); +type + TLocalCall = procedure(IMsg: PIntuiMessage; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 149)); + Call(IMsg, IntuitionBase); +end; + +procedure SendIntuiMessage(Window: PWindow; IMsg: PIntuiMessage); +type + TLocalCall = procedure(Window: PWindow; IMsg: PIntuiMessage; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 151)); + Call(Window, IMsg, IntuitionBase); +end; + +procedure ChangeDecoration(ID: LongWord; Decor: PNewDecorator); +type + TLocalCall = procedure(ID: LongWord; Decor: PNewDecorator; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 153)); + Call(ID, Decor, IntuitionBase); +end; + +procedure WindowAction(Window: PWindow; Action: LongWord; Tags: PTagItem); +type + TLocalCall = procedure(Window: PWindow; Action: LongWord; Tags: PTagItem; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 157)); + Call(Window, Action, Tags, IntuitionBase); +end; + +procedure ScrollWindowRasterNoFill(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word); +type + TLocalCall = procedure(Window: PWindow; Dx, Dy, XMin, YMin, XMax, YMax: Word; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 159)); + Call(Window, Dx, Dy, XMin, YMin, XMax, YMax, IntuitionBase); +end; + +function SetPointerBounds(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem): LongWord; +type + TLocalCall = function(Screen: PScreen; Rect: TRectangle; Reserved: LongWord; Tags: PTagItem; Base: Pointer): LongWord; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 160)); + Result := Call(Screen, Rect, Reserved, Tags, IntuitionBase); +end; + +function StartScreenNotifyTagList(Tags: PTagItem): Pointer; +type + TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 161)); + Result := Call(Tags, IntuitionBase); +end; + +function EndScreenNotify(Notify: Pointer): Boolean; +type + TLocalCall = function(Notify: Pointer; Base: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 162)); + Result := Call(Notify, IntuitionBase); +end; + +function GetMonitorList(Tags: PTagItem): Pointer; +type + TLocalCall = function(Tags: PTagItem; Base: Pointer): Pointer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 163)); + Result := Call(Tags, IntuitionBase); +end; + +procedure FreeMonitorList(Obj: Pointer); +type + TLocalCall = procedure(Obj: Pointer; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(IntuitionBase, 163)); + Call(Obj, IntuitionBase); +end; + +function SetAttrs(Obj: Pointer; const Tags: array of const): LongWord; +begin + SetAttrs := SetAttrsA(Obj, readintags(Tags)); +end; + +function OCLASS(O: Pointer): PIClass; +var + Obj: P_Object; +begin + Obj := P_Object(PtrUInt(O) - sizeof(T_Object)); + OCLASS := Obj^.o_Class; +end; + + +function Has_Children(Win: PWindow): Boolean; +begin + Result := Assigned(Win^.FirstChild); +end; + +function Is_Children(Win: PWindow): Boolean; +begin + Result := Assigned(Win^.Parent2); +end; + + + +initialization + IntuitionBase := OpenLibrary('intuition.library', 36); + +finalization + CloseLibrary(IntuitionBase); + +end. (* UNIT INTUITION *) diff --git a/rtl/aros/keyboard.pp b/rtl/aros/keyboard.pp new file mode 100644 index 0000000000..16e714f4e5 --- /dev/null +++ b/rtl/aros/keyboard.pp @@ -0,0 +1,469 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2006 by Karoly Balogh + + Keyboard unit for MorphOS and Amiga and AROS + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +unit Keyboard; +interface + +{$i keybrdh.inc} + +implementation + +uses + video, exec,intuition, inputevent, mouse, sysutils, keymap; + +{$i keyboard.inc} +{$i keyscan.inc} +var + LastShiftState : Byte; {set by handler for PollShiftStateEvent} + OldMouseX : LongInt; + OldmouseY : LongInt; + OldButtons: Word; + +procedure SysInitKeyboard; +begin +// writeln('sysinitkeyboard'); + LastShiftState := 0; + OldMouseX := -1; + OldmouseY := -1; + OldButtons := 0; +end; + +procedure SysDoneKeyboard; +begin + +end; + +function IsMsgPortEmpty(Port: PMsgPort): Boolean; inline; +begin + IsMsgPortEmpty := (Port^.mp_MsgList.lh_TailPred = @(Port^.mp_MsgList)); +end; + +var + KeyQueue: TKeyEvent; + +type + RawCodeEntry = record + rc,n,s,c,a : Word; { raw code, normal, shift, ctrl, alt } + end; + +const + RCTABLE_MAXIDX = 24; + RawCodeTable : array[0..RCTABLE_MAXIDX] of RawCodeEntry = + ( + (rc: 66; n: $0F09; s: $0F00; c: $9400; a: $A500; ), // TAB + (rc: 68; n: $1C0D; s: $1C0D; c: $1C0A; a: $1C0D; ), // Enter // shift, alt? + (rc: 69; n: $011B; s: $011B; c: $011B; a: $0100; ), // ESC // shift? + (rc: 70; n: $5300; s: $0700; c: $A300; a: $A200; ), // Delete + (rc: 71; n: $5200; s: $0500; c: $0400; a: $A200; ), // Insert + (rc: 72; n: $4900; s: $4900; c: $8400; a: $9900; ), // PgUP // shift? + (rc: 73; n: $5100; s: $5100; c: $7600; a: $A100; ), // PgDOWN // shift? + + (rc: 76; n: $4800; s: $4800; c: $8D00; a: $9800; ), // UP // shift? + (rc: 77; n: $5000; s: $5000; c: $9100; a: $A000; ), // DOWN // shift? + (rc: 78; n: $4D00; s: $4D00; c: $7400; a: $9D00; ), // RIGHT // shift? + (rc: 79; n: $4B00; s: $4B00; c: $7300; a: $9B00; ), // LEFT // shift? + + (rc: 80; n: $3B00; s: $5400; c: $5E00; a: $6800; ), // F1 + (rc: 81; n: $3C00; s: $5500; c: $5F00; a: $6900; ), // F2 + (rc: 82; n: $3D00; s: $5600; c: $6000; a: $6A00; ), // F3 + (rc: 83; n: $3E00; s: $5700; c: $6100; a: $6B00; ), // F4 + (rc: 84; n: $3F00; s: $5800; c: $6200; a: $6C00; ), // F5 + (rc: 85; n: $4000; s: $5900; c: $6300; a: $6D00; ), // F6 + (rc: 86; n: $4100; s: $5A00; c: $6400; a: $6E00; ), // F7 + (rc: 87; n: $4200; s: $5B00; c: $6500; a: $6F00; ), // F8 + (rc: 88; n: $4300; s: $5C00; c: $6600; a: $7000; ), // F9 + (rc: 89; n: $4400; s: $5D00; c: $6700; a: $7100; ), // F10 + (rc: 75; n: $8500; s: $8700; c: $8900; a: $8B00; ), // F11 + (rc: 76; n: $8600; s: $8800; c: $8A00; a: $8C00; ), // F12 + + (rc: 112; n: $4700; s: $4700; c: $7700; a: $9700; ),// Home // shift? + (rc: 113; n: $4F00; s: $4F00; c: $7500; a: $9F00; ) // End // shift? + ); + +function rcTableIdx(rc: LongInt): LongInt; +var + Counter: LongInt; +begin + rcTableIdx := -1; + Counter := 0; + while (RawCodeTable[Counter].rc <> rc) and (Counter <= RCTABLE_MAXIDX) do + Inc(Counter); + if (Counter <= RCTABLE_MAXIDX) then + rcTableIdx := Counter; +end; + +function HasShift(IQual: Word): Boolean; inline; +begin + HasShift := ((IQual and IEQUALIFIER_LSHIFT) <> 0) or + ((IQual and IEQUALIFIER_RSHIFT) <> 0); +end; + +function HasCtrl(IQual: Word): Boolean; inline; +begin + HasCtrl := ((IQual and IEQUALIFIER_CONTROL) <> 0); +end; + +function HasAlt(IQual: Word): Boolean; inline; +begin + HasAlt := ((IQual and IEQUALIFIER_LALT) <> 0) or + ((IQual and IEQUALIFIER_RALT) <> 0); +end; + +function rcTableCode(IQual: Word; Idx: LongInt): LongInt; +begin + if (Idx < 0) or (Idx > RCTABLE_MAXIDX) then + begin + rcTableCode := -1; + Exit; + end; + + if HasShift(IQual) then + rcTableCode:=RawCodeTable[Idx].s + else + if HasCtrl(IQual) then + rcTableCode:=RawCodeTable[Idx].c + else + if HasAlt(IQual) then + rcTableCode:=RawCodeTable[Idx].a + else + rcTableCode:=RawCodeTable[Idx].n; +end; + +procedure setShiftState(IQual: Word); +begin + LastShiftState := 0; + if ((IQual and IEQUALIFIER_LSHIFT) <> 0) then + LastShiftState := LastShiftState or $01; + if ((IQual and IEQUALIFIER_RSHIFT) <> 0) then + LastShiftState := LastShiftState or $02; + if HasCtrl(IQual) then + LastShiftState := LastShiftState or $04; + if HasAlt(IQual) then + LastShiftState := LastShiftState or $08; + if ((IQual and IEQUALIFIER_NUMERICPAD) <> 0) then + LastShiftState := LastShiftState or $20; + if ((IQual and IEQUALIFIER_CAPSLOCK) <> 0) then + LastShiftState := LastShiftState or $40; +end; + +function SysPollKeyEvent: TKeyEvent; +var + MouseEvent: Boolean; // got a mouseevent -> do not leave cycle + SendMouse: Boolean; // we got a (or many) mouse move send the last one + mes: TMouseEvent; // save mouse message send after cycle -> prevent mouse move stacking + me: TMouseEvent; + KeyCode: LongInt; + OldKeyCode: LongInt; + KeySet: ^TKeyRecord; // points to result to set fields directly + Ret: LongInt; + // + iMsg: PIntuiMessage; + ICode: Word; // save items from Message + IQual: Word; + IClass: Longword; + MouseX: Integer; + MouseY: Integer; + KeyUp: Boolean; // Event is a key up event + Buff: array[0..19] of Char; + ie: TInputEvent; // for mapchar +begin + KeyCode := 0; + SysPollKeyEvent := 0; + KeySet := @SysPollKeyEvent; + FillChar(me, SizeOf(TMouseEvent), 0); + + if KeyQueue <> 0 then + begin + SysPollKeyEvent := KeyQueue; + Exit; + end; + SendMouse := False; + repeat + MouseEvent := False; + if VideoWindow <> nil then + begin + if IsMsgPortEmpty(videoWindow^.UserPort) then + Break; + end else + Exit; + PMessage(iMsg) := GetMsg(VideoWindow^.UserPort); + if (iMsg <> nil) then + begin + ICode := iMsg^.Code; + IQual := iMsg^.Qualifier; + IClass := iMsg^.iClass; + MouseX := iMsg^.MouseX; + MouseY := iMsg^.MouseY; + ReplyMsg(PMessage(iMsg)); // fast reply to system + SetShiftState(IQual); // set Shift state qualifiers. do this for all messages we get. + // main event case + case (IClass) of + IDCMP_CLOSEWINDOW: begin + GotCloseWindow; + end; + IDCMP_CHANGEWINDOW: begin + GotResizeWindow; + end; + IDCMP_MOUSEBUTTONS: begin + MouseEvent := True; + me.x := (MouseX - videoWindow^.BorderLeft) div 8; // calculate char position + me.y := (MouseY - videoWindow^.BorderTop) div 16; + case ICode of + SELECTDOWN: begin + //writeln('left down!'); + me.Action := MouseActionDown; + OldButtons := OldButtons or MouseLeftButton; + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + SELECTUP: begin + //writeln('left up!'); + me.Action := MouseActionUp; + OldButtons := OldButtons and (not MouseLeftButton); + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + MENUDOWN: begin + //writeln('right down!'); + me.Action := MouseActionDown; + OldButtons := OldButtons or MouseRightButton; + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + MENUUP: begin + //writeln('right up!'); + me.Action := MouseActionUp; + OldButtons := OldButtons and (not MouseRightButton); + me.Buttons := OldButtons; + PutMouseEvent(me); + end; + end; + //writeln('Buttons: ' , me.Buttons); + end; + IDCMP_MOUSEMOVE: begin + MouseX := (MouseX - VideoWindow^.BorderLeft) div 8; + MouseY := (MouseY - VideoWindow^.BorderTop) div 16; + if (MouseX >= 0) and (MouseY >= 0) and + (MouseX < Video.ScreenWidth) and (MouseY < Video.ScreenHeight) and + ((MouseX <> OldMouseX) or (MouseY <> OldmouseY)) + then begin +// //writeln('mousemove:',Mousex,'/',Mousey,' oldbutt:',OldButtons); + // Drawing is very slow so when moving window it will drag behind + // because the mouse events stack in the messageport + // -> so we override move until messageport is empty or keyevent is fired + SendMouse := True; + MouseEvent := True; + mes.Action := MouseActionMove; + mes.Buttons := OldButtons; + mes.X := MouseX; + mes.Y := MouseY; + //PutMouseEvent(me); + end; + end; + IDCMP_RAWKEY: begin + // mouse wheel up or down -> pgup and pgdown + if ICode = 122 then + ICode := 72; + if ICode = 123 then + ICode := 73; + // get char from rawkey + KeyUp := (ICode and IECODE_UP_PREFIX) <> 0; // is key up + ICode := ICode and not IECODE_UP_PREFIX; // remove key up from ICode + ie.ie_Class := IECLASS_RAWKEY; + ie.ie_SubClass := 0; + ie.ie_Code := ICode; + ie.ie_Qualifier := IQual; + ie.ie_NextEvent := nil; + Buff[0] := #0; + Ret := MapRawKey(@ie, @Buff[0], 1, nil); + KeyCode := Ord(Buff[0]); + KeySet^.KeyCode := Ord(Buff[0]); // if maprawkey does not work it still is 0 + KeySet^.ShiftState := LastShiftState; // shift state set before the case + KeySet^.Flags := 0; + if keyup then // we do not need key up events up to now + begin + KeySet^.Flags := KeySet^.Flags or kbReleased; // kbReleased does work but make strange effects + SysPollKeyEvent := 0; + Exit; + end; + // check our hard coed list if there is an entry -> leave it must be right ;) + // F-keys, cursor, esc, del, ins, del, pgup, pgdown, pos, end, enter, tab + if rcTableCode(IQual,rcTableIdx(ICode)) >= 0 then + begin + KeyCode := rcTableCode(IQual,rcTableIdx(ICode)); + KeySet^.KeyCode := KeyCode; + KeySet^.Flags := kbPhys; + end else + begin + // left alt or ctrl is pressed -> check for alternative Scancode -> commando + if ((IQual and IEQUALIFIER_LALT) <> 0) or HasCtrl(IQual) then + begin + OldKeyCode := KeyCode; // save keycode if nothing found + KeyCode := 0; + ie.ie_Class := IECLASS_RAWKEY; // get keycode without qualifier easier case + ie.ie_SubClass := 0; + ie.ie_Code := ICode; + ie.ie_Qualifier := 0; + ie.ie_NextEvent := nil; + Buff[0] := #0; + Ret := MapRawKey(@ie, @Buff[0], 1, nil); + if Ret > 0 then + begin + if ((IQual and IEQUALIFIER_LALT) <> 0) then // check left alt keycodes + begin + case Buff[0] of // Alt - keys already defined + 'a': KeyCode := kbAltA shl 8; + 'b': KeyCode := kbAltB shl 8; + 'c': KeyCode := kbAltC shl 8; + 'd': KeyCode := kbAltD shl 8; + 'e': KeyCode := kbAltE shl 8; + 'f': KeyCode := kbAltF shl 8; + 'g': KeyCode := kbAltG shl 8; + 'h': KeyCode := kbAltH shl 8; + 'i': KeyCode := kbAltI shl 8; + 'j': KeyCode := kbAltJ shl 8; + 'k': KeyCode := kbAltK shl 8; + 'l': KeyCode := kbAltL shl 8; + 'm': KeyCode := kbAltM shl 8; + 'n': KeyCode := kbAltN shl 8; + 'o': KeyCode := kbAltO shl 8; + 'p': KeyCode := kbAltP shl 8; + 'q': KeyCode := kbAltQ shl 8; + 'r': KeyCode := kbAltR shl 8; + 's': KeyCode := kbAltS shl 8; + 't': KeyCode := kbAltT shl 8; + 'u': KeyCode := kbAltU shl 8; + 'v': KeyCode := kbAltV shl 8; + 'w': KeyCode := kbAltW shl 8; + 'x': KeyCode := kbAltX shl 8; + 'y': KeyCode := kbAltY shl 8; + 'z': KeyCode := kbAltZ shl 8; + end; + end else + begin + case Buff[0] of // ctrl - keys defined in FreeVision/drivers.pas -> so here direct numbers + 'a': KeyCode := $1E01; + 'b': KeyCode := $3002; + 'c': KeyCode := $2E03; + 'd': KeyCode := $2004; + 'e': KeyCode := $1205; + 'f': KeyCode := $2106; + 'g': KeyCode := $2207; + 'h': KeyCode := $2308; + 'i': KeyCode := $1709; + 'j': KeyCode := $240a; + 'k': KeyCode := $250b; + 'l': KeyCode := $260c; + 'm': KeyCode := $320d; + 'n': KeyCode := $310e; + 'o': KeyCode := $180f; + 'p': KeyCode := $1910; + 'q': KeyCode := $1011; + 'r': KeyCode := $1312; + 's': KeyCode := $1F13; + 't': KeyCode := $1414; + 'u': KeyCode := $1615; + 'v': KeyCode := $2F16; + 'w': KeyCode := $1117; + 'x': KeyCode := $2D18; + 'y': KeyCode := $1519; + 'z': KeyCode := $2C1A; + end; + end; + end; + if KeyCode <= 0 then // nothing found restore keycode + KeyCode := OldKeyCode; + KeySet^.KeyCode := KeyCode; + KeySet^.Flags := kbPhys; + end; + end; + if keycode <= 0 then + begin + KeySet^.KeyCode := 0; + KeyCode := 0; + end; + //writeln('raw keycode: ',iMsg^.code, ' -> $', IntToHex(keycode,4), ' ret: ', ret); + end; + else begin + KeyCode := 0; + end; + end; + end else + Break; + until (not MouseEvent); + // + if SendMouse then + begin + PutMouseEvent(mes); + OldMouseX:=Mousex; + OldmouseY:=Mousey; + end; + if KeyCode <= 0 then // no keycode found then also delete flags and shiftstate + SysPollKeyEvent := 0 + else + KeyQueue:=SysPollKeyEvent; +end; + +function SysGetKeyEvent: TKeyEvent; +var + Res: TKeyEvent; + me: TMouseEvent; +begin + Res := 0; + if VideoWindow <> nil then + begin + if KeyQueue <> 0 then + begin + SysGetKeyEvent := KeyQueue; + KeyQueue := 0; + Exit; + end; + repeat + WaitPort(VideoWindow^.UserPort); + Res := SysPollKeyEvent; + until Res <> 0; + end else + begin + me.Action := MouseActionDown; + me.Buttons := MouseRightButton; + PutMouseEvent(me); + end; + SysGetKeyEvent := Res; +end; + +{function SysTranslateKeyEvent(KeyEvent: TKeyEvent): TKeyEvent; +begin +end;} + +function SysGetShiftState: Byte; +begin + //writeln('SysgetShiftState:',hexstr(LastShiftState,2)); + SysGetShiftState := LastShiftState; +end; + +const + SysKeyboardDriver : TKeyboardDriver = ( + InitDriver : @SysInitKeyBoard; + DoneDriver : @SysDoneKeyBoard; + GetKeyevent : @SysGetKeyEvent; + PollKeyEvent : @SysPollKeyEvent; + GetShiftState : @SysGetShiftState; +// TranslateKeyEvent : @SysTranslateKeyEvent; + TranslateKeyEvent : Nil; + TranslateKeyEventUnicode : Nil; + ); + +begin + SetKeyBoardDriver(SysKeyBoardDriver); +end. diff --git a/rtl/aros/keymap.pas b/rtl/aros/keymap.pas new file mode 100644 index 0000000000..78ec8e3f3a --- /dev/null +++ b/rtl/aros/keymap.pas @@ -0,0 +1,170 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +{ + Keymap.resource definitions and console.device key map definitions +} + +{ + History: + + Added the defines use_amiga_smartlink and + use_auto_openlib. Implemented autoopening + of the library. + 14 Jan 2003. + + Changed integer > SmallInt, + cardinal > longword. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se Nils Sjoholm +} + +unit Keymap; + +INTERFACE + +{$mode objfpc} + +uses exec, inputevent; + +Type + + PKeyMap = ^TKeyMap; + TKeyMap = record + km_LoKeyMapTypes : Pointer; + km_LoKeyMap : Pointer; + km_LoCapsable : Pointer; + km_LoRepeatable : Pointer; + km_HiKeyMapTypes : Pointer; + km_HiKeyMap : Pointer; + km_HiCapsable : Pointer; + km_HiRepeatable : Pointer; + end; + + + pKeymapNode = ^TKeyMapNode; + TKeyMapNode = record + kn_Node : TNode; { including name of Keymap } + kn_KeyMap : TKeyMap; + end; + +{ the structure of Keymap.resource } + + pKeyMapResource = ^TKeyMapResource; + TKeyMapResource = record + kr_Node : TNode; + kr_List : tList; { a list of KeyMapNodes } + end; + + +Const + +{ Key Map Types } + + KC_NOQUAL = 0; + KC_VANILLA = 7; { note that SHIFT+ALT+CTRL is VANILLA } + KCB_SHIFT = 0; + KCF_SHIFT = $01; + KCB_ALT = 1; + KCF_ALT = $02; + KCB_CONTROL = 2; + KCF_CONTROL = $04; + KCB_DOWNUP = 3; + KCF_DOWNUP = $08; + + KCB_DEAD = 5; { may be dead or modified by dead key: } + KCF_DEAD = $20; { use dead prefix bytes } + + KCB_STRING = 6; + KCF_STRING = $40; + + KCB_NOP = 7; + KCF_NOP = $80; + + +{ Dead Prefix Bytes } + + DPB_MOD = 0; + DPF_MOD = $01; + DPB_DEAD = 3; + DPF_DEAD = $08; + + DP_2DINDEXMASK = $0f; { mask for index for 1st of two dead keys } + DP_2DFACSHIFT = 4; { shift for factor for 1st of two dead keys } + +var KeyMapBase : pLibrary; + +const + KEYMAPNAME : PChar = 'Keymap.library'; + +function AskKeyMapDefault : PKeyMap; +function MapANSI(TheString : PChar; Count : LongInt; Buffer : PChar; Length : LongInt; KeyMap : PKeyMap) : LongInt; +function MapRawKey(Event : PInputEvent; Buffer : PChar; Length : LongInt; KeyMap : PKeyMap) : SmallInt; +procedure SetKeyMapDefault(KeyMap : PKeyMap); + +implementation + +function AskKeyMapDefault : PKeyMap; +type + TLocalCall = function(Base: Pointer): PKeyMap; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(KeyMapBase, 6)); + Result := Call(KeyMapBase); +end; + +function MapANSI(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap): LongInt; +type + TLocalCall = function(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(KeyMapBase, 8)); + Result := Call(TheString, Count, Buffer, Length, KeyMap, KeyMapBase); +end; + +function MapRawKey(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap) : SmallInt; +type + TLocalCall = function(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap; Base: Pointer): SmallInt; cdecl; +var +Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(KeyMapBase, 7)); + Result := Call(Event, Buffer, Length, KeyMap, KeyMapBase); +end; + +procedure SetKeyMapDefault(KeyMap: PKeyMap); +type + TLocalCall = procedure(KeyMap: PKeyMap; Base: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(KeyMapBase, 5)); + Call(KeyMap, KeyMapBase); +end; + +initialization + KeyMapBase := OpenLibrary('keymap.library', 0); + +finalization + CloseLibrary(KeyMapBase); + +end. (* UNIT KEYMAP *) + + + diff --git a/rtl/aros/layers.pas b/rtl/aros/layers.pas new file mode 100644 index 0000000000..6a90c24adc --- /dev/null +++ b/rtl/aros/layers.pas @@ -0,0 +1,486 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{ + History: + + Added the defines use_amiga_smartlink and + use_auto_openlib. Implemented autoopening + of the library. + 14 Jan 2003. + + Update for AmigaOS 3.9. + Changed start code for unit. + 06 Feb 2003. + + Changed integer > smallint, + cardinal > longword. + 09 Feb 2003. + + nils.sjoholm@mailbox.swipnet.se +} + +unit layers; + +interface +uses + exec, agraphics, utility; + +const + + LAYERSIMPLE = 1; + LAYERSMART = 2; + LAYERSUPER = 4; + LAYERUPDATING = $10; + LAYERBACKDROP = $40; + LAYERREFRESH = $80; + LAYER_CLIPRECTS_LOST = $100; { during BeginUpdate } + { or during layerop } + { this happens if out of memory } + LMN_REGION = -1; + +type + PLayer_Info = ^TLayer_Info; + TLayer_Info = record + top_layer : PLayer; + check_lp : PLayer; { !! Private !! } + obs : PClipRect; + FreeClipRects : PClipRect; { !! Private !! } + PrivateReserve1, { !! Private !! } + PrivateReserve2 : LongInt; { !! Private !! } + Lock : TSignalSemaphore; { !! Private !! } + gs_Head : TMinList; { !! Private !! } + PrivateReserve3 : SmallInt; { !! Private !! } + PrivateReserve4 : Pointer; { !! Private !! } + Flags : WORD; + fatten_count : Shortint; { !! Private !! } + LockLayersCount : Shortint; { !! Private !! } + PrivateReserve5 : SmallInt; { !! Private !! } + BlankHook, { !! Private !! } + LayerInfo_extra : Pointer; { !! Private !! } + end; + +const + NEWLAYERINFO_CALLED = 1; + +{ + * LAYERS_NOBACKFILL is the value needed to get no backfill hook + * LAYERS_BACKFILL is the value needed to get the default backfill hook + } + LAYERS_NOBACKFILL = 1; + LAYERS_BACKFILL = 0; + + LAYERSNAME : PChar = 'layers.library'; + +var + LayersBase : PLibrary; + +function BeginUpdate(Layer : PLayer) : LongInt; +function BehindLayer(dummy : LongInt; Layer : PLayer) : LongInt; +function CreateBehindHookLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; Hook : PHook; SuperBitmap2 : PBitMap) : PLayer; +function CreateBehindLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; SuperBitmap2 : PBitMap) : PLayer; +function CreateUpfrontHookLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; Hook : PHook; SuperBitmap2 : PBitMap) : PLayer; +function CreateUpfrontLayer(LayerInfo : PLayer_Info; Bitmap1 : PBitMap; x0 : LongInt; y0 : LongInt; x1 : LongInt; y1 : LongInt; Flags : LongInt; SuperBitmap2 : PBitMap) : PLayer; +function DeleteLayer(dummy : LongInt; Layer : PLayer) : LongInt; +procedure DisposeLayerInfo(LayerInfo : PLayer_Info); +procedure DoHookClipRects(Hook : PHook; RPort : PRastPort;const Rect : PRectangle); +procedure EndUpdate(Layer : PLayer; Flag : LongWord); +function FattenLayerInfo(LayerInfo : PLayer_Info) : LongInt; +procedure InitLayers(LayerInfo : PLayer_Info); +function InstallClipRegion(Layer : PLayer;const Region : PRegion) : PRegion; +function InstallLayerHook(Layer : PLayer; Hook : PHook) : PHook; +function InstallLayerInfoHook(LayerInfo : PLayer_Info;const Hook : PHook) : PHook; +procedure LockLayer(dummy : LongInt; Layer : PLayer); +procedure LockLayerInfo(LayerInfo : PLayer_Info); +procedure LockLayers(LayerInfo : PLayer_Info); +function MoveLayer(dummy : LongInt; Layer : PLayer; dx : LongInt; dy : LongInt) : LongInt; +function MoveLayerInFrontOf(layer_to_move : PLayer; other_layer : PLayer) : LongInt; +function MoveSizeLayer(Layer : PLayer; dx : LongInt; dy : LongInt; dw : LongInt; dh : LongInt) : LongInt; +function NewLayerInfo : PLayer_Info; +procedure ScrollLayer(dummy : LongInt; Layer : PLayer; dx : LongInt; dy : LongInt); +function SizeLayer(dummy : LongInt; Layer : PLayer; dx : LongInt; dy : LongInt) : LongInt; +procedure SortLayerCR(Layer : PLayer; dx : LongInt; dy : LongInt); +procedure SwapBitsRastPortClipRect(rp : PRastPort; cr : PClipRect); +procedure ThinLayerInfo(LayerInfo : PLayer_Info); +procedure UnlockLayer(Layer : PLayer); +procedure UnlockLayerInfo(LayerInfo : PLayer_Info); +procedure UnlockLayers(LayerInfo : PLayer_Info); +function UpfrontLayer(dummy : LongInt; Layer : PLayer) : LongInt; +function WhichLayer(LayerInfo : PLayer_Info; x : LongInt; y : LongInt) : PLayer; + +implementation + + +function BeginUpdate(Layer: PLayer): LongInt; +type + TLocalCall = function(Layer: PLayer; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 13)); + BeginUpdate := Call(Layer, LayersBase); +end; + + +function BehindLayer(dummy: LongInt; Layer: PLayer):LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 9)); + BehindLayer:= Call(dummy, Layer, LayersBase); +end; + + +function CreateBehindHookLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 32)); + CreateBehindHookLayer:= Call(LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, Hook, SuperBitmap2, LayersBase); +end; + + +function CreateBehindLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 7)); + CreateBehindLayer := Call(LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, SuperBitmap2, LayersBase); +end; + + +function CreateUpfrontHookLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; Hook: PHook; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 31)); + CreateUpfrontHookLayer := Call( LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, Hook, SuperBitmap2, LayersBase); +end; + + +function CreateUpfrontLayer(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap): PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; Bitmap1: PBitMap; x0: LongInt; y0: LongInt; x1: LongInt; y1: LongInt; Flags: LongInt; SuperBitmap2: PBitMap; LibBase: Pointer): PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 6)); + CreateUpfrontLayer := Call(LayerInfo, Bitmap1, x0, y0, x1, y1, Flags, SuperBitmap2, LayersBase); +end; + + +function DeleteLayer(dummy: LongInt; Layer: PLayer):LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 15)); + DeleteLayer := Call( dummy, Layer, LayersBase); +end; + + +procedure DisposeLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 25)); + Call(LayerInfo, LayersBase); +end; + + +procedure DoHookClipRects(Hook: PHook; RPort: PRastPort; const Rect: PRectangle); +type + TLocalCall = procedure(Hook : PHook; RPort: PRastPort; const Rect: PRectangle; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 36)); + Call(Hook, RPort, Rect, LayersBase); +end; + + +procedure EndUpdate(Layer: PLayer; Flag: LongWord); +type + TLocalCall = procedure(Layer: PLayer; Flag: LongWord; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 14)); + Call(Layer, flag, LayersBase); +end; + + +function FattenLayerInfo(LayerInfo: PLayer_Info):LongInt; +type + TLocalCall = function(LayerInfo: PLayer_Info; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 26)); + FattenLayerInfo := Call(LayerInfo, LayersBase); +end; + + +procedure InitLayers(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase,5)); + Call(LayerInfo, LayersBase); +end; + + +function InstallClipRegion(Layer: PLayer; const Region: PRegion): PRegion; +type + TLocalCall = function(Layer: PLayer; const Region: PRegion; LibBase: Pointer): PRegion; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 29)); + InstallClipRegion := Call( Layer, Region, LayersBase); +end; + + +function InstallLayerHook(Layer: PLayer; Hook: PHook): PHook; +type + TLocalCall = function(Layer: PLayer; Hook: PHook; LibBase: Pointer): PHook; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 33)); + InstallLayerHook := Call(Layer, Hook, LayersBase); +end; + + +function InstallLayerInfoHook(LayerInfo: PLayer_Info; const Hook: PHook): PHook; +type + TLocalCall = function(LayerInfo: PLayer_Info; const Hook: PHook; LibBase: Pointer): PHook; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 34)); + InstallLayerInfoHook := Call(LayerInfo, Hook, LayersBase); +end; + + +procedure LockLayer(dummy: LongInt; Layer: PLayer); +type + TLocalCall = procedure(dummy: LongInt; Layer: PLayer; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 16)); + Call(dummy, Layer, LayersBase); +end; + + +procedure LockLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 20)); + Call(LayerInfo, LayersBase); +end; + + +procedure LockLayers(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 18)); + Call(LayerInfo, LayersBase); +end; + + +function MoveLayer(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt): LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 10)); + MoveLayer := Call(dummy, Layer, dx, dy, LayersBase); +end; + + +function MoveLayerInFrontOf(layer_to_move: PLayer; other_layer: PLayer):LongInt; +type + TLocalCall = function(layer_to_move: PLayer; other_layer: PLayer; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 28)); + MoveLayerInFrontOf := Call(layer_to_move, other_layer, LayersBase); +end; + + +function MoveSizeLayer(Layer: PLayer; dx: LongInt; dy: LongInt; dw: LongInt; dh: LongInt): LongInt; +type + TLocalCall = function(Layer: PLayer; dx: LongInt; dy: LongInt; dw: LongInt; dh: LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 30)); + MoveSizeLayer := Call(Layer, dx, dy, dw, dh, LayersBase); +end; + + +function NewLayerInfo(): PLayer_Info; +type + TLocalCall = function(LibBase: Pointer): PLayer_Info; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 24)); + NewLayerInfo := Call(LayersBase); +end; + + +procedure ScrollLayer(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt); +type + TLocalCall = procedure(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 12)); + Call(dummy, Layer, dx, dy, LayersBase); +end; + + +function SizeLayer(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt): LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 11)); + SizeLayer := Call(dummy, Layer, dx, dy, LayersBase); +end; + + +procedure SortLayerCR(Layer: PLayer; dx: LongInt; dy: LongInt); +type + TLocalCall = procedure(Layer: PLayer; dx: LongInt; dy: LongInt; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 35)); + Call(Layer, dx, dy, LayersBase); +end; + + +procedure SwapBitsRastPortClipRect(rp: pRastPort; cr: PClipRect); +type + TLocalCall = procedure(rp: pRastPort; cr: PClipRect; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 21)); + Call(rp, cr, LayersBase); +end; + + +procedure ThinLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 27)); + Call(LayerInfo, LayersBase); +end; + + +procedure UnlockLayer(Layer: PLayer); +type + TLocalCall = procedure(Layer: PLayer; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 17)); + Call(Layer, LayersBase); +end; + + +procedure UnlockLayerInfo(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call:=TLocalCall(GetLibAdress(LayersBase, 23)); + Call(LayerInfo, LayersBase); +end; + + +procedure UnlockLayers(LayerInfo: PLayer_Info); +type + TLocalCall = procedure(LayerInfo: PLayer_Info; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 19)); + Call(LayerInfo, LayersBase); +end; + + +function UpfrontLayer(dummy: LongInt; Layer: PLayer):LongInt; +type + TLocalCall = function(dummy: LongInt; Layer: PLayer; LibBase: Pointer):LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 8)); + UpfrontLayer := Call(dummy, Layer, LayersBase); +end; + + +function WhichLayer(LayerInfo: PLayer_Info; x: LongInt; y: LongInt):PLayer; +type + TLocalCall = function(LayerInfo: PLayer_Info; x: LongInt; y: LongInt; LibBase: Pointer):PLayer; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(LayersBase, 22)); + WhichLayer := Call(LayerInfo, x, y, LayersBase); +end; + +initialization + LayersBase := OpenLibrary(LAYERSNAME, 36); + +finalization + CloseLibrary(LayersBase); + +eND. (* UNIT LAYERS *) + + + diff --git a/rtl/aros/longarray.pas b/rtl/aros/longarray.pas new file mode 100644 index 0000000000..b3f1fe2a9e --- /dev/null +++ b/rtl/aros/longarray.pas @@ -0,0 +1,73 @@ +{ + 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 + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +{ + History: + + A simple unit that helps to build array of longint. + Uses array of const so don't forget to use + $mode objfpc. + + 05 Nov 2002. + + nils.sjoholm@mailbox.swipnet.se +} + +unit longarray; + +{$mode objfpc} + +interface + +function readinlongs(const args : array of const): pointer; + +implementation + +uses pastoc; +type + TMyArgs = array of LongInt; + PMyArgs = ^TMyArgs; + +var + argarray : PMyArgs;//array [0..20] of longint; + +function readinlongs(const args : array of const): pointer; +var + i : longint; + +begin + + for i := 0 to High(args) do begin + case args[i].vtype of + vtinteger : argarray^[i] := longint(args[i].vinteger); + vtpchar : argarray^[i] := longint(args[i].vpchar); + vtchar : argarray^[i] := longint(args[i].vchar); + vtpointer : argarray^[i] := longint(args[i].vpointer); + vtstring : argarray^[i] := longint(pas2c(args[i].vstring^)); + vtboolean : argarray^[i] := longint(byte(args[i].vboolean)); + end; + end; + readinlongs := @(argarray^[0]); +end; + +initialization + New(argarray); + SetLength(argarray^, 200); +finalization + SetLength(argarray^, 0); + Dispose(argarray); +end. + diff --git a/rtl/aros/mouse.pp b/rtl/aros/mouse.pp new file mode 100644 index 0000000000..f081996402 --- /dev/null +++ b/rtl/aros/mouse.pp @@ -0,0 +1,61 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2006 Karoly Balogh + member of the Free Pascal development team + + Mouse unit for Amiga/MorphOS + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +unit Mouse; +interface + +{$i mouseh.inc} + +implementation + +{$i mouse.inc} + +function SysDetectMouse:byte; +var + num : dword; +begin + // Under Amiga/MorphOS, mouse is always there, and it's unable to easily + // detect number of buttons. So lets report 3, which is common nowadays. (KB) + SysDetectMouse:=3; +end; + + + + + + + + + +const + SysMouseDriver : TMouseDriver = ( + UseDefaultQueue : True; + InitDriver : Nil; + DoneDriver : Nil; + DetectMouse : @SysDetectMouse; + ShowMouse : Nil; + HideMouse : Nil; + GetMouseX : Nil; + GetMouseY : Nil; + GetMouseButtons : Nil; + SetMouseXY : Nil; + GetMouseEvent : Nil; + PollMouseEvent : Nil; + PutMouseEvent : Nil; + ); + +begin + SetMouseDriver(SysMouseDriver); +end. diff --git a/rtl/aros/pastoc.pas b/rtl/aros/pastoc.pas new file mode 100644 index 0000000000..1b89378749 --- /dev/null +++ b/rtl/aros/pastoc.pas @@ -0,0 +1,131 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 2000-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} +{ + History: + + Added the define use_amiga_smartlink. + 13 Jan 2003. + + nils.sjoholm@mailbox.swipnet.se Nils Sjoholm +} + +unit PasToC; + + +interface + +function Pas2C(var s : String): PChar; + +implementation + +const + MEMF_ANY = %000000000000000000000000; { * Any type of memory will do * } + MEMF_PUBLIC = %000000000000000000000001; + + MEMF_CLEAR = %000000010000000000000000; + +Type + + ULONG = Longint; + + pRemember = ^tRemember; + tRemember = record + NextRemember : pRemember; + RememberSize : ULONG; + Memory : Pointer; + end; + +var + myrememberkey : pRemember; + remember_exit : pointer; + +{FUNCTION fpcAllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER; +BEGIN + ASM + MOVE.L A6,-(A7) + MOVEA.L rememberKey,A0 + MOVE.L size,D0 + MOVE.L flags,D1 + MOVEA.L _IntuitionBase,A6 + JSR -396(A6) + MOVEA.L (A7)+,A6 + MOVE.L D0,@RESULT + END; +END; + +PROCEDURE fpcFreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT); +BEGIN + ASM + MOVE.L A6,-(A7) + MOVEA.L rememberKey,A0 + MOVE.L reallyForget,D0 + MOVEA.L _IntuitionBase,A6 + JSR -408(A6) + MOVEA.L (A7)+,A6 + END; +END; } + +Function StringPcharCopy(Dest: PChar; Source: String):PChar; +var + counter : byte; +Begin + counter := 0; + { if empty pascal string } + { then setup and exit now } + if Source = '' then + Begin + Dest[0] := #0; + StringPCharCopy := Dest; + exit; + end; + for counter:=1 to length(Source) do + begin + Dest[counter-1] := Source[counter]; + end; + { terminate the string } + Dest[counter] := #0; + StringPcharCopy:=Dest; +end; + +function Pas2C(var s : string): PChar; +var + themem : Pointer; +begin + s := s + #0; + Pas2C := @(s[1]); + {//themem := fpcAllocRemember(myrememberkey,length(s)+1, MEMF_CLEAR or MEMF_PUBLIC); + GetMem(TheMem,length(s)+1); + if themem = nil then begin + writeln('Can''t allocate memory for string'); + halt(20); + end else begin + StringPCharCopy(themem,s); + Pas2C := themem; + end;} +end; + +procedure ReleasePasToC; +begin + //ExitProc := remember_exit; + //FreeMem(myrememberkey); + //fpcFreeRemember(myrememberkey,1); +end; + +begin + myrememberkey := nil; + remember_exit := ExitProc; + ExitProc := @ReleasePasToC; +end. diff --git a/rtl/aros/sysdir.inc b/rtl/aros/sysdir.inc index d24e0c6ee4..74d36712f5 100644 --- a/rtl/aros/sysdir.inc +++ b/rtl/aros/sysdir.inc @@ -21,90 +21,99 @@ //procedure mkdir(const s : string); procedure mkdir(a: PChar; l: LongInt); [IOCheck, public, alias : 'FPC_SYS_MKDIR']; var - tmpStr : array[0..255] of char; - tmpLock: LongInt; - s: String; + TmpStr : array[0..255] of char; + TmpLock: LongInt; + S: String; begin - s := string(a); - checkCTRLC; - if (s='') or (InOutRes<>0) then exit; - tmpStr:=PathConv(s)+#0; - tmpLock:=dosCreateDir(@tmpStr); - if tmpLock=0 then begin - dosError2InOut(IoErr); - exit; + S := string(a); + CheckCTRLC; + if (S = '') or (InOutRes <> 0) then + Exit; + TmpStr := PathConv(S) + #0; + TmpLock := DosCreateDir(@TmpStr); + if TmpLock = 0 then begin + DosError2InOut(IoErr); + Exit; end; - UnLock(tmpLock); + UnLock(TmpLock); end; //procedure rmdir(const s : string); procedure rmdir(a: PChar; l: LongInt); [IOCheck, public, alias : 'FPC_SYS_RMDIR']; var - tmpStr : array[0..255] of Char; - s: string; + TmpStr : array[0..255] of Char; + S: string; begin - s := string(a); - checkCTRLC; - if (s='.') then InOutRes:=16; - If (s='') or (InOutRes<>0) then exit; - tmpStr:=PathConv(s)+#0; - if not dosDeleteFile(@tmpStr) then - dosError2InOut(IoErr); + S := string(a); + CheckCTRLC; + if (S = '.') then + InOutRes := 16; + If (S = '') or (InOutRes <> 0) then + Exit; + TmpStr := PathConv(S) + #0; + if not DosDeleteFile(@TmpStr) then + DosError2InOut(IoErr); end; //procedure chdir(const s : string); procedure chdir(a: PChar; l: LongInt); [IOCheck, public, alias : 'FPC_SYS_CHDIR']; var - tmpStr : array[0..255] of Char; - tmpLock: LongInt; + TmpStr : array[0..255] of Char; + TmpLock: LongInt; FIB : PFileInfoBlock; - s: String; + S: String; begin - s := string(a); - checkCTRLC; - If (s='') or (InOutRes<>0) then exit; - tmpStr:=PathConv(s)+#0; - tmpLock:=0; + S := string(a); + CheckCTRLC; + If (S = '') or (InOutRes <> 0) then + Exit; + TmpStr := PathConv(S) + #0; + TmpLock := 0; { Changing the directory is a pretty complicated affair } { 1) Obtain a lock on the directory } { 2) CurrentDir the lock } - tmpLock:=Lock(@tmpStr,SHARED_LOCK); - if tmpLock=0 then begin - dosError2InOut(IoErr); - exit; + TmpLock := Lock(@TmpStr, SHARED_LOCK); + if TmpLock=0 then + begin + DosError2InOut(IoErr); + Exit; end; - FIB:=nil; - new(FIB); + FIB := nil; + New(FIB); - if (Examine(tmpLock,FIB)=True) and (FIB^.fib_DirEntryType>0) then begin - tmpLock:=CurrentDir(tmpLock); - if AOS_OrigDir=0 then begin - AOS_OrigDir:=tmpLock; - tmpLock:=0; + if (Examine(TmpLock, FIB) = True) and (FIB^.fib_DirEntryType > 0) then + begin + TmpLock := CurrentDir(TmpLock); + if AOS_OrigDir = 0 then + begin + AOS_OrigDir := TmpLock; + TmpLock := 0; end; end; - if tmpLock<>0 then Unlock(tmpLock); - if assigned(FIB) then dispose(FIB); + if TmpLock <> 0 then + Unlock(TmpLock); + if Assigned(FIB) then + Dispose(FIB); end; -procedure GetDir (DriveNr: byte; var Dir: ShortString); +procedure GetDir(DriveNr: Byte; var Dir: ShortString); var - tmpbuf: array[0..255] of char; + TmpBuf: array[0..255] of Char; LockDir: LongInt; begin - checkCTRLC; + CheckCTRLC; Dir:=''; LockDir := CurrentDir(0); CurrentDir(LockDir); - NameFromLock(LockDir, tmpbuf, 256); - Dir := strpas(tmpbuf); + NameFromLock(LockDir, TmpBuf, 256); + Dir := StrPas(TmpBuf); // followinf dos not work when called from WB or by make {if not GetCurrentDirName(tmpbuf,256) then - dosError2InOut(IoErr) + DosError2InOut(IoErr) else Dir:=strpas(tmpbuf); } diff --git a/rtl/aros/sysfile.inc b/rtl/aros/sysfile.inc index 0521a13efe..eed6f75b94 100644 --- a/rtl/aros/sysfile.inc +++ b/rtl/aros/sysfile.inc @@ -19,15 +19,17 @@ {***************************************************************************** AROS File-handling Support Functions *****************************************************************************} + type { AmigaOS does not automatically close opened files on exit back to } { the operating system, therefore as a precuation we close all files } { manually on exit. } PFileList = ^TFileList; TFileList = record { no packed, must be correctly aligned } - handle : THandle; { Handle to file } - next : PFileList; { Next file in list } - buffered : boolean; { used buffered I/O? } + Handle : THandle; { Handle to file } + FName : array of Char; + Next : PFileList; { Next file in list } + Buffered : Boolean; { used Buffered I/O? } end; var @@ -36,57 +38,70 @@ var { Function to be called at program shutdown, to close all opened files } procedure CloseList(l: PFileList); var - tmpNext : PFileList; - tmpHandle : THandle; + TmpNext: PFileList; + TmpHandle: THandle; begin - if l=nil then exit; + if l = nil then + Exit; { First, close all tracked files } - tmpNext:=l^.next; - while tmpNext<>nil do begin - tmpHandle:=tmpNext^.handle; - if (tmpHandle<>StdInputHandle) and (tmpHandle<>StdOutputHandle) - and (tmpHandle<>StdErrorHandle) then begin - dosClose(tmpHandle); + TmpNext := l^.Next; + while TmpNext <> nil do + begin + TmpHandle := TmpNext^.Handle; + if (TmpHandle <> StdInputHandle) and (TmpHandle <> StdOutputHandle) + and (TmpHandle <> StdErrorHandle) then + begin + DosClose(TmpHandle); end; - tmpNext:=tmpNext^.next; + TmpNext := TmpNext^.Next; end; { Next, erase the linked list } - while l<>nil do begin - tmpNext:=l; - l:=l^.next; - dispose(tmpNext); + while l <> nil do + begin + TmpNext := l; + l := l^.Next; + Dispose(TmpNext); end; end; { Function to be called to add a file to the opened file list } -procedure AddToList(var l: PFileList; h: THandle); alias: 'ADDTOLIST'; [public]; +procedure AddToList(var l: PFileList; h: THandle; const AName: PChar); alias: 'ADDTOLIST'; [public]; var - p : PFileList; - inList: Boolean; + p: PFileList; + InList: Boolean; + LocalName: string; begin - inList:=False; - if l<>nil then begin + InList := False; + if l <> nil then + begin { if there is a valid filelist, search for the value } { in the list to avoid double additions } - p:=l; - while (p^.next<>nil) and (not inList) do - if p^.next^.handle=h then inList:=True - else p:=p^.next; - p:=nil; - end else begin + p := l; + while (p^.Next <> nil) and (not InList) do + if p^.Next^.Handle = h then + inList := True + else + p := p^.Next; + p := nil; + end else + begin { if the list is not yet allocated, allocate it. } New(l); - l^.next:=nil; + l^.Next := nil; end; - if not inList then begin + if not inList then + begin New(p); - p^.handle:=h; - p^.buffered:=False; - p^.next:=l^.next; - l^.next:=p; + p^.Handle := h; + localname := AName + #0; + SetLength(p^.FName, Length(LocalName)); + Move(LocalName[1], p^.FName[0], Length(LocalName)); + p^.Buffered := False; + p^.Next := l^.Next; + l^.Next := p; end {$IFDEF MOSFPC_FILEDEBUG} else @@ -96,27 +111,31 @@ begin end; { Function to be called to remove a file from the list } -function RemoveFromList(var l: PFileList; h: THandle): boolean; alias: 'REMOVEFROMLIST'; [public]; +function RemoveFromList(var l: PFileList; h: THandle): Boolean; alias: 'REMOVEFROMLIST'; [public]; var - p : PFileList; - inList : Boolean; - tmpList: PFileList; + p: PFileList; + InList: Boolean; + TmpList: PFileList; begin - inList:=False; - if l=nil then begin - RemoveFromList:=inList; - exit; + InList := False; + if l = nil then + begin + RemoveFromList := InList; + Exit; end; - p:=l; - while (p^.next<>nil) and (not inList) do - if p^.next^.handle=h then inList:=True - else p:=p^.next; + p := l; + while (p^.Next <> nil) and (not InList) do + if p^.Next^.Handle = h then + InList := True + else + p := p^.Next; - if inList then begin - tmpList:=p^.next^.next; - dispose(p^.next); - p^.next:=tmpList; + if InList then + begin + TmpList := p^.Next^.Next; + Dispose(p^.Next); + p^.Next := TmpList; end {$IFDEF MOSFPC_FILEDEBUG} else @@ -124,33 +143,60 @@ begin {$ENDIF} ; - RemoveFromList:=inList; + RemoveFromList := inList; end; { Function to check if file is in the list } function CheckInList(var l: PFileList; h: THandle): pointer; alias: 'CHECKINLIST'; [public]; var - p : PFileList; - inList : Pointer; - + p: PFileList; + InList: Pointer; begin - inList:=nil; - if l=nil then begin - CheckInList:=inList; - exit; + InList := nil; + if l = nil then + begin + CheckInList := InList; + Exit; end; - p:=l; - while (p^.next<>nil) and (inList=nil) do - if p^.next^.handle=h then inList:=p^.next - else p:=p^.next; + p := l; + while (p^.Next <> nil) and (InList = nil) do + if p^.Next^.Handle = h then + InList := p^.Next + else + p := p^.Next; {$IFDEF MOSFPC_FILEDEBUG} - if inList=nil then + if InList = nil then RawDoFmt('FPC_FILE_DEBUG: Warning! Check for not existing filehandle: $%lx !'+#10,@h,pointer(1),nil); {$ENDIF} - CheckInList:=inList; + CheckInList := InList; +end; + +function GetNameFromList(var l: PFileList; h: THandle): PChar; alias: 'GETNAMEFROMLIST'; [public]; +var + p: PFileList; + InList: PChar; +begin + InList := ''; + if l = nil then + begin + GetNameFromList := ''; + Exit; + end; + + p := l; + while (p^.Next <> nil) and (InList = '') do + begin + if p^.Next^.Handle = h then + begin + InList := PChar(@(p^.Next^.FName[0])); + Break; + end else + p := p^.Next; + end; + GetNameFromList := inList; end; @@ -159,231 +205,270 @@ end; All these functions can set InOutRes on errors ****************************************************************************} -{ close a file from the handle value } -procedure do_close(handle : THandle); +{ close a file from the Handle value } +procedure do_close(Handle: THandle); begin - if RemoveFromList(AOS_fileList,handle) then begin + if RemoveFromList(AOS_fileList,Handle) then + begin { Do _NOT_ check CTRL_C on Close, because it will conflict with System_Exit! } - if not dosClose(handle) then + if not dosClose(Handle) then dosError2InOut(IoErr); end; end; -procedure do_erase(p : pchar); +procedure do_erase(p: PChar); var - tmpStr: array[0..255] of Char; + TmpStr: array[0..255] of Char; begin - tmpStr:=PathConv(strpas(p))+#0; - checkCTRLC; - if not dosDeleteFile(@tmpStr) then - dosError2InOut(IoErr); + TmpStr := PathConv(StrPas(p))+#0; + CheckCTRLC; + if not dosDeleteFile(@TmpStr) then + DosError2InOut(IoErr); end; -procedure do_rename(p1,p2 : pchar); +procedure do_rename(p1,p2 : PChar); { quite stack-effective code, huh? :) damn path conversions... (KB) } var - tmpStr1: array[0..255] of Char; - tmpStr2: array[0..255] of Char; + TmpStr1: array[0..255] of Char; + TmpStr2: array[0..255] of Char; begin - tmpStr1:=PathConv(strpas(p1))+#0; - tmpStr2:=PathConv(strpas(p2))+#0; - checkCTRLC; - if not dosRename(@tmpStr1,@tmpStr2) then - dosError2InOut(IoErr); + TmpStr1 := PathConv(StrPas(p1)) + #0; + TmpStr2 := PathConv(StrPas(p2)) + #0; + CheckCTRLC; + if not dosRename(@TmpStr1, @TmpStr2) then + DosError2InOut(IoErr); end; -function do_write(h: THandle; addr: pointer; len: longint) : longint; -var dosResult: LongInt; +function do_write(h: THandle; addr: pointer; Len: LongInt) : LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_write:=0; - if (len<=0) or (h=0) then exit; - -{$IFDEF MOSFPC_FILEDEBUG} - if not ((h=StdOutputHandle) or (h=StdInputHandle) or - (h=StdErrorHandle)) then CheckInList(AOS_fileList,h); -{$ENDIF} - - dosResult:=dosWrite(h,addr,len); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_write:=dosResult; + CheckCTRLC; + do_write := 0; + if (Len <= 0) or (h = 0) then + Exit; + + DosResult := DosWrite(h, addr, Len); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_write := DosResult; + end; + {$IFDEF MOSFPC_FILEDEBUG} + if not ((h = StdOutputHandle) or (h = StdInputHandle) or + (h = StdErrorHandle)) then + begin + writeln('## write ',h,' should: ', len, ' is: ', Dosresult); + //CheckInList(AOS_fileList, h); end; + {$ENDIF} end; -function do_read(h: THandle; addr: pointer; len: longint) : longint; -var dosResult: LongInt; +function do_read(h: THandle; addr: pointer; Len: LongInt) : LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_read:=0; - if (len<=0) or (h=0) then exit; + CheckCTRLC; + do_read := 0; + if (Len <= 0) or (h = 0) then + Exit; {$IFDEF MOSFPC_FILEDEBUG} - if not ((h=StdOutputHandle) or (h=StdInputHandle) or - (h=StdErrorHandle)) then CheckInList(AOS_fileList,h); + if not ((h = StdOutputHandle) or (h = StdInputHandle) or + (h = StdErrorHandle)) then + CheckInList(AOS_fileList, h); {$ENDIF} - dosResult:=dosRead(h,addr,len); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_read:=dosResult; + DosResult := DosRead(h, addr, Len); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_read := DosResult; end end; -function do_filepos(handle: THandle) : longint; -var dosResult: LongInt; +function do_filepos(Handle: THandle) : LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_filepos:=-1; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + do_filepos := -1; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking zero from OFFSET_CURRENT to find out where we are } - dosResult:=dosSeek(handle,0,OFFSET_CURRENT); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_filepos:=dosResult; + DosResult := DosSeek(Handle, 0, OFFSET_CURRENT); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_filepos := DosResult; end; end; end; -procedure do_seek(handle: Thandle; pos: longint); +procedure do_seek(Handle: Thandle; pos: LongInt); +var + err: Integer; begin - checkCTRLC; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking from OFFSET_BEGINNING } - if dosSeek(handle,pos,OFFSET_BEGINNING)<0 then - dosError2InOut(IoErr); + if DosSeek(Handle, pos, OFFSET_BEGINNING) < 0 then + begin + Err := ioErr; + DosError2InOut(Err); + end; end; end; -function do_seekend(handle: longint):longint; -var dosResult: LongInt; +function do_seekend(Handle: LongInt):LongInt; +var + DosResult: LongInt; begin - checkCTRLC; - do_seekend:=-1; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + do_seekend := -1; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking to OFFSET_END } - dosResult:=dosSeek(handle,0,OFFSET_END); - if dosResult<0 then begin - dosError2InOut(IoErr); - end else begin - do_seekend:=dosResult; + DosResult := dosSeek(Handle, 0, OFFSET_END); + if DosResult < 0 then + begin + DosError2InOut(IoErr); + end else + begin + do_seekend := DosSeek(Handle, 0, OFFSET_CURRENT); // get positon end; end; end; -function do_filesize(handle : longint) : longint; -var currfilepos: longint; +function do_filesize(Handle : LongInt) : LongInt; +var + CurrFilePos: LongInt; begin - checkCTRLC; - do_filesize:=-1; - if CheckInList(AOS_fileList,handle)<>nil then begin - - currfilepos:=do_filepos(handle); - { We have to do this twice, because seek returns the OLD position } - do_filesize:=do_seekend(handle); - do_filesize:=do_seekend(handle); - do_seek(handle,currfilepos); - Result := do_fileSize; + CheckCTRLC; + do_filesize := -1; + if CheckInList(AOS_fileList, Handle) <> nil then + begin + CurrFilePos := do_filepos(Handle); + do_filesize := do_seekend(Handle); + do_seek(Handle, CurrFilePos); end; end; { truncate at a given position } -procedure do_truncate(handle, pos: longint); +procedure do_truncate(Handle, pos: LongInt); begin - checkCTRLC; - if CheckInList(AOS_fileList,handle)<>nil then begin - + CheckCTRLC; + if CheckInList(AOS_fileList, Handle) <> nil then + begin { Seeking from OFFSET_BEGINNING } - if SetFileSize(handle,pos,OFFSET_BEGINNING)<0 then - dosError2InOut(IoErr); + if SetFileSize(Handle, pos, OFFSET_BEGINNING) < 0 then + DosError2InOut(IoErr); end; end; -procedure do_open(var f;p:pchar;flags:longint); +procedure do_open(var f; p: PChar; flags: LongInt); { - filerec and textrec have both handle and mode as the first items so + filerec and textrec have both Handle and mode as the first items so they could use the same routine for opening/creating. when (flags and $10) the file will be append when (flags and $100) the file will be truncate/rewritten when (flags and $1000) there is no check for close (needed for textfiles) } var - handle : THandle; - openflags: LongInt; - tmpStr : array[0..255] of Char; + Handle : THandle; + OpenFlags: LongInt; + TmpStr : array[0..255] of Char; begin - tmpStr:=PathConv(strpas(p))+#0; - + TmpStr:=PathConv(StrPas(p))+#0; + { close first if opened } - if ((flags and $10000)=0) then begin + if ((flags and $10000) = 0) then + begin case filerec(f).mode of - fminput,fmoutput,fminout : Do_Close(filerec(f).handle); - fmclosed : ; - else begin - inoutres:=102; {not assigned} - exit; + fminput, + fmoutput, + fminout: Do_Close(filerec(f).Handle); + fmclosed: ; + else + begin + InOutRes := 102; {not assigned} + Exit; end; end; end; - { reset file handle } - filerec(f).handle:=UnusedHandle; + { reset file Handle } + filerec(f).Handle := UnusedHandle; { convert filemode to filerec modes } { READ/WRITE on existing file } { RESET/APPEND } - openflags:=MODE_OLDFILE; + OpenFlags := MODE_OLDFILE; case (flags and 3) of - 0 : filerec(f).mode:=fminput; - 1 : filerec(f).mode:=fmoutput; - 2 : filerec(f).mode:=fminout; + 0 : filerec(f).mode := fminput; + 1 : filerec(f).mode := fmoutput; + 2 : filerec(f).mode := fminout; end; { rewrite (create a new file) } - if (flags and $1000)<>0 then openflags:=MODE_NEWFILE; + if (flags and $1000) <> 0 then + openflags:=MODE_NEWFILE; { empty name is special } - if p[0]=#0 then begin + if p[0] = #0 then + begin case filerec(f).mode of - fminput : - filerec(f).handle:=StdInputHandle; + fminput: + filerec(f).Handle := StdInputHandle; fmappend, - fmoutput : begin - filerec(f).handle:=StdOutputHandle; - filerec(f).mode:=fmoutput; {fool fmappend} + fmoutput: begin + filerec(f).Handle := StdOutputHandle; + filerec(f).mode := fmOutput; {fool fmappend} end; end; - exit; + Exit; end; - handle:=Open(@tmpStr,openflags); - if handle=0 then begin - dosError2InOut(IoErr); - end else begin - AddToList(AOS_fileList,handle); - filerec(f).handle:=handle; + Handle := Open(@TmpStr, OpenFlags); + if Handle = 0 then + begin + DosError2InOut(IoErr); + end else + begin + AddToList(AOS_fileList, Handle, PChar(@TmpStr[0])); + filerec(f).Handle := Handle; end; { append mode } - if ((Flags and $100)<>0) and - (FileRec(F).Handle<>UnusedHandle) then begin - do_seekend(filerec(f).handle); - filerec(f).mode:=fmoutput; {fool fmappend} + if ((Flags and $100) <> 0) and (FileRec(F).Handle <> UnusedHandle) then + begin + do_seekend(filerec(f).Handle); + filerec(f).mode := fmoutput; {fool fmappend} + end; + + {$IFDEF MOSFPC_FILEDEBUG} + if not ((Handle = StdOutputHandle) or (Handle = StdInputHandle) or + (Handle = StdErrorHandle)) then + begin + CheckInList(AOS_fileList, h); end; + {$ENDIF} + end; -function do_isdevice(handle: longint): boolean; +function do_isdevice(Handle: LongInt): Boolean; begin - if (handle=StdOutputHandle) or (handle=StdInputHandle) or - (handle=StdErrorHandle) then - do_isdevice:=True + if (Handle = StdOutputHandle) or (Handle = StdInputHandle) or + (Handle = StdErrorHandle) then + do_isdevice := True else - do_isdevice:=False; + do_isdevice := False; end; diff --git a/rtl/aros/sysos.inc b/rtl/aros/sysos.inc index 0b4ee75569..02a4dc9afd 100644 --- a/rtl/aros/sysos.inc +++ b/rtl/aros/sysos.inc @@ -151,4 +151,3 @@ begin end; PathConv:=path; end; - diff --git a/rtl/aros/system.pp b/rtl/aros/system.pp index 0b306dabd6..85fd642bb5 100644 --- a/rtl/aros/system.pp +++ b/rtl/aros/system.pp @@ -72,8 +72,6 @@ var envp: PPChar; killed : Boolean = False; - ExtReturnCode: LongInt; external name '_returncode'; - function GetLibAdress(Base: Pointer; Offset: LongInt): Pointer; implementation @@ -104,16 +102,7 @@ type Misc. System Dependent Functions *****************************************************************************} -procedure ExternalHalt; stdcall;external name '_haltproc'; - - -procedure haltproc(e:longint); -begin - ExtReturnCode := e; - ExternalHalt; -end; - - +procedure haltproc(e:longint); cdecl; nostackframe; external name '_haltproc'; procedure System_exit; var @@ -137,8 +126,6 @@ begin DeletePool(AOS_heapPool); AOS_UtilityBase := nil; AOS_HeapPool := nil; - // call Exit - DosExit(ExitCode); // if AOS_DOSBase<>nil then CloseLibrary(AOS_DOSBase); @@ -430,7 +417,6 @@ begin result := stklen; end; - begin IsConsole := TRUE; SysResetFPU; diff --git a/rtl/aros/sysutils.pp b/rtl/aros/sysutils.pp index 279f7d6c11..36821879f5 100644 --- a/rtl/aros/sysutils.pp +++ b/rtl/aros/sysutils.pp @@ -57,12 +57,13 @@ uses dos,sysconst; { * Followings are implemented in the system unit! * } function PathConv(path: shortstring): shortstring; external name 'PATHCONV'; -procedure AddToList(var l: Pointer; h: LongInt); external name 'ADDTOLIST'; +procedure AddToList(var l: Pointer; h: LongInt; const AName: PChar); external name 'ADDTOLIST'; function RemoveFromList(var l: Pointer; h: LongInt): boolean; external name 'REMOVEFROMLIST'; function CheckInList(var l: Pointer; h: LongInt): pointer; external name 'CHECKINLIST'; +function GetNameFromList(var l: Pointer; h: THandle): PChar; external name 'GETNAMEFROMLIST'; var - MOS_fileList: Pointer; external name 'AOS_FILELIST'; + AOS_fileList: Pointer; external name 'AOS_FILELIST'; function dosLock(const name: String; @@ -96,6 +97,28 @@ begin result:=ComposeDateTime(tmpDate,tmpTime); end; +function DateTimeToAmigaFileDate(FDate: TDateTime): TDateStamp; +var + clockData: TClockData; + msec: Word; + tmpSecs: LongWord; +begin + with clockData do + begin + DecodeDate(FDate, Year, Month, mday); + DecodeTime(FDate, hour, min, sec, msec); + end; + tmpSecs := Date2Amiga(@clockdata); + with Result do + begin + ds_Days := tmpSecs div (24 * 60 * 60); + tmpSecs := tmpSecs - (ds_Days * (24 * 60 * 60)); + ds_Minute := tmpSecs div 60; + tmpSecs := tmpSecs - (ds_Minute * 60); + ds_Tick := tmpSecs * TICKS_PER_SECOND; + end; +end; + procedure Sleep(milliseconds: Cardinal); var Ticks: Cardinal; @@ -119,30 +142,67 @@ end; function FileOpen(const FileName: string; Mode: Integer): LongInt; var dosResult: LongInt; - tmpStr : array[0..255] of char; + tmpStr : string;//array[0..255] of char; begin {$WARNING FIX ME! To do: FileOpen Access Modes} - tmpStr:=PathConv(FileName)+#0; - dosResult:=Open(@tmpStr,MODE_OLDFILE); + tmpStr:=PathConv(FileName) + #0; + dosResult:=Open(PChar(tmpStr),MODE_OLDFILE); if dosResult=0 then dosResult:=-1 else - AddToList(MOS_fileList,dosResult); + AddToList(AOS_fileList, dosResult, PChar(tmpStr)); FileOpen:=dosResult; end; function FileGetDate(Handle: LongInt) : LongInt; +var + FileName: string; + tmpLock: Longint; + tmpFIB : PFileInfoBlock; + tmpDateTime: TDateTime; + validFile: boolean; begin - Result := 0; - {$WARNING filegetdate call is dummy} + FileName := GetNameFromList(AOS_fileList, Handle); + if FileName = '' then + begin + Result := -1; + Exit; + end; + FileName := Filename + #0; + tmpLock := dosLock(PChar(Filename), SHARED_LOCK); + + if (tmpLock <> 0) then begin + new(tmpFIB); + if Examine(tmpLock,tmpFIB) then begin + tmpDateTime:=AmigaFileDateToDateTime(tmpFIB^.fib_Date,validFile); + end; + Unlock(tmpLock); + dispose(tmpFIB); + end; + + if validFile then + result:=DateTimeToFileDate(tmpDateTime) + else + result:=-1; end; function FileSetDate(Handle, Age: LongInt) : LongInt; +var + DateStamp: TDateStamp; + FileName: string; begin - // Impossible under unix from FileHandle !! + Result := 0; + FileName := GetNameFromList(AOS_fileList, Handle); + if FileName = '' then + begin + Result := -1; + Exit; + end; + DateStamp := DateTimeToAmigaFileDate(FileDateToDateTime(Age)); + SetFileDate(PChar(FileName), @DateStamp); FileSetDate:=-1; end; @@ -157,7 +217,7 @@ begin if dosResult=0 then dosResult:=-1 else - AddToList(MOS_fileList,dosResult); + AddToList(AOS_fileList,dosResult, @tmpStr); FileCreate:=dosResult; end; @@ -228,7 +288,7 @@ begin if (Handle=0) or (Handle=-1) then exit; // dosClose(Handle); - RemoveFromList(MOS_fileList,Handle); + RemoveFromList(AOS_fileList,Handle); end; diff --git a/rtl/aros/tagsarray.pas b/rtl/aros/tagsarray.pas new file mode 100644 index 0000000000..a8cc12fee1 --- /dev/null +++ b/rtl/aros/tagsarray.pas @@ -0,0 +1,117 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 2002 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +{ + History: + + First version of this unit. + Just use this unit when you want to + use taglist. + + 09 Nov 2002 + + nils.sjoholm@mailbox.swipnet.se +} + +unit tagsarray; +{$mode objfpc} + + +interface + +uses Exec, Utility; + +type + TTagsList= array of ttagitem; + PMyTags= ^TTagsList; + + +function readintags(const args : array of const): pTagItem; +procedure AddTags(var Taglist: TTagsList; const args: array of const); +function GetTagPtr(TagList: TTagsList): pTagItem; + +implementation + +uses pastoc; + +var + mytags : PMyTags;//array [0..200] of ttagitem; + + +procedure AddTags(var Taglist: TTagsList; const args: array of const); +var + i: LongInt; + ii: LongInt; +begin + ii := Length(TagList); + SetLength(TagList, Length(TagList) + (Length(args) DIV 2)); + for i := 0 to High(args) do + begin + if (not Odd(i)) then + begin + TagList[ii].ti_tag := longint(Args[i].vinteger); + end else + begin + case Args[i].vtype of + vtinteger : TagList[ii].ti_data := longint(Args[i].vinteger); + vtboolean : TagList[ii].ti_data := longint(byte(Args[i].vboolean)); + vtpchar : TagList[ii].ti_data := longint(Args[i].vpchar); + vtchar : TagList[ii].ti_data := longint(Args[i].vchar); + vtstring : TagList[ii].ti_data := longint(pas2c(Args[i].vstring^)); + vtpointer : TagList[ii].ti_data := longint(Args[i].vpointer); + end; + inc(ii); + end; + end; +end; + +function GetTagPtr(TagList: TTagsList): pTagItem; +begin + AddTags(TagList, [TAG_END, TAG_END]); + GetTagPtr := @(TagList[0]); +end; + +function readintags(const args : array of const): pTagItem; +var + i : longint; + ii : longint; +begin + ii := 0; + for i := 0 to high(args) do begin + if (not odd(i)) then begin + mytags^[ii].ti_tag := longint(Args[i].vinteger); + end else begin + case Args[i].vtype of + vtinteger : mytags^[ii].ti_data := longint(Args[i].vinteger); + vtboolean : mytags^[ii].ti_data := longint(byte(Args[i].vboolean)); + vtpchar : mytags^[ii].ti_data := longint(Args[i].vpchar); + vtchar : mytags^[ii].ti_data := longint(Args[i].vchar); + vtstring : mytags^[ii].ti_data := longint(pas2c(Args[i].vstring^)); + vtpointer : mytags^[ii].ti_data := longint(Args[i].vpointer); + end; + inc(ii); + end; + end; + readintags := @(mytags^[0]); +end; + +initialization + New(MyTags); + SetLength(MyTags^, 200); +finalization + SetLength(MyTags^, 0); + Dispose(MyTags); +end. diff --git a/rtl/aros/timer.pas b/rtl/aros/timer.pas new file mode 100644 index 0000000000..c78cccfc87 --- /dev/null +++ b/rtl/aros/timer.pas @@ -0,0 +1,145 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +{ + History: + Removed the var for all functions. + 06 Sep 2000. + + Added the define use_amiga_smartlink. + 13 Jan 2003. + + nils.sjoholm@mailbox.swipnet.se + +} + +unit timer; + +INTERFACE + +uses exec; + +Const + +{ unit defintions } + UNIT_MICROHZ = 0; + UNIT_VBLANK = 1; + UNIT_ECLOCK = 2; + UNIT_WAITUNTIL = 3; + UNIT_WAITECLOCK = 4; + + TIMERNAME : PChar = 'timer.device'; + +Type + + ptimeval = ^ttimeval; + ttimeval = record + tv_secs : ULONG; + tv_micro : ULONG; + end; + + ptimerequest = ^ttimerequest; + ttimerequest = record + tr_node : tIORequest; + tr_time : ttimeval; + end; + + pEClockVal = ^tEClockVal; + tEClockVal = record + ev_hi : ULONG; + ev_lo : ULONG; + end; + + +Const + +{ IO_COMMAND to use for adding a timer } + TR_ADDREQUEST = CMD_NONSTD; + TR_GETSYSTIME = CMD_NONSTD + 1; + TR_SETSYSTIME = CMD_NONSTD + 2; + +{ To use any of the routines below, TimerBase must be set to point + to the timer.device, either by calling CreateTimer or by pulling + the device pointer from a valid TimeRequest, i.e. + + TimerBase := TimeRequest.io_Device; + + _after_ you have called OpenDevice on the timer. + } + +var + TimerBase : Pointer; + +Procedure AddTime( Dest, Source : ptimeval); +Function CmpTime( Dest, Source : ptimeval) : ULONG; +Procedure SubTime( Dest, Source : ptimeval); +function ReadEClock(Dest : pEClockVal): longint; +procedure GetSysTime( Dest : ptimeval); + +IMPLEMENTATION + +Procedure AddTime(Dest, Source: ptimeval); +type + TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(TimerBase, 7)); + Call(Dest, Source, TimerBase); +end; + +Function CmpTime( Dest, Source : ptimeval) : ULONG; +type + TLocalCall = function(Dest, Source : ptimeval; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(TimerBase, 9)); + CmpTime := Call(Dest, Source, TimerBase); +end; + +Procedure SubTime( Dest, Source : ptimeval); +type + TLocalCall = procedure(Dest, Source: ptimeval; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(TimerBase, 8)); + Call(Dest, Source, TimerBase); +end; + +function ReadEClock(Dest : pEClockVal): longint; +type + TLocalCall = function(Dest : pEClockVal; LibBase: Pointer): longint; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(TimerBase, 10)); + ReadEClock := Call(Dest, TimerBase); +end; + +procedure GetSysTime(Dest: ptimeval); +type + TLocalCall = procedure(Dest: ptimeval; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(TimerBase, 11)); + Call(Dest, TimerBase); +end; + + +end. diff --git a/rtl/aros/utility.pas b/rtl/aros/utility.pas new file mode 100644 index 0000000000..a399ec6f47 --- /dev/null +++ b/rtl/aros/utility.pas @@ -0,0 +1,772 @@ +{ + This file is part of the Free Pascal run time library. + + A file in Amiga system run time library. + Copyright (c) 1998-2003 by Nils Sjoholm + member of the Amiga RTL development team. + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +{ + History: + + Added functions and procedures with array of const. + For use with fpc 1.0.7. Thay are in systemvartags. + 11 Nov 2002. + + + 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 +} + + +unit utility; + +{$mode objfpc} + +INTERFACE +uses exec; + + +Type + pClockData = ^tClockData; + tClockData = record + sec : Word; + min : Word; + hour : Word; + mday : Word; + month : Word; + year : Word; + wday : Word; + END; + + pHook = ^tHook; + tHook = record + h_MinNode : tMinNode; + h_Entry : Pointer; { assembler entry point } + h_SubEntry : Pointer; { often HLL entry point } + h_Data : Pointer; { owner specific } + END; + +{ + * Hook calling conventions: + * A0 - pointer to hook data structure itself + * A1 - pointer to parameter structure ("message") typically + * beginning with a longword command code, which makes + * sense in the context in which the hook is being used. + * A2 - Hook specific address data ("object," e.g, GadgetInfo) + * + * Control will be passed to the routine h_Entry. For many + * High-Level Languages (HLL), this will be an assembly language + * stub which pushes registers on the stack, does other setup, + * and then calls the function at h_SubEntry. + * + * The C standard receiving code is: + * CDispatcher( hook, object, message ) + * struct Hook *hook; + * APTR object; + * APTR message; + * + * NOTE that register natural order differs from this convention + * for C parameter order, which is A0,A2,A1. + * + * The assembly language stub for "vanilla" C parameter conventions + * could be: + + _hookEntry: + move.l a1,-(sp) ; push message packet pointer + move.l a2,-(sp) ; push object pointer + move.l a0,-(sp) ; push hook pointer + move.l h_SubEntry(a0),a0 ; fetch C entry point ... + jsr (a0) ; ... and call it + lea 12(sp),sp ; fix stack + rts + + * with this function as your interface stub, you can write + * a Hook setup function as: + + SetupHook( hook, c_function, userdata ) + struct Hook *hook; + ULONG (*c_function)(); + VOID *userdata; + + ULONG (*hookEntry)(); + + hook->h_Entry = hookEntry; + hook->h_SubEntry = c_function; + hook->h_Data = userdata; + + + * with Lattice C pragmas, you can put the C function in the + * h_Entry field directly if you declare the function: + +ULONG __saveds __asm +CDispatcher( register __a0 struct Hook *hook, + register __a2 VOID *object, + register __a1 ULONG *message ); + * + ***} + + { Namespace definitions } + + +Type +{ The named object structure } + pNamedObject = ^tNamedObject; + tNamedObject = record + no_Object : Pointer; { Your pointer, for whatever you want } + END; + +const +{ Tags for AllocNamedObject() } + ANO_NameSpace = 4000; { Tag to define namespace } + ANO_UserSpace = 4001; { tag to define userspace } + ANO_Priority = 4002; { tag to define priority } + ANO_Flags = 4003; { tag to define flags } + +{ Flags for tag ANO_Flags } + NSB_NODUPS = 0; + NSB_CASE = 1; + + NSF_NODUPS = 1; { Default allow duplicates } + NSF_CASE = 2; { Default to caseless... } + + + { Control attributes for Pack/UnpackStructureTags() } + + +{ PackTable definition: + * + * The PackTable is a simple array of LONGWORDS that are evaluated by + * PackStructureTags() and UnpackStructureTags(). + * + * The table contains compressed information such as the tag offset from + * the base tag. The tag offset has a limited range so the base tag is + * defined in the first longword. + * + * After the first longword, the fields look as follows: + * + * +--------- 1 = signed, 0 = unsigned (for bits, 1=inverted boolean) + * | + * | +------ 00 = Pack/Unpack, 10 = Pack, 01 = Unpack, 11 = special + * | / \ + * | | | +-- 00 = Byte, 01 = Integer, 10 = Long, 11 = Bit + * | | | / \ + * | | | | | /----- For bit operations: 1 = TAG_EXISTS is TRUE + * | | | | | | + * | | | | | | /-------------------- Tag offset from base tag value + * | | | | | | | \ + * m n n o o p q q q q q q q q q q r r r s s s s s s s s s s s s s + * \ | | | + * Bit offset (for bit operations) ----/ | | + * \ | + * Offset into data structure -----------------------------------/ + * + * A -1 longword signifies that the next longword will be a new base tag + * + * A 0 longword signifies that it is the end of the pack table. + * + * What this implies is that there are only 13-bits of address offset + * and 10 bits for tag offsets from the base tag. For most uses this + * should be enough, but when this is not, either multiple pack tables + * or a pack table with extra base tags would be able to do the trick. + * The goal here was to make the tables small and yet flexible enough to + * handle most cases. + } + +const + PSTB_SIGNED =31; + PSTB_UNPACK =30; { Note that these are active low... } + PSTB_PACK =29; { Note that these are active low... } + PSTB_EXISTS =26; { Tag exists bit true flag hack... } + + PSTF_SIGNED = $80000000; + PSTF_UNPACK = $40000000; + PSTF_PACK = $20000000; + + PSTF_EXISTS = $4000000; + + +{***************************************************************************} + + + PKCTRL_PACKUNPACK = $00000000; + PKCTRL_PACKONLY = $40000000; + PKCTRL_UNPACKONLY = $20000000; + + PKCTRL_BYTE = $80000000; + PKCTRL_WORD = $88000000; + PKCTRL_LONG = $90000000; + + PKCTRL_UBYTE = $00000000; + PKCTRL_UWORD = $08000000; + PKCTRL_ULONG = $10000000; + + PKCTRL_BIT = $18000000; + PKCTRL_FLIPBIT = $98000000; + + +{***************************************************************************} + + +{ Macros used by the next batch of macros below. Normally, you don't use + * this batch directly. Then again, some folks are wierd + } + + + +{***************************************************************************} + + +{ Some handy dandy macros to easily create pack tables + * + * Use PACK_STARTTABLE() at the start of a pack table. You pass it the + * base tag value that will be handled in the following chunk of the pack + * table. + * + * PACK_ENDTABLE() is used to mark the end of a pack table. + * + * PACK_NEWOFFSET() lets you change the base tag value used for subsequent + * entries in the table + * + * PACK_ENTRY() lets you define an entry in the pack table. You pass it the + * base tag value, the tag of interest, the type of the structure to use, + * the field name in the structure to affect and control bits (combinations of + * the various PKCTRL_XXX bits) + * + * PACK_BYTEBIT() lets you define a bit-control entry in the pack table. You + * pass it the same data as PACK_ENTRY, plus the flag bit pattern this tag + * affects. This macro should be used when the field being affected is byte + * sized. + * + * PACK_WORDBIT() lets you define a bit-control entry in the pack table. You + * pass it the same data as PACK_ENTRY, plus the flag bit pattern this tag + * affects. This macro should be used when the field being affected is Integer + * sized. + * + * PACK_LONGBIT() lets you define a bit-control entry in the pack table. You + * pass it the same data as PACK_ENTRY, plus the flag bit pattern this tag + * affects. This macro should be used when the field being affected is longword + * sized. + * + * EXAMPLE: + * + * ULONG packTable[] = + * ( + * PACK_STARTTABLE(GA_Dummy), + * PACK_ENTRY(GA_Dummy,GA_Left,Gadget,LeftEdge,PKCTRL_WORD|PKCTRL_PACKUNPACK), + * PACK_ENTRY(GA_Dummy,GA_Top,Gadget,TopEdge,PKCTRL_WORD|PKCTRL_PACKUNPACK), + * PACK_ENTRY(GA_Dummy,GA_Width,Gadget,Width,PKCTRL_UWORD|PKCTRL_PACKUNPACK), + * PACK_ENTRY(GA_Dummy,GA_Height,Gadget,Height,PKCTRL_UWORD|PKCTRL_PACKUNPACK), + * PACK_WORDBIT(GA_Dummy,GA_RelVerify,Gadget,Activation,PKCTRL_BIT|PKCTRL_PACKUNPACK,GACT_RELVERIFY) + * PACK_ENDTABLE + * ); + } + + +{ ======================================================================= } +{ ==== TagItem ========================================================== } +{ ======================================================================= } +{ This data type may propagate through the system for more general use. + * In the meantime, it is used as a general mechanism of extensible data + * arrays for parameter specification and property inquiry (coming soon + * to a display controller near you). + * + * In practice, an array (or chain of arrays) of TagItems is used. + } +Type + Tag = LongWord; + pTag = ^Tag; + + pTagItem = ^tTagItem; + tTagItem = record + ti_Tag : Tag; + ti_Data : LongWord; + END; + + ppTagItem = ^pTagItem; + +{ ---- system tag values ----------------------------- } +CONST + TAG_DONE = 0; { terminates array of TagItems. ti_Data unused } + TAG_END = TAG_DONE; + TAG_IGNORE = 1; { ignore this item, not END of array } + TAG_MORE = 2; { ti_Data is pointer to another array of TagItems + * note that this tag terminates the current array + } + TAG_SKIP = 3; { skip this AND the next ti_Data items } + +{ differentiates user tags from control tags } + TAG_USER = $80000000; { differentiates user tags from system tags} + +{* If the TAG_USER bit is set in a tag number, it tells utility.library that + * the tag is not a control tag (like TAG_DONE, TAG_IGNORE, TAG_MORE) and is + * instead an application tag. "USER" means a client of utility.library in + * general, including system code like Intuition or ASL, it has nothing to do + * with user code. + *} + + +{ Tag filter logic specifiers for use with FilterTagItems() } + TAGFILTER_AND = 0; { exclude everything but filter hits } + TAGFILTER_NOT = 1; { exclude only filter hits } + +{ Mapping types for use with MapTags() } + MAP_REMOVE_NOT_FOUND = 0; { remove tags that aren't in mapList } + MAP_KEEP_NOT_FOUND = 1; { keep tags that aren't in mapList } + + + +Type + pUtilityBase = ^tUtilityBase; + tUtilityBase = record + ub_LibNode : tLibrary; + ub_Language : Byte; + ub_Reserved : Byte; + END; + +function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean; +function AllocateTagItems(num : ULONG) : 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 CallHookPktA(h : pHook;obj, paramPkt : APTR) : ULONG; +function CallHookPkt(h : pHook;obj : Pointer; const tags : Array Of Const) : LongWord; +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;const TagList : pTagItem) : ULONG; +function GetUniqueID : ULONG; +procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG); +function NamedObjectName(Obj : pNamedObject) : STRPTR; +function NextTagItem(Item : ppTagItem) : 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); +function SDivMod32( dividend , divisor : LongInt) : LongInt; +function SMult32(Arg1, Arg2 : LongInt) : LongInt; +function SMult64(Arg1, Arg2 : LongInt) : LongInt; +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(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG; + + +IMPLEMENTATION + +uses + tagsarray,longarray; + +function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean; +type + TLocalCall = function(nameSpace,obj : pNamedObject; LibBase: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 37)); + AddNamedObject := Call(nameSpace,obj, AOS_UtilityBase); +end; + +function AllocateTagItems(num : ULONG) : pTagItem; +type + TLocalCall = function(num : ULONG; LibBase: Pointer): pTagItem; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 11)); + AllocateTagItems := Call(num, AOS_UtilityBase); +end; + +function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject; +type + TLocalCall = function(const name : STRPTR;const TagList : pTagItem; LibBase: Pointer): pNamedObject; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 38)); + AllocNamedObjectA := Call(name, TagList, AOS_UtilityBase); +end; + +procedure Amiga2Date(amigatime : ULONG;resultat : pClockData); +type + TLocalCall = procedure(amigatime : ULONG;resultat : pClockData; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 20)); + Call(amigatime, resultat, AOS_UtilityBase); +end; + +procedure ApplyTagChanges(TagList : pTagItem;const ChangeList : pTagItem); +type + TLocalCall = procedure(TagList : pTagItem;const ChangeList : pTagItem; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 31)); + Call(TagList, ChangeList, AOS_UtilityBase); +end; + +function AttemptRemNamedObject(obj : pNamedObject) : LongInt; +type + TLocalCall = function(obj : pNamedObject; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 39)); + AttemptRemNamedObject := Call(obj, AOS_UtilityBase); +end; + +function CallHookPktA(h : pHook;obj, paramPkt : APTR) : ULONG; +type + TLocalCall = function(h : pHook;obj, paramPkt : APTR; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 17)); + CallHookPktA := Call(h, obj, paramPkt, AOS_UtilityBase); +end; + +function CallHookPkt(h : pHook;obj : Pointer; const tags : Array Of Const) : LongWord; +begin + CallHookPkt := CallHookPktA(h, obj , readinlongs(tags)); +end; + +function CheckDate(const date : pClockData) : ULONG; +type + TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 22)); + CheckDate := Call(date, AOS_UtilityBase); +end; + +function CloneTagItems(const tagList : pTagItem) : pTagItem; +type + TLocalCall = function(const tagList : pTagItem; LibBase: Pointer): pTagItem; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 12)); + CloneTagItems := Call(tagList, AOS_UtilityBase); +end; + +function Date2Amiga(const date : pClockData) : ULONG; +type + TLocalCall = function(const date : pClockData; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 21)); + Date2Amiga := Call(date, AOS_UtilityBase); +end; + +procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG); +type + TLocalCall = procedure(changelist, oldvalues : pTagItem;apply : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 9)); + Call(changelist, oldvalues, apply, AOS_UtilityBase); +end; + +function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG; +type + TLocalCall = function(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 16)); + FilterTagItems := Call(taglist, tagArray, logic, AOS_UtilityBase); +end; + +function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject; +type + TLocalCall = function(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject; LibBase: Pointer): pNamedObject; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 40)); + FindNamedObject := Call(nameSpace, name, lastobject, AOS_UtilityBase); +end; + +function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem; +type + TLocalCall = function(TagVal : Tag;const TagList : pTagItem; LibBase: Pointer): pTagItem; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 5)); + FindTagItem := Call(TagVal, TagList, AOS_UtilityBase); +end; + +procedure FreeNamedObject(Obj : pNamedObject); +type + TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 41)); + Call(Obj, AOS_UtilityBase); +end; + +procedure FreeTagItems(TagList : pTagItem); +type + TLocalCall = procedure(TagList : pTagItem; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 13)); + Call(TagList, AOS_UtilityBase); +end; + +function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG; +type + TLocalCall = function(tagval : Tag;default : ULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 6)); + GetTagData := Call(tagval, default, TagList, AOS_UtilityBase); +end; + +function GetUniqueID : ULONG; +type + TLocalCall = function(LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 45)); + GetUniqueID := Call(AOS_UtilityBase); +end; + +procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG); +type + TLocalCall = procedure(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 10)); + Call(TagList, maplist, IncludeMiss, AOS_UtilityBase); +end; + +function NamedObjectName(Obj : pNamedObject) : STRPTR; +type + TLocalCall = function(Obj : pNamedObject; LibBase: Pointer): STRPTR; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 42)); + NamedObjectName := Call(Obj, AOS_UtilityBase); +end; + +function NextTagItem(Item : ppTagItem) : pTagItem; +type + TLocalCall = function(Item : ppTagItem; LibBase: Pointer): pTagItem; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 8)); + NextTagItem := Call(Item, AOS_UtilityBase); +end; + +function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG; +type + TLocalCall = function(InitialFlags : ULONG;const TagList, boolmap : pTagItem; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 7)); + PackBoolTags := Call(InitialFlags, TagList, boolmap, AOS_UtilityBase); +end; + +function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG; +type + TLocalCall = function(packk: APTR;const packTable : pULONG;const TagList : pTagItem; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 35)); + PackStructureTags := Call(packk, packTable, TagList, AOS_UtilityBase); +end; + +procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem); +type + TLocalCall = procedure(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 14)); + Call(cloneTagItem, OriginalTagItems, AOS_UtilityBase); +end; + +procedure ReleaseNamedObject(Obj : pNamedObject); +type + TLocalCall = procedure(Obj : pNamedObject; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 43)); + Call(Obj, AOS_UtilityBase); +end; + +procedure RemNamedObject(Obj : pNamedObject;Msg : pointer); +type + TLocalCall = procedure(Obj : pNamedObject;Msg : pointer; LibBase: Pointer); cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 44)); + Call(Obj, Msg, AOS_UtilityBase); +end; + +function SDivMod32(dividend , divisor : LongInt) : LongInt; +type + TLocalCall = function(dividend , divisor : LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 25)); + SDivMod32 := Call(dividend , divisor, AOS_UtilityBase); +end; + +function SMult32(Arg1, Arg2 : LongInt) : LongInt; +type + TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 23)); + SMult32 := Call(Arg1, Arg2, AOS_UtilityBase); +end; + +function SMult64(Arg1, Arg2 : LongInt) : LongInt; +type + TLocalCall = function(Arg1, Arg2 : LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 33)); + SMult64 := Call(Arg1, Arg2, AOS_UtilityBase); +end; + +function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt; +type + TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 27)); + Stricmp := Call(Str1, Str2, AOS_UtilityBase); +end; + +function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt; +type + TLocalCall = function(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt; LibBase: Pointer): LongInt; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 28)); + Strnicmp := Call(Str1, Str2, len, AOS_UtilityBase); +end; + +function TagInArray(t : Tag;const TagArray : pULONG) : Boolean; +type + TLocalCall = function(t : Tag;const TagArray : pULONG; LibBase: Pointer): Boolean; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 15)); + TagInArray := Call(t, TagArray, AOS_UtilityBase); +end; + +function ToLower(c : ULONG) : Char; +type + TLocalCall = function(c : ULONG; LibBase: Pointer): Char; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 30)); + ToLower := Call(c, AOS_UtilityBase); +end; + +function ToUpper(c : ULONG) : Char; +type + TLocalCall = function(c : ULONG; LibBase: Pointer): Char; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 29)); + ToUpper := Call(c, AOS_UtilityBase); +end; + +function UDivMod32(dividend , divisor : ULONG) : ULONG; +type + TLocalCall = function(dividend , divisor : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 26)); + UDivMod32 := Call(dividend , divisor, AOS_UtilityBase); +end; + +function UMult32(Arg1, Arg2 : ULONG) : ULONG; +type + TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 24)); + UMult32 := Call(Arg1, Arg2, AOS_UtilityBase); +end; + +function UMult64(Arg1, Arg2 : ULONG) : ULONG; +type + TLocalCall = function(Arg1, Arg2 : ULONG; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 34)); + UMult64 := Call(Arg1, Arg2, AOS_UtilityBase); +end; + +function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG; +type + TLocalCall = function(const pac: APTR;const packTable: pULONG;TagList : pTagItem; LibBase: Pointer): ULONG; cdecl; +var + Call: TLocalCall; +begin + Call := TLocalCall(GetLibAdress(AOS_UtilityBase, 36)); + UnpackStructureTags := Call(pac, packTable, TagList, AOS_UtilityBase); +end; + +end. diff --git a/rtl/aros/video.pp b/rtl/aros/video.pp new file mode 100644 index 0000000000..a16fcd71c9 --- /dev/null +++ b/rtl/aros/video.pp @@ -0,0 +1,656 @@ +{ + This file is part of the Free Pascal run time library. + Copyright (c) 2006 by Karoly Balogh + member of the Free Pascal development team + + Video unit for Amiga and MorphOS + + See the file COPYING.FPC, included in this distribution, + for details about the copyright. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + **********************************************************************} + +unit Video; + +{.$define VIDEODEBUG} +{.$define WITHBUFFERING} + + +{ + Date: 2013-01-09 + What: Adjusted FPC video unit for AROS (/AmigaOS?) + + goal: + --------------------------------------------------------------------------- + Attempt to add user-on-demand support for AROS Fullscreen to the FPC video + unit. + + DISCLAIMER: + Experimental code only meant as PoC. + + DON'T USE FOR PUBLICATION UNLESS ALL PERSONAL COMMENTS AND REFERENCES ARE + REMOVED AND THE ACTUAL CODE IS APPROVED BY SOMEONE THAT KNOWS WHAT HE/SHE + IS DOING. + THIS CODE IS PROOF OF CONCEPT ONLY AND AS SUCH DOES NOT PROVIDE 100% + RELIABLE CODE AND/OR APPROVED PROGRAMMING TECHNIQUES. + + Idea: + The idea of running a video-unit screen on its own graphical screen + emerged from ALB42's port of the dos-based fp-editor that is distributed + with freepascal. In it's original form the editor would be run from dos + and would present itself in a full-screen modus fashion. + + This behaviour changed slightly with the ending of the dos era, and + instead a commando window started to appear in regular OS'. + + But even when this changed, Windows users were still able to view this + command window in full-screen by means of pressing ctrl-enter. + + Since this behaviour is not present on current next gen amigaOS systems, + we have to live without that. + + And so begun the idea of letting the video-unit somehow be influenced + in such a way that an Freevision application that uses the videounit + could be shown in fullscreen. + + In order to accomplish this task we missuse the color tag of TVideomode. + When the color is set to monochrome it will show the + dos-screen on a full graphics screen and the dos-output will be shown + in a borderless backdrop window. That way it appears that the vision + application is running full-screen. + + The current implementation has a limitation that cannot be solved. + + Namely, the vision screens are based on a ascii character screen, so + the final measurements of the full-screen-window will depend + on the amount of pixels that maximally can be displayed by means of + those same character-sizes. + Since the used font is currently 8 pixels width and 16 pixels high, + it becomes clear that not every screen-resolution is suitable to + exactly fit both dimensions pixelwise. As a result a small + stripe (of default backgroundcolor) on the bottom or right may appear. + + HAVE FUN ! + + MaGoRiuM +} + + +interface + +uses + amigados, intuition, tagsarray, utility, sysutils; + +{$i videoh.inc} + + +{ Amiga specific calls, to help interaction between Keyboard, Mouse and + Video units, and Free Vision } +procedure GotCloseWindow; +function HasCloseWindow: boolean; +procedure GotResizeWindow; +function HasResizeWindow(var winw:longint; var winh: longint): boolean; + + + +var + VideoWindow: PWindow; + +implementation + +uses + exec, agraphics; + +{$i video.inc} + +{$i videodata.inc} + +const + VIDEOSCREENNAME = 'FPC Video Screen Output'; + +var + OS_Screen : PScreen = nil; // To hold our screen, when necessary + FPC_VIDEO_FULLSCREEN : Boolean = False; // Global that defines when we need to attempt opening on own scren + +var + VideoColorMap : PColorMap; + VideoPens : array[0..15] of LongInt; + + OldCursorX, + OldCursorY : LongInt; + CursorType : Word; + OldCursorType : Word; + + {$ifdef WITHBUFFERING} + BitmapWidth, BitmapHeight: Integer; + BufRp: PRastPort; + {$endif} + + GotCloseWindowMsg : Boolean; + GotResizeWindowMsg : Boolean; + LastL, LastT: Integer; + LastW, LastH: Integer; + WindowForReqSave: PWindow; + Process: PProcess; +(* + GetScreen: pScreen; + + Tries to open a custom screen, which attempt to clone the workbench, + and returns the pointer to the screen. Result can be nil when failed + otherwise the screen got opened correctly. +*) +Function GetScreen: pScreen; +var + ScreenTags: TTagsList; + Tags: PTagItem; +begin + AddTags(ScreenTags,[ + SA_Title , VIDEOSCREENNAME, + SA_Left , 0, + SA_Top , 0, + SA_ShowTitle , 0, // Do not show the screen's TitleBar + SA_Type , 1 shl 1, // pubscreen + SA_PubName , VIDEOSCREENNAME, + SA_Quiet , True, + SA_LikeWorkbench , 1 // Let OS + ]); + Tags := GetTagPtr(ScreenTags); + GetScreen := OpenScreenTagList(nil, Tags); + {$ifdef VIDEODEBUG} + if (GetScreen <> nil) then + Writeln('DEBUG: Opened a new screen') + else + Writeln('ERROR: Failed to open new screen'); + {$endif} +end; + +(* + GetWindow: pWindow; + + Tries to create and open a window. Returns the pointer to + the window or nil in case of failure. + + The routine keeps the global FPC_FULL_SCREEM option into + account and act accordingly. + + In windowed mode it returns a window with another kind of + settings then when it has to reside on it's own customscreen. +*) +Function GetWindow: PWindow; +Var + WindowTags: TTagsList; + Tags: PTagItem; +begin + if FPC_VIDEO_FULLSCREEN then + begin + OS_Screen := GetScreen; + If OS_Screen = nil then + Exit; + + {$ifdef VIDEODEBUG} + WriteLn('DEBUG: Opened customscreen succesfully'); + {$endif} + Addtags(WindowTags, [ + WA_CustomScreen, OS_Screen, + WA_Left , 0, + WA_Top , 0, + WA_InnerWidth , (OS_Screen^.Width div 8) * 8, + WA_InnerHeight, (OS_Screen^.Height div 16) * 16, + WA_AutoAdjust , 1, + WA_Activate , 1, + WA_Borderless , 1, + WA_BackDrop , 1, + WA_FLAGS , (WFLG_GIMMEZEROZERO or WFLG_REPORTMOUSE or WFLG_RMBTRAP or + WFLG_SMART_REFRESH or WFLG_NOCAREREFRESH), + WA_IDCMP , (IDCMP_RAWKEY or + IDCMP_MOUSEMOVE or IDCMP_MOUSEBUTTONS or + IDCMP_CHANGEWINDOW or IDCMP_CLOSEWINDOW) + ]); + end else + begin // Windowed Mode + AddTags(WindowTags, [ + WA_Left , LastL, + WA_Top , LastT, + WA_InnerWidth , LastW*8, + WA_InnerHeight, LastH*16, + WA_MaxWidth , 32768, + WA_MaxHeight , 32768, + WA_Title , PChar('FPC Video Window Output'), + WA_Activate , 1, + WA_FLAGS , (WFLG_GIMMEZEROZERO or WFLG_REPORTMOUSE or + WFLG_SMART_REFRESH or WFLG_NOCAREREFRESH or + WFLG_DRAGBAR or WFLG_DEPTHGADGET or WFLG_SIZEGADGET or + WFLG_SIZEBBOTTOM or WFLG_RMBTRAP or WFLG_CLOSEGADGET), + WA_IDCMP , (IDCMP_RAWKEY or + IDCMP_MOUSEMOVE or IDCMP_MOUSEBUTTONS or + IDCMP_CHANGEWINDOW or IDCMP_CLOSEWINDOW)//, + ]); + end; + + Tags := GetTagPtr(WindowTags); + GetWindow := OpenWindowTagList(nil, Tags); + + Process := PProcess(FindTask(nil)); + WindowForReqSave := Process^.pr_WindowPtr; + Process^.pr_WindowPtr := GetWindow; + + {$ifdef VIDEODEBUG} + If GetWindow <> nil then + WriteLn('DEBUG: Sucessfully opened videounit Window') + else + WriteLn('ERROR: Failed to open videounit Window'); + {$endif} +end; + + +// ========================================================================== +// == +// == Original source code continues, with minor adjustments +// == +// ========================================================================== + + +procedure SysInitVideo; +var + Counter: LongInt; +begin + {$ifdef VIDEODEBUG} + WriteLn('FULLSCREEN VIDEO UNIT MODIFICATION v2'); + if FPC_VIDEO_FULLSCREEN then + WriteLn('DEBUG: Recognized fullscreen mode') + else + WriteLn('DEBUG: Recognized windowed mode'); + {$endif} + + // fill videobuf and oldvideobuf with different bytes, to allow proper first draw + FillDword(VideoBuf^, VideoBufSize div 4, $1234D3AD); + FillDword(OldVideoBuf^, VideoBufSize div 4, $4321BEEF); + + VideoWindow := GetWindow; + + // nice hardcode values are probably going to screw up things + // so wee neeed a way to detrmined how many chars could be on + // the screen in both directions. And a bit accurate. + if FPC_VIDEO_FULLSCREEN then + begin + // just to make sure that we are going to use the window width + // and height instead of the one from the screen. + // This is to circumvent that the window (or virtual window from + // vision based on characters pixels * characters in both + // dimensions) is actually smaller then the window it resides on. + // + // Can happen for instance when the window does not hide it's + // borders or title as intended. + ScreenWidth := VideoWindow^.GZZWidth div 8; + ScreenHeight := VideoWindow^.GZZHeight div 16; + ScreenColor := False; + + {$ifdef VIDEODEBUG} + Writeln('DEBUG: Fullscreen - windowed - Width * Heigth = ',ScreenWidth,' * ',ScreenHeight); + {$endif} + end else + begin + ScreenWidth := LastW; + ScreenHeight := LastH; + ScreenColor := True; + end; + {$ifdef WITHBUFFERING} + BufRp^.Bitmap := AllocBitmap(VideoWindow^.GZZWidth, VideoWindow^.GZZHeight, VideoWindow^.RPort^.Bitmap^.Depth, BMF_CLEAR, VideoWindow^.RPort^.Bitmap); + BitmapWidth := VideoWindow^.GZZWidth; + BitmapHeight := VideoWindow^.GZZHeight; + {$endif} + { viewpostcolormap info } + videoColorMap := pScreen(videoWindow^.WScreen)^.ViewPort.ColorMap; + + for Counter := 0 to 15 do + begin + VideoPens[Counter] := ObtainPen(VideoColorMap, LongWord(-1), + vgacolors[counter, 0] shl 24, vgacolors[counter, 1] shl 24, vgacolors[counter, 2] shl 24, + PEN_EXCLUSIVE); + {$ifdef VIDEODEBUG} + If VideoPens[Counter] = -1 then + WriteLn('errr color[',Counter,'] = ', VideoPens[Counter]) + else + WriteLn('good color[',Counter,'] = ', VideoPens[Counter]); + {$endif} + end; + + CursorX := 0; + CursorY := 0; + OldCursorX := 0; + OldCursorY := 0; + CursorType := crHidden; + OldCursorType := crHidden; + + GotCloseWindowMsg := false; + GotResizeWindowMsg := false; +end; + +procedure SysDoneVideo; +var + Counter: LongInt; +begin + if VideoWindow <> nil then + begin + Process^.pr_WindowPtr := WindowForReqSave; + if not FPC_VIDEO_FULLSCREEN then + begin + LastL := VideoWindow^.LeftEdge; + LastT := VideoWindow^.TopEdge; + end; + CloseWindow(videoWindow); + end; + {$ifdef WITHBUFFERING} + FreeBitmap(BufRp^.Bitmap); + BufRp^.Bitmap := nil; + {$endif} + VideoWindow := nil; + for Counter := 0 to 15 do + ReleasePen(VideoColorMap, VideoPens[Counter]); + if ((FPC_VIDEO_FULLSCREEN) and (OS_Screen <> nil)) then + begin + CloseScreen(OS_Screen); + end; +end; + +function SysSetVideoMode(const Mode: TVideoMode): Boolean; +var + dx: integer; + dy: integer; +begin + if ScreenColor <> Mode.Color then + begin + SysDoneVideo; + FPC_VIDEO_FULLSCREEN := not Mode.color; + if not FPC_VIDEO_FULLSCREEN then + begin + LastT := 50; + LastL := 50; + LastW := 80; + LastH := 25; + end; + SysInitVideo; + end else + if not FPC_VIDEO_FULLSCREEN then + begin + dx := (Mode.col * 8) - VideoWindow^.GZZWidth; + dy := (Mode.row * 16) - VideoWindow^.GZZHeight; + SizeWindow(videoWindow, dx, dy); + end; + ScreenWidth := Mode.col; + ScreenHeight := Mode.row; + LastW := Mode.Col; + LastH := Mode.Row; + ScreenColor := Mode.color; + SysSetVideoMode := True; +end; + +var + OldSH, OldSW : longint; + +procedure SysClearScreen; +begin + oldSH := -1; + oldSW := -1; + UpdateScreen(True); +end; + +procedure DrawChar(rp: PRastPort; x, y: LongInt; crType: Word); +var + TmpCharData: Word; + TmpChar: Byte; + TmpFGColor: Byte; + TmpBGColor: Byte; + sX, sY: LongInt; +begin + TmpCharData := VideoBuf^[y * ScreenWidth + x]; + TmpChar := TmpCharData and $0ff; + TmpFGColor := (TmpCharData shr 8) and %00001111; + TmpBGColor := (TmpCharData shr 12) and %00000111; + + sX := x * 8; + sY := y * 16; + + if crType <> crBlock then + begin + SetABPenDrMd(rp, VideoPens[TmpFGColor], VideoPens[tmpBGColor], JAM2); + end else + begin + { in case of block cursor, swap fg/bg colors + and BltTemplate() below will take care of everything } + SetABPenDrMd(rp, VideoPens[tmpBGColor], VideoPens[tmpFGColor], JAM2); + end; + + BltTemplate(@Vgafont[tmpChar, 0], 0, 1, rp, sX, sY, 8, 16); + + if crType = crUnderLine then + begin + { draw two lines at the bottom of the char, in case of underline cursor } + agraphics.Move(rp, sX, sY + 14); Draw(rp, sX + 7, sY + 14); + agraphics.Move(rp, sX, sY + 15); Draw(rp, sX + 7, sY + 15); + end; +end; + +procedure SysUpdateScreen(Force: Boolean); +var + BufCounter: Longint; + SmallForce: Boolean; + Counter, CounterX, CounterY: LongInt; + //BufRp: PRastPort; + t: Double; + NumChanged: Integer; +begin + SmallForce := False; + + // override forced update when screen dimensions haven't changed + if Force then + begin + if (OldSH = ScreenHeight) and (OldSW = ScreenWidth) then + Force:=false + else + begin + OldSH := ScreenHeight; + OldSW := ScreenWidth; + end; + end; + + if Force then + begin + SmallForce:=true; + end else + begin + Counter:=0; + while not smallforce and (Counter < (VideoBufSize div 4) - 1) do + begin + SmallForce := (PDWord(VideoBuf)[Counter] <> PDWord(OldVideoBuf)[Counter]); + inc(Counter); + end; + end; + + {$ifdef WITHBUFFERING} + if (VideoWindow^.GZZWidth > BitmapWidth) or (VideoWindow^.GZZHeight > BitmapHeight) then + begin + FreeBitmap(BufRp^.Bitmap); + BufRp^.Bitmap := AllocBitmap(VideoWindow^.GZZWidth, VideoWindow^.GZZHeight, VideoWindow^.RPort^.Bitmap^.Depth, BMF_CLEAR, VideoWindow^.RPort^.Bitmap); + BitmapWidth := VideoWindow^.GZZWidth; + BitmapHeight := VideoWindow^.GZZHeight; + Force := True; + Smallforce := True; + end; + {$endif} + + BufCounter:=0; + NumChanged:=0; + if Smallforce then + begin + //t := now(); + for CounterY := 0 to ScreenHeight - 1 do + begin + for CounterX := 0 to ScreenWidth - 1 do + begin + if (VideoBuf^[BufCounter] <> OldVideoBuf^[BufCounter]) or Force then + begin + {$ifdef WITHBUFFERING} + DrawChar(BufRp, CounterX, CounterY, crHidden); + {$else} + DrawChar(VideoWindow^.RPort, CounterX, CounterY, crHidden); + {$endif} + OldVideoBuf^[BufCounter] := VideoBuf^[BufCounter]; + Inc(NumChanged); + end; + Inc(BufCounter); + end; + end; + //if NumChanged > 100 then + // writeln('redraw time: ', floattoStrF((Now-t)* 24 * 60 * 60 * 1000000 / NumChanged, fffixed, 8,3), ' us/char' ); // ms + end; + + if (CursorType <> OldCursorType) or + (CursorX <> OldCursorX) or (CursorY <> OldCursorY) or + SmallForce then + begin + {$ifdef WITHBUFFERING} + DrawChar(BufRp, OldCursorY, OldCursorX, crHidden); + DrawChar(BufRp, CursorY, CursorX, CursorType); + {$else} + DrawChar(VideoWindow^.RPort, OldCursorY, OldCursorX, crHidden); + DrawChar(VideoWindow^.RPort, CursorY, CursorX, CursorType); + {$endif} + OldCursorX := CursorX; + OldCursorY := CursorY; + OldcursorType := CursorType; + end; + {$ifdef WITHBUFFERING} + BltBitMapRastPort(BufRp^.Bitmap, 0, 0, VideoWindow^.RPort, 0, 0, ScreenWidth * 8, ScreenHeight * 16, $00C0); + {$endif} +end; + + +procedure SysSetCursorPos(NewCursorX, NewCursorY: Word); +begin + CursorX := NewCursorY; + CursorY := NewCursorX; + SysUpdateScreen(False); +end; + +function SysGetCapabilities: Word; +begin + SysGetCapabilities := cpColor or cpChangeCursor; +end; + +function SysGetCursorType: Word; +begin + SysGetCursorType := cursorType; +end; + + +procedure SysSetCursorType(NewType: Word); +begin + cursorType := newType; + { FIXME: halfBlock cursors are not supported for now + by the rendering code } + if CursorType = crHalfBlock then + cursorType := crBlock; + + SysUpdateScreen(False); +end; + + +// Amiga specific calls +procedure GotCloseWindow; +begin + GotCloseWindowMsg := True; +end; + +function HasCloseWindow: Boolean; +begin + HasCloseWindow := GotCloseWindowMsg; + GotCloseWindowMsg := False; +end; + +procedure GotResizeWindow; +begin + GotResizeWindowMsg := True; +end; + +function HasResizeWindow(var WinW: LongInt; var WinH: LongInt): Boolean; +begin + WinW := 0; + WinH := 0; + HasResizeWindow := GotResizeWindowMsg; + if Assigned(VideoWindow) then + begin + //writeln('resize'); + WinW := VideoWindow^.GZZWidth div 8; + WinH := VideoWindow^.GZZHeight div 16; + LastW := WinW; + LastH := WinH; + end; + GotResizeWindowMsg := False; +end; + +function SysGetVideoModeCount: Word; +begin + SysGetVideoModeCount := 2; +end; + +function SysGetVideoModeData(Index: Word; var Mode: TVideoMode): Boolean; +var + Screen: PScreen; +begin + case Index of + 0: begin + Mode.Col := 80; + Mode.Row := 25; + Mode.Color := True; + end; + 1: begin + Screen := LockPubScreen('Workbench'); + Mode.Col := Screen^.Width div 8; + Mode.Row := Screen^.Height div 16; + UnlockPubScreen('Workbench', Screen); + Mode.Color := False; + end; + end; + SysGetVideoModeData := True; +end; + + +const + SysVideoDriver : TVideoDriver = ( + InitDriver : @SysInitVideo; + DoneDriver : @SysDoneVideo; + UpdateScreen : @SysUpdateScreen; + ClearScreen : @SysClearScreen; + SetVideoMode : @SysSetVideoMode; + GetVideoModeCount : @SysGetVideoModeCount; + GetVideoModeData : @SysGetVideoModeData; + SetCursorPos : @SysSetCursorPos; + GetCursorType : @SysGetCursorType; + SetCursorType : @SysSetCursorType; + GetCapabilities : @SysGetCapabilities + ); + + +initialization + SetVideoDriver(SysVideoDriver); + LastT := 50; + LastL := 50; + LastW := 80; + LastH := 25; + {$ifdef WITHBUFFERING} + BufRp := CreateRastPort; + BufRp^.Layer := nil; + BufRp^.Bitmap := nil; + {$endif} +finalization + {$ifdef WITHBUFFERING} + if Assigned(BufRp^.Bitmap) then + FreeBitmap(BufRp^.Bitmap); + FreeRastPort(BufRp); + {$endif} +end. diff --git a/rtl/aros/videodata.inc b/rtl/aros/videodata.inc new file mode 100644 index 0000000000..359585d63f --- /dev/null +++ b/rtl/aros/videodata.inc @@ -0,0 +1,281 @@ + +const + vgacolors : array[0..15,0..2] of byte = ( + ( 0, 0, 0 ), // black + ( 0, 0, 153 ), // blue + ( 0, 153, 0 ), // green + ( 0, 153, 153 ), // cyan + ( 153, 0, 0 ), // red + ( 153, 0, 153 ), // magenta + ( 153, 102, 0 ), // brown + ( 153, 153, 153 ), // lightgray + + ( 102, 102, 102 ), // darkgray + ( 102, 102, 255 ), // lightblue + ( 102, 255, 102 ), // lightgreen + ( 102, 255, 255 ), // lightcyan + ( 255, 102, 102 ), // lightred + ( 255, 102, 255 ), // lightmagenta + ( 255, 255, 102 ), // yellow + ( 255, 255, 255 ) // white + ); + +const + vgafont : array[0..255,0..15] of byte = ( + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $7E, $81, $A5, $81, $81, $A5, $99, $81, $81, $7E, $00, $00, $00, $00 ), + ( $00, $00, $7E, $FF, $DB, $FF, $FF, $DB, $E7, $FF, $FF, $7E, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $6C, $FE, $FE, $FE, $FE, $7C, $38, $10, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $10, $38, $7C, $FE, $7C, $38, $10, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $18, $3C, $3C, $E7, $E7, $E7, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $18, $3C, $7E, $FF, $FF, $7E, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $18, $3C, $3C, $18, $00, $00, $00, $00, $00, $00 ), + ( $FF, $FF, $FF, $FF, $FF, $FF, $E7, $C3, $C3, $E7, $FF, $FF, $FF, $FF, $FF, $FF ), + ( $00, $00, $00, $00, $00, $3C, $66, $42, $42, $66, $3C, $00, $00, $00, $00, $00 ), + ( $FF, $FF, $FF, $FF, $FF, $C3, $99, $BD, $BD, $99, $C3, $FF, $FF, $FF, $FF, $FF ), + ( $00, $00, $1E, $06, $0E, $1A, $78, $CC, $CC, $CC, $CC, $78, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $66, $66, $66, $3C, $18, $7E, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $3F, $33, $3F, $30, $30, $30, $30, $70, $F0, $E0, $00, $00, $00, $00 ), + ( $00, $00, $7F, $63, $7F, $63, $63, $63, $63, $67, $E7, $E6, $C0, $00, $00, $00 ), + ( $00, $00, $00, $18, $18, $DB, $3C, $E7, $3C, $DB, $18, $18, $00, $00, $00, $00 ), + ( $00, $80, $C0, $E0, $F0, $F8, $FE, $F8, $F0, $E0, $C0, $80, $00, $00, $00, $00 ), + ( $00, $02, $06, $0E, $1E, $3E, $FE, $3E, $1E, $0E, $06, $02, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $7E, $18, $18, $18, $7E, $3C, $18, $00, $00, $00, $00, $00 ), + ( $00, $00, $66, $66, $66, $66, $66, $66, $66, $00, $66, $66, $00, $00, $00, $00 ), + ( $00, $00, $7F, $DB, $DB, $DB, $7B, $1B, $1B, $1B, $1B, $1B, $00, $00, $00, $00 ), + ( $00, $7C, $C6, $60, $38, $6C, $C6, $C6, $6C, $38, $0C, $C6, $7C, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $FE, $FE, $FE, $FE, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $7E, $18, $18, $18, $7E, $3C, $18, $7E, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $7E, $18, $18, $18, $18, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $18, $18, $18, $18, $18, $18, $18, $7E, $3C, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $18, $0C, $FE, $0C, $18, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $30, $60, $FE, $60, $30, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $C0, $C0, $C0, $FE, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $28, $6C, $FE, $6C, $28, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $10, $38, $38, $7C, $7C, $FE, $FE, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $FE, $FE, $7C, $7C, $38, $38, $10, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $18, $3C, $3C, $3C, $18, $18, $18, $00, $18, $18, $00, $00, $00, $00 ), + ( $00, $66, $66, $66, $24, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $6C, $6C, $FE, $6C, $6C, $6C, $FE, $6C, $6C, $00, $00, $00, $00 ), + ( $18, $18, $7C, $C6, $C2, $C0, $7C, $06, $06, $86, $C6, $7C, $18, $18, $00, $00 ), + ( $00, $00, $00, $00, $C2, $C6, $0C, $18, $30, $60, $C6, $86, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $6C, $38, $76, $DC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $30, $30, $30, $60, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $0C, $18, $30, $30, $30, $30, $30, $30, $18, $0C, $00, $00, $00, $00 ), + ( $00, $00, $30, $18, $0C, $0C, $0C, $0C, $0C, $0C, $18, $30, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $66, $3C, $FF, $3C, $66, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $18, $18, $7E, $18, $18, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $18, $18, $18, $30, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $FE, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $02, $06, $0C, $18, $30, $60, $C0, $80, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $C6, $C6, $D6, $D6, $C6, $C6, $6C, $38, $00, $00, $00, $00 ), + ( $00, $00, $18, $38, $78, $18, $18, $18, $18, $18, $18, $7E, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $06, $0C, $18, $30, $60, $C0, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $06, $06, $3C, $06, $06, $06, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $0C, $1C, $3C, $6C, $CC, $FE, $0C, $0C, $0C, $1E, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C0, $C0, $C0, $FC, $06, $06, $06, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $38, $60, $C0, $C0, $FC, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C6, $06, $06, $0C, $18, $30, $30, $30, $30, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $7C, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $7E, $06, $06, $06, $0C, $78, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $00, $00, $00, $18, $18, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $00, $00, $00, $18, $18, $30, $00, $00, $00, $00 ), + ( $00, $00, $00, $06, $0C, $18, $30, $60, $30, $18, $0C, $06, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7E, $00, $00, $7E, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $60, $30, $18, $0C, $06, $0C, $18, $30, $60, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $0C, $18, $18, $18, $00, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $7C, $C6, $C6, $DE, $DE, $DE, $DC, $C0, $7C, $00, $00, $00, $00 ), + ( $00, $00, $10, $38, $6C, $C6, $C6, $FE, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $FC, $66, $66, $66, $7C, $66, $66, $66, $66, $FC, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $C2, $C0, $C0, $C0, $C0, $C2, $66, $3C, $00, $00, $00, $00 ), + ( $00, $00, $F8, $6C, $66, $66, $66, $66, $66, $66, $6C, $F8, $00, $00, $00, $00 ), + ( $00, $00, $FE, $66, $62, $68, $78, $68, $60, $62, $66, $FE, $00, $00, $00, $00 ), + ( $00, $00, $FE, $66, $62, $68, $78, $68, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $C2, $C0, $C0, $DE, $C6, $C6, $66, $3A, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $FE, $C6, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $3C, $18, $18, $18, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $1E, $0C, $0C, $0C, $0C, $0C, $CC, $CC, $CC, $78, $00, $00, $00, $00 ), + ( $00, $00, $E6, $66, $66, $6C, $78, $78, $6C, $66, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $F0, $60, $60, $60, $60, $60, $60, $62, $66, $FE, $00, $00, $00, $00 ), + ( $00, $00, $C6, $EE, $FE, $FE, $D6, $C6, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $C6, $E6, $F6, $FE, $DE, $CE, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $FC, $66, $66, $66, $7C, $60, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $D6, $DE, $7C, $0C, $0E, $00, $00 ), + ( $00, $00, $FC, $66, $66, $66, $7C, $6C, $66, $66, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $7C, $C6, $C6, $60, $38, $0C, $06, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $7E, $7E, $5A, $18, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $6C, $38, $10, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $C6, $C6, $D6, $D6, $D6, $FE, $EE, $6C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $C6, $6C, $7C, $38, $38, $7C, $6C, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $66, $66, $66, $66, $3C, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C6, $86, $0C, $18, $30, $60, $C2, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $3C, $30, $30, $30, $30, $30, $30, $30, $30, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $80, $C0, $E0, $70, $38, $1C, $0E, $06, $02, $00, $00, $00, $00 ), + ( $00, $00, $3C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $0C, $3C, $00, $00, $00, $00 ), + ( $10, $38, $6C, $C6, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00 ), + ( $30, $30, $18, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $E0, $60, $60, $78, $6C, $66, $66, $66, $66, $7C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $C0, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $1C, $0C, $0C, $3C, $6C, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $64, $60, $F0, $60, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $76, $CC, $CC, $CC, $CC, $CC, $7C, $0C, $CC, $78, $00 ), + ( $00, $00, $E0, $60, $60, $6C, $76, $66, $66, $66, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $18, $18, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $06, $06, $00, $0E, $06, $06, $06, $06, $06, $06, $66, $66, $3C, $00 ), + ( $00, $00, $E0, $60, $60, $66, $6C, $78, $78, $6C, $66, $E6, $00, $00, $00, $00 ), + ( $00, $00, $38, $18, $18, $18, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $EC, $FE, $D6, $D6, $D6, $D6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $DC, $66, $66, $66, $66, $66, $66, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $DC, $66, $66, $66, $66, $66, $7C, $60, $60, $F0, $00 ), + ( $00, $00, $00, $00, $00, $76, $CC, $CC, $CC, $CC, $CC, $7C, $0C, $0C, $1E, $00 ), + ( $00, $00, $00, $00, $00, $DC, $76, $66, $60, $60, $60, $F0, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7C, $C6, $60, $38, $0C, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $10, $30, $30, $FC, $30, $30, $30, $30, $36, $1C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $66, $66, $66, $66, $66, $3C, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $C6, $C6, $D6, $D6, $D6, $FE, $6C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $C6, $6C, $38, $38, $38, $6C, $C6, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $7E, $06, $0C, $F8, $00 ), + ( $00, $00, $00, $00, $00, $FE, $CC, $18, $30, $60, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $0E, $18, $18, $18, $70, $18, $18, $18, $18, $0E, $00, $00, $00, $00 ), + ( $00, $00, $18, $18, $18, $18, $00, $18, $18, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $70, $18, $18, $18, $0E, $18, $18, $18, $18, $70, $00, $00, $00, $00 ), + ( $00, $00, $76, $DC, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $10, $38, $6C, $C6, $C6, $C6, $FE, $00, $00, $00, $00, $00 ), + ( $00, $00, $3C, $66, $C2, $C0, $C0, $C0, $C2, $66, $3C, $0C, $06, $7C, $00, $00 ), + ( $00, $00, $CC, $00, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $0C, $18, $30, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $10, $38, $6C, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $CC, $00, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $38, $6C, $38, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $3C, $66, $60, $60, $66, $3C, $0C, $06, $3C, $00, $00, $00 ), + ( $00, $10, $38, $6C, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $00, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $7C, $C6, $FE, $C0, $C0, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $66, $00, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $18, $3C, $66, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $C6, $00, $10, $38, $6C, $C6, $C6, $FE, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $38, $6C, $38, $00, $38, $6C, $C6, $C6, $FE, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $18, $30, $60, $00, $FE, $66, $60, $7C, $60, $60, $66, $FE, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $CC, $76, $36, $7E, $D8, $D8, $6E, $00, $00, $00, $00 ), + ( $00, $00, $3E, $6C, $CC, $CC, $FE, $CC, $CC, $CC, $CC, $CE, $00, $00, $00, $00 ), + ( $00, $10, $38, $6C, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $C6, $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $30, $78, $CC, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $60, $30, $18, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $C6, $00, $00, $C6, $C6, $C6, $C6, $C6, $C6, $7E, $06, $0C, $78, $00 ), + ( $00, $C6, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $C6, $00, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $18, $18, $3C, $66, $60, $60, $60, $66, $3C, $18, $18, $00, $00, $00, $00 ), + ( $00, $38, $6C, $64, $60, $F0, $60, $60, $60, $60, $E6, $FC, $00, $00, $00, $00 ), + ( $00, $00, $66, $66, $3C, $18, $7E, $18, $7E, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $F8, $CC, $CC, $F8, $C4, $CC, $DE, $CC, $CC, $CC, $C6, $00, $00, $00, $00 ), + ( $00, $0E, $1B, $18, $18, $18, $7E, $18, $18, $18, $18, $18, $D8, $70, $00, $00 ), + ( $00, $18, $30, $60, $00, $78, $0C, $7C, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $0C, $18, $30, $00, $38, $18, $18, $18, $18, $18, $3C, $00, $00, $00, $00 ), + ( $00, $18, $30, $60, $00, $7C, $C6, $C6, $C6, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $18, $30, $60, $00, $CC, $CC, $CC, $CC, $CC, $CC, $76, $00, $00, $00, $00 ), + ( $00, $00, $76, $DC, $00, $DC, $66, $66, $66, $66, $66, $66, $00, $00, $00, $00 ), + ( $76, $DC, $00, $C6, $E6, $F6, $FE, $DE, $CE, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $3C, $6C, $6C, $3E, $00, $7E, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $38, $6C, $6C, $38, $00, $7C, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $30, $30, $00, $30, $30, $60, $C0, $C6, $C6, $7C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $FE, $C0, $C0, $C0, $C0, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $FE, $06, $06, $06, $06, $00, $00, $00, $00, $00 ), + ( $00, $C0, $C0, $C2, $C6, $CC, $18, $30, $60, $DC, $86, $0C, $18, $3E, $00, $00 ), + ( $00, $C0, $C0, $C2, $C6, $CC, $18, $30, $66, $CE, $9E, $3E, $06, $06, $00, $00 ), + ( $00, $00, $18, $18, $00, $18, $18, $18, $3C, $3C, $3C, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $36, $6C, $D8, $6C, $36, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $D8, $6C, $36, $6C, $D8, $00, $00, $00, $00, $00, $00 ), + ( $11, $44, $11, $44, $11, $44, $11, $44, $11, $44, $11, $44, $11, $44, $11, $44 ), + ( $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA, $55, $AA ), + ( $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77, $DD, $77 ), + ( $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $F8, $18, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $36, $36, $36, $36, $36, $36, $36, $F6, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $00, $00, $FE, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $F8, $18, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $36, $36, $36, $36, $36, $F6, $06, $F6, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $FE, $06, $F6, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $F6, $06, $FE, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $36, $36, $36, $36, $36, $36, $36, $FE, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $F8, $18, $F8, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $F8, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $1F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $18, $18, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $18, $18, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $1F, $18, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $36, $36, $36, $36, $36, $36, $36, $37, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $37, $30, $3F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $3F, $30, $37, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $F7, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $FF, $00, $F7, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $37, $30, $37, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $00, $00, $00, $00, $00, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $36, $36, $36, $36, $36, $F7, $00, $F7, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $18, $18, $18, $18, $18, $FF, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $36, $36, $36, $36, $36, $36, $36, $FF, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $FF, $00, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $36, $36, $3F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $18, $18, $18, $18, $18, $1F, $18, $1F, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $1F, $18, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $00, $00, $00, $00, $00, $00, $00, $3F, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $36, $36, $36, $36, $36, $36, $36, $FF, $36, $36, $36, $36, $36, $36, $36, $36 ), + ( $18, $18, $18, $18, $18, $FF, $18, $FF, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $F8, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $1F, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ), + ( $00, $00, $00, $00, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ), + ( $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0, $F0 ), + ( $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0F ), + ( $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $76, $DC, $D8, $D8, $D8, $DC, $76, $00, $00, $00, $00 ), + ( $00, $00, $78, $CC, $CC, $CC, $D8, $CC, $C6, $C6, $C6, $CC, $00, $00, $00, $00 ), + ( $00, $00, $FE, $C6, $C6, $C0, $C0, $C0, $C0, $C0, $C0, $C0, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $FE, $6C, $6C, $6C, $6C, $6C, $6C, $6C, $00, $00, $00, $00 ), + ( $00, $00, $00, $FE, $C6, $60, $30, $18, $30, $60, $C6, $FE, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7E, $D8, $D8, $D8, $D8, $D8, $70, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $66, $66, $66, $66, $66, $7C, $60, $60, $C0, $00, $00, $00 ), + ( $00, $00, $00, $00, $76, $DC, $18, $18, $18, $18, $18, $18, $00, $00, $00, $00 ), + ( $00, $00, $00, $7E, $18, $3C, $66, $66, $66, $3C, $18, $7E, $00, $00, $00, $00 ), + ( $00, $00, $00, $38, $6C, $C6, $C6, $FE, $C6, $C6, $6C, $38, $00, $00, $00, $00 ), + ( $00, $00, $38, $6C, $C6, $C6, $C6, $6C, $6C, $6C, $6C, $EE, $00, $00, $00, $00 ), + ( $00, $00, $1E, $30, $18, $0C, $3E, $66, $66, $66, $66, $3C, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $7E, $DB, $DB, $DB, $7E, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $03, $06, $7E, $DB, $DB, $F3, $7E, $60, $C0, $00, $00, $00, $00 ), + ( $00, $00, $1C, $30, $60, $60, $7C, $60, $60, $60, $30, $1C, $00, $00, $00, $00 ), + ( $00, $00, $00, $7C, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $C6, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $FE, $00, $00, $FE, $00, $00, $FE, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $7E, $18, $18, $00, $00, $FF, $00, $00, $00, $00 ), + ( $00, $00, $00, $30, $18, $0C, $06, $0C, $18, $30, $00, $7E, $00, $00, $00, $00 ), + ( $00, $00, $00, $0C, $18, $30, $60, $30, $18, $0C, $00, $7E, $00, $00, $00, $00 ), + ( $00, $00, $0E, $1B, $1B, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18, $18 ), + ( $18, $18, $18, $18, $18, $18, $18, $18, $D8, $D8, $D8, $70, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $18, $18, $00, $7E, $00, $18, $18, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $76, $DC, $00, $76, $DC, $00, $00, $00, $00, $00, $00 ), + ( $00, $38, $6C, $6C, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $18, $18, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $18, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $0F, $0C, $0C, $0C, $0C, $0C, $EC, $6C, $6C, $3C, $1C, $00, $00, $00, $00 ), + ( $00, $D8, $6C, $6C, $6C, $6C, $6C, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $70, $D8, $30, $60, $C8, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $7C, $7C, $7C, $7C, $7C, $7C, $7C, $00, $00, $00, $00, $00 ), + ( $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ) + ); -- cgit v1.2.1