os4units: added iffparse, keymap, clipboard, graphics, intuition, activated some packages

git-svn-id: trunk@33581 -
This commit is contained in:
marcus 2016-04-30 13:39:08 +00:00
parent 87be61c807
commit 77e47d21bb
15 changed files with 4861 additions and 82 deletions

4
.gitattributes vendored
View File

@ -6325,8 +6325,12 @@ packages/os4units/Makefile.fpc.fpcmake svneol=native#text/plain
packages/os4units/fpmake.pp svneol=native#text/pascal
packages/os4units/src/agraphics.pas svneol=native#text/pascal
packages/os4units/src/amigados.pas svneol=native#text/pascal
packages/os4units/src/clipboard.pas svneol=native#text/pascal
packages/os4units/src/exec.pas svneol=native#text/pascal
packages/os4units/src/iffparse.pas svneol=native#text/pascal
packages/os4units/src/inputevent.pas svneol=native#text/pascal
packages/os4units/src/intuition.pas svneol=native#text/pascal
packages/os4units/src/keymap.pas svneol=native#text/pascal
packages/os4units/src/layers.pas svneol=native#text/pascal
packages/os4units/src/timer.pas svneol=native#text/pascal
packages/os4units/src/utility.pas svneol=native#text/pascal

View File

@ -21,7 +21,10 @@ begin
P.Dependencies.Add('morphunits',[morphos]);
P.Dependencies.Add('arosunits',[aros]);
P.Dependencies.Add('amunits',[amiga]);
if Defaults.CPU=m68k then
P.Dependencies.Add('amunits',[amiga]);
if Defaults.CPU=powerpc then
P.Dependencies.Add('os4units',[amiga]);
{$ifdef ALLPACKAGES}
P.Directory:=ADirectory;
@ -30,8 +33,6 @@ begin
P.SourcePath.Add('src');
P.OSes:=AllAmigaLikeOSes;
if Defaults.CPU=powerpc then
P.OSes:=P.OSes-[amiga];
T:=P.Targets.AddUnit('cliputils.pas');

View File

@ -26,8 +26,6 @@ begin
P.Options.Add('-S2h');
P.NeedLibC:= false;
P.OSes:=AllOSes-[embedded,msdos,win16];
if Defaults.CPU=powerpc then
P.OSes:=P.OSes-[amiga];
P.SourcePath.Add('src');
P.IncludePath.Add('src/unix',AllUnixOSes);
@ -36,10 +34,13 @@ begin
P.IncludePath.Add('src/amicommon',AllAmigaLikeOSes);
P.IncludePath.Add('src/$(OS)',AllOSes-[win32,win64]-AllUnixOSes-AllAmigaLikeOSes);
P.IncludePath.Add('src/dummy',AllOSes-[win32,win64]-AllUnixOSes-AllAmigaLikeOSes);
P.Dependencies.add('morphunits',[morphos]);
P.Dependencies.add('arosunits',[aros]);
P.Dependencies.add('amunits',[amiga]);
if Defaults.CPU=powerpc then
P.Dependencies.add('os4units',[amiga])
else
P.Dependencies.add('amunits',[amiga]);
P.Dependencies.add('fcl-base');
T:=P.Targets.AddUnit('pipes.pp');

View File

@ -45,8 +45,6 @@ begin
P.Description := 'Libraries to create fppkg package managers.';
P.NeedLibC:= false;
P.OSes := P.OSes - [embedded,nativent,msdos,win16];
if Defaults.CPU = powerpc then
P.OSes := P.OSes - [amiga];
P.SourcePath.Add('src');
P.IncludePath.Add('src');

View File

@ -21,8 +21,6 @@ begin
P.License := 'LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.OSes := [beos,haiku,freebsd,darwin,iphonesim,solaris,netbsd,openbsd,linux,win32,win64,os2,emx,netware,netwlibc,go32v2,aix,dragonfly]+AllAmigaLikeOSes;
if Defaults.CPU = powerpc then
P.OSes := P.OSes - [amiga];
P.Email := '';
P.Description := 'Free Vision, a portable Turbo Vision clone.';
P.NeedLibC:= false;
@ -33,7 +31,10 @@ begin
P.Dependencies.add('rtl-extra');
P.Dependencies.add('morphunits',[morphos]);
P.Dependencies.add('arosunits',[aros]);
P.Dependencies.add('amunits',[amiga]);
if Defaults.CPU=m68k then
P.Dependencies.Add('amunits',[amiga]);
if Defaults.CPU=powerpc then
P.Dependencies.Add('os4units',[amiga]);
T:=P.Targets.AddUnit('app.pas');
with T.Dependencies do

View File

@ -38,6 +38,10 @@ begin
T:=P.Targets.AddUnit('agraphics.pas');
T:=P.Targets.AddUnit('layers.pas');
T:=P.Targets.AddUnit('inputevent.pas');
T:=P.Targets.AddUnit('keymap.pas');
T:=P.Targets.AddUnit('clipboard.pas');
T:=P.Targets.AddUnit('iffparse.pas');
T:=P.Targets.AddUnit('intuition.pas');
{$ifndef ALLPACKAGES}
Run;

View File

@ -2296,10 +2296,10 @@ function GfxRelease(): LongWord; syscall IGfx 64;
procedure GfxExpunge(); syscall IGfx 68;
function GfxClone(): PInterface; syscall IGfx 72;
function BltBitMap(const SrcBitMap: PBitMap; XSrc, YSrc: LongInt; DestBitMap: PBitMap; XDest, YDest, XSize, YSize: LongInt; MinTerm, Mask: LongWord; TempA: PChar): LongInt; syscall IGfx 76;
procedure BltTemplate(const Source: TPlanePtr; XSrc, SrcMod: SmallInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: SmallInt); syscall IGfx 80;
procedure BltTemplate(const Source: TPlanePtr; XSrc, SrcMod: LongInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: LongInt); syscall IGfx 80;
procedure ClearEOL(Rp: PRastPort); syscall IGfx 84;
procedure ClearScreen(Rp: PRastPort); syscall IGfx 88;
function TextLength(Rp: PRastPort; const String_: PChar; Count: LongWord): SmallInt; syscall IGfx 92;
function TextLength(Rp: PRastPort; const String_: PChar; Count: LongWord): LongInt; syscall IGfx 92;
procedure GfxText(Rp: PRastPort; const String_: PChar; Count: LongWord); syscall IGfx 96;
procedure SetFont(Rp: PRastPort; const TextFont: PTextFont); syscall IGfx 100;
function OpenFont(TextAttr: PTextAttr): PTextFont; syscall IGfx 104;
@ -2320,9 +2320,9 @@ procedure AddAnimOb(AnOb: PAnimOb; AnKey: PPAnimOb; Rp: PRastPort); syscall IGfx
procedure Animate(AnKey: PPAnimOb; Rp: PRastPort); syscall IGfx 164;
function GetGBuffers(AnOb: PAnimOb; Rp: PRastPort; Flag: LongInt): LongBool; syscall IGfx 168;
procedure InitGMasks(AnOb: PAnimOb); syscall IGfx 172;
procedure DrawEllipse(Rp: PRastPort; XCenter, YCenter, A, B: SmallInt); syscall IGfx 176;
function AreaEllipse(Rp: PRastPort; XCenter, YCenter, A, B: SmallInt): LongInt; syscall IGfx 180;
procedure LoadRGB4(Vp: PViewPort; const Colors: PWord; Count: Word); syscall IGfx 184;
procedure DrawEllipse(Rp: PRastPort; XCenter, YCenter, A, B: LongInt); syscall IGfx 176;
function AreaEllipse(Rp: PRastPort; XCenter, YCenter, A, B: LongInt): LongInt; syscall IGfx 180;
procedure LoadRGB4(Vp: PViewPort; const Colors: PWord; Count: LongWord); syscall IGfx 184;
procedure InitRastPort(Rp: PRastPort); syscall IGfx 188;
procedure InitVPort(Vp: PViewPort); syscall IGfx 192;
function MrgCop(View: PView): LongWord; syscall IGfx 196;
@ -2330,38 +2330,38 @@ function MakeVPort(View: PView; Vp: PViewPort): LongWord; syscall IGfx 200;
procedure LoadView(View: PView); syscall IGfx 204;
procedure WaitBlit; syscall IGfx 208;
procedure SetRast(Rp: PRastPort; Pen: LongWord); syscall IGfx 212;
procedure GfxMove(Rp: PRastPort; X, Y: SmallInt); syscall IGfx 216;
procedure Draw(Rp: PRastPort; X, Y: SmallInt); syscall IGfx 220;
function AreaMove(Rp: PRastPort; X, Y: SmallInt): LongInt; syscall IGfx 224;
function AreaDraw(Rp: PRastPort; X, Y: SmallInt): LongInt; syscall IGfx 228;
procedure GfxMove(Rp: PRastPort; X, Y: LongInt); syscall IGfx 216;
procedure Draw(Rp: PRastPort; X, Y: LongInt); syscall IGfx 220;
function AreaMove(Rp: PRastPort; X, Y: LongInt): LongInt; syscall IGfx 224;
function AreaDraw(Rp: PRastPort; X, Y: LongInt): LongInt; syscall IGfx 228;
function AreaEnd(Rp: PRastPort): LongInt; syscall IGfx 232;
procedure WaitTOF; syscall IGfx 236;
procedure QBlit(blit: PBltNode); syscall IGfx 240;
procedure InitArea(AreaInfo: PAreaInfo; VectorBuffer: APTR; MaxVectors: SmallInt); syscall IGfx 244;
procedure SetRGB4(Vp: PViewPort; ColIndex: Word; Red, Green, Blue: Byte); syscall IGfx 248;
procedure InitArea(AreaInfo: PAreaInfo; VectorBuffer: APTR; MaxVectors: LongInt); syscall IGfx 244;
procedure SetRGB4(Vp: PViewPort; ColIndex: LongWord; Red, Green, Blue: Byte); syscall IGfx 248;
procedure QBSBlit(Blit: PBltNode); syscall IGfx 252;
procedure BltClear(MemBlock: TPlanePtr; ByteCount, Flags: LongWord); syscall IGfx 256;
procedure RectFill(Rp: PRastPort; XMin, YMin, XMax, YMax: SmallInt); syscall IGfx 260;
procedure BltPattern(Rp: PRastPort; const Mask: TPlanePtr; XMin, YMin, XMax, YMax: SmallInt; MaskBPR: Word); syscall IGfx 264;
function ReadPixel(Rp: PRastPort; X, Y: SmallInt): LongInt; syscall IGfx 268;
function WritePixel(Rp: PRastPort; X, Y: SmallInt): LongInt; syscall IGfx 272;
function Flood(Rp: PRastPort; Mode: LongWord; X, Y: SmallInt): LongBool; syscall IGfx 276;
procedure PolyDraw(Rp: PRastPort; Count: SmallInt; const PolyTable: PSmallInt); syscall IGfx 280;
procedure RectFill(Rp: PRastPort; XMin, YMin, XMax, YMax: LongInt); syscall IGfx 260;
procedure BltPattern(Rp: PRastPort; const Mask: TPlanePtr; XMin, YMin, XMax, YMax: LongInt; MaskBPR: LongWord); syscall IGfx 264;
function ReadPixel(Rp: PRastPort; X, Y: LongInt): LongInt; syscall IGfx 268;
function WritePixel(Rp: PRastPort; X, Y: LongInt): LongInt; syscall IGfx 272;
function Flood(Rp: PRastPort; Mode: LongWord; X, Y: LongInt): LongBool; syscall IGfx 276;
procedure PolyDraw(Rp: PRastPort; Count: LongInt; const PolyTable: PSmallInt); syscall IGfx 280;
procedure SetAPen(Rp: PRastPort; Pen: Byte); syscall IGfx 284;
procedure SetBPen(Rp: PRastPort; Pen: Byte); syscall IGfx 288;
procedure SetDrMd(Rp: PRastPort; DrawMode: Byte); syscall IGfx 292;
procedure InitView(View: PView); syscall IGfx 296;
procedure CBump(CopList: PUCopList); syscall IGfx 300;
procedure CMove(CopList: PUCopList; DestOffset: SmallInt; data: SmallInt); syscall IGfx 304;
procedure CWait(CopList: PUCopList; V, H: SmallInt); syscall IGfx 308;
procedure CMove(CopList: PUCopList; DestOffset: LongInt; data: LongInt); syscall IGfx 304;
procedure CWait(CopList: PUCopList; V, H: LongInt); syscall IGfx 308;
function VBeamPos: LongInt; syscall IGfx 312;
procedure InitBitMap(BitMap: PBitMap; Depth: ShortInt; Width, Height: Word); syscall IGfx 316;
procedure ScrollRaster(Rp: PRastPort; Dx, Dy, XMin, YMin, XMax, YMax: SmallInt); syscall IGfx 320;
procedure InitBitMap(BitMap: PBitMap; Depth: ShortInt; Width, Height: LongWord); syscall IGfx 316;
procedure ScrollRaster(Rp: PRastPort; Dx, Dy, XMin, YMin, XMax, YMax: LongInt); syscall IGfx 320;
procedure WaitBOVP(Vp: PViewPort); syscall IGfx 324;
function GetSprite(Sprite: PSimpleSprite; Num: SmallInt): SmallInt; syscall IGfx 328;
function GetSprite(Sprite: PSimpleSprite; Num: LongInt): LongInt; syscall IGfx 328;
procedure FreeSprite(Num: LongInt); syscall IGfx 332;
procedure ChangeSprite(Vp: PViewPort; Sprite: PSimpleSprite; NewData: APTR); syscall IGfx 336;
procedure MoveSprite(Vp: PViewPort; Sprite: PSimpleSprite; X, Y: SmallInt); syscall IGfx 340;
procedure MoveSprite(Vp: PViewPort; Sprite: PSimpleSprite; X, Y: LongInt); syscall IGfx 340;
procedure LockLayerRom(Layer: PLayer); syscall IGfx 344;
procedure UnlockLayerRom(Layer: PLayer); syscall IGfx 348;
procedure SyncSBitMap(Layer: PLayer); syscall IGfx 352;
@ -2372,8 +2372,8 @@ function InitTmpRas(TmpRas: PTmpRas; Buffer: TPlanePtr; Size: LongInt): PTmpRas;
procedure AskFont(Rp: PRastPort; TextAttr: PTextAttr); syscall IGfx 372;
procedure AddFont(TextFont: PTextFont); syscall IGfx 376;
procedure RemFont(TextFont: PTextFont); syscall IGfx 380;
function AllocRaster(Width, Height: Word): TPlanePtr; syscall IGfx 384;
procedure FreeRaster(P: TPlanePtr; Width, Height: Word); syscall IGfx 388;
function AllocRaster(Width, Height: LongWord): TPlanePtr; syscall IGfx 384;
procedure FreeRaster(P: TPlanePtr; Width, Height: LongWord); syscall IGfx 388;
procedure AndRectRegion(Region: PRegion; const Rectangle: PRectangle); syscall IGfx 392;
function OrRectRegion(Region: PRegion; const Rectangle: PRectangle): LongBool; syscall IGfx 396;
function NewRegion: PRegion; syscall IGfx 400;
@ -2382,21 +2382,21 @@ procedure ClearRegion(Region: PRegion); syscall IGfx 408;
procedure DisposeRegion(Region: PRegion); syscall IGfx 412;
procedure FreeVPortCopLists(Vp: PViewPort); syscall IGfx 416;
procedure FreeCopList(CopList: PCopList); syscall IGfx 420;
procedure ClipBlit(SrcRP: PRastPort; XSrc, ySrc: SmallInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: Word; MinTerm: Byte); syscall IGfx 424;
procedure ClipBlit(SrcRP: PRastPort; XSrc, ySrc: LongInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: LongWord; MinTerm: Byte); syscall IGfx 424;
function XorRectRegion(Region: PRegion; const Rectangle: PRectangle): LongBool; syscall IGfx 428;
procedure FreeCprList(CprList: PCprList); syscall IGfx 432;
function GetColorMap(Entries: Word): PColorMap; syscall IGfx 436;
function GetColorMap(Entries: LongWord): PColorMap; syscall IGfx 436;
procedure FreeColorMap(ColorMap: PColorMap); syscall IGfx 440;
function GetRGB4(ColorMap: PColorMap; Entry: Word): LongInt; syscall IGfx 444;
function GetRGB4(ColorMap: PColorMap; Entry: LongWord): LongInt; syscall IGfx 444;
procedure ScrollVPort(Vp: PViewPort); syscall IGfx 448;
function UCopperListInit(UCopList: PUCopList; N: LongInt): PCopList; syscall IGfx 452;
procedure FreeGBuffers(AnOb: PAnimOb; Rp: PRastPort; Flag: LongInt); syscall IGfx 456;
function BltBitMaPRastPort(const SrcBitMap: PBitMap; XSrc, YSrc: SmallInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: SmallInt; Minterm: Byte): LongBool; syscall IGfx 460;
function BltBitMaPRastPort(const SrcBitMap: PBitMap; XSrc, YSrc: LongInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: LongInt; Minterm: Byte): LongBool; syscall IGfx 460;
function OrRegionRegion(const SrcRegion: PRegion; DestRegion: PRegion): LongBool; syscall IGfx 464;
function XorRegionRegion(const SrcRegion: PRegion; DestRegion: PRegion): LongBool; syscall IGfx 468;
function AndRegionRegion(const SrcRegion: PRegion; DestRegion: PRegion): LongBool; syscall IGfx 472;
procedure SetRGB4CM(ColorMap: PColorMap; ColIndex: Word; Red, Green, Blue: Word); syscall IGfx 476;
procedure BltMaskBitMapRastPort(const SrcBitMap: PBitMap; XSrc, YSrc: SmallInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: SmallInt; MinTerm: Byte; const BltMask: TPlanePtr); syscall IGfx 480;
procedure SetRGB4CM(ColorMap: PColorMap; ColIndex: LongWord; Red, Green, Blue: LongWord); syscall IGfx 476;
procedure BltMaskBitMapRastPort(const SrcBitMap: PBitMap; XSrc, YSrc: LongInt; DestRP: PRastPort; XDest, YDest, XSize, YSize: LongInt; MinTerm: Byte; const BltMask: TPlanePtr); syscall IGfx 480;
// 484 private
// 488 private
function AttemptLockLayerRom(Layer: PLayer): LongBool; syscall IGfx 492;
@ -2404,9 +2404,9 @@ function GfxNew(GfxNodeType: LongWord): APTR; syscall IGfx 496;
procedure GfxFree(GfxNodePtr: PExtendedNode); syscall IGfx 500;
procedure GfxAssociate(const AssociateNode: APTR; GfxNodePtr: PExtendedNode); syscall IGfx 504;
procedure BitMapScale(BitScaleArgs: PBitScaleArgs); syscall IGfx 508;
function ScalerDiv(Factor, Numerator, Denominator: Word): WORD; syscall IGfx 512;
procedure TextExtent(Rp: PRastPort; const String_: STRPTR; Count: Word; TextExtent: PTextExtent); syscall IGfx 516;
function TextFit(Rp: PRastPort; const String_: STRPTR; StrLen: Word; TextExtent: PTextExtent; ConstrainingExtent: PTextExtent; StrDirection: SmallInt; ConstrainingBitWidth, ConstrainingBitHeight: Word): Word; syscall IGfx 520;
function ScalerDiv(Factor, Numerator, Denominator: LongWord): LongWord; syscall IGfx 512;
procedure TextExtent(Rp: PRastPort; const String_: STRPTR; Count: LongWord; TextExtent: PTextExtent); syscall IGfx 516;
function TextFit(Rp: PRastPort; const String_: STRPTR; StrLen: LongWord; TextExtent: PTextExtent; ConstrainingExtent: PTextExtent; StrDirection: LongInt; ConstrainingBitWidth, ConstrainingBitHeight: LongWord): LongWord; syscall IGfx 520;
function GfxLookUp(const AssociateNode: APTR): APTR; syscall IGfx 524;
function VideoControl(ColorMap: PColorMap; TagArray: PTagItem): LongWord; syscall IGfx 528;
// 532 VideoControlTags
@ -2419,19 +2419,19 @@ function NextDisplayInfo(DisplayID: LongWord): LongWord; syscall IGfx 548;
// 560 private
function GetDisplayInfoData(const Handle: Pointer; Buf: APTR; Size: LongWord; TagID: LongWord; DisplayID: LongWord): LongWord; syscall IGfx 564;
procedure FontExtent(const Font: PTextFont; FontExtent: PTextExtent); syscall IGfx 568;
function ReadPixelLine8(Rp: PRastPort; XStart, YStart, Width: Word; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 572;
function WritePixelLine8(Rp: PRastPort; XStart, YStart, Width: Word; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 576;
function ReadPixelArray8(Rp: PRastPort; XStart, YStart, XStop, YStop: Word; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 580;
function WritePixelArray8(Rp: PRastPort; XStart, YStart, XStop, YStop: Word; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 584;
function ReadPixelLine8(Rp: PRastPort; XStart, YStart, Width: LongWord; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 572;
function WritePixelLine8(Rp: PRastPort; XStart, YStart, Width: LongWord; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 576;
function ReadPixelArray8(Rp: PRastPort; XStart, YStart, XStop, YStop: LongWord; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 580;
function WritePixelArray8(Rp: PRastPort; XStart, YStart, XStop, YStop: LongWord; Array_: PByte; TempRP: PRastPort): LongInt; syscall IGfx 584;
function GetVPModeID(const Vp: PViewPort): LongWord; syscall IGfx 588;
function ModeNotAvailable(ModeID: LongWord): LongWord; syscall IGfx 592;
// 596 private
// 600 private
procedure EraseRect(Rp: PRastPort; XMin, YMin, XMax, YMax: SmallInt); syscall IGfx 604;
procedure EraseRect(Rp: PRastPort; XMin, YMin, XMax, YMax: LongInt); syscall IGfx 604;
function ExtendFont(Font: PTextFont; const FontTags: PTagItem): LongWord; syscall IGfx 608;
// 612 ExtendFontTags
procedure StripFont(Font: PTextFont); syscall IGfx 616;
function CalcIVG(V: PView; Cp: PViewPort): Word; syscall IGfx 620;
function CalcIVG(V: PView; Cp: PViewPort): LongWord; syscall IGfx 620;
function AttachPalExtra(Cm: PColorMap; Vp: PViewPort): LongInt; syscall IGfx 624;
function ObtainBestPenA(Cm: PColorMap; R, G, B: LongWord;const Tags: PTagItem): LongInt; syscall IGfx 628;
// 632 ObtainBestPen
@ -2444,7 +2444,7 @@ function GetOutlinePen(Rp: PRastPort): LongWord; syscall IGfx 656;
procedure LoadRGB32(Vp: PViewPort; const Table: PLongWord); syscall IGfx 660;
function SetChipRev(Want: LongWord): LongWord; syscall IGfx 664;
procedure SetABPenDrMd(Rp: PRastPort; APen, BPen, DrawMode: LongWord); syscall IGfx 668;
procedure GetRGB32(const Cm: pColorMap; Firstcolor, NColors: Word; Table: PLongWord); syscall IGfx 672;
procedure GetRGB32(const Cm: pColorMap; Firstcolor, NColors: LongWord; Table: PLongWord); syscall IGfx 672;
function BltBitMapTagList(const Tags: PTagItem): LongInt; syscall IGfx 676;
// 680 private
function AllocBitMap(SizeX, SizeY, Depth, Flags: LongWord; const FriendBitmap: PBitMap): PBitMap; syscall IGfx 684;
@ -2462,8 +2462,8 @@ function SetOutlinePen(Rp: PRastPort; Pen: LongWord): LongWord; syscall IGfx 728
function SetWriteMask(Rp: PRastPort; Msk: LongWord): LongWord; syscall IGfx 732;
procedure SetMaxPen(Rp: PRastPort; MaxPen: LongWord); syscall IGfx 736;
procedure SetRGB32CM(Cm: pColorMap; N, R, G, B: LongWord); syscall IGfx 740;
procedure ScrollRasterBF(Rp: PRastPort; Dx, Dy, XMin, YMin, XMax, yMax: Word); syscall IGfx 744;
function FindColor(Cm: pColorMap; R, G, B: LongWord; MaxColor: LongInt): Word; syscall IGfx 748;
procedure ScrollRasterBF(Rp: PRastPort; Dx, Dy, XMin, YMin, XMax, yMax: LongWord); syscall IGfx 744;
function FindColor(Cm: pColorMap; R, G, B: LongWord; MaxColor: LongInt): LongWord; syscall IGfx 748;
// 752 BltBitMapTags
function AllocSpriteDataA(const Bm: PBitMap; const Tags: PTagItem): PExtSprite; syscall IGfx 756;
// 758 AllocSpriteData
@ -2476,7 +2476,7 @@ function GetRPAttrsA(const Rp: PRastPort; const Tags: PTagItem): LongWord; sysca
// 788 GetRPAttrs
function BestModeIDA(const Tags: pTagItem): LongWord; syscall IGfx 1050;
// 796 BestModeID
procedure WriteChunkyPixels(Rp: PRastPort; XStart, YStart, XStop, YStop: Word; Array_: PByte; BytesPerRow: LongInt); syscall IGfx 800;
procedure WriteChunkyPixels(Rp: PRastPort; XStart, YStart, XStop, YStop: LongWord; Array_: PByte; BytesPerRow: LongInt); syscall IGfx 800;
function CompositeTagList(const Operator_: LongWord; const Source: PBitMap; const Destination: PBitMap; const Tags: PTagItem): LongWord; syscall IGfx 804;
// 808 CompositeTags
function AllocBitMapTagList(SizeX, SizeY, Depth: LongWord; const Tags: PTagItem): PBitMap; syscall IGfx 812;

View File

@ -0,0 +1,74 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2016 by Free Pascal development team
clipboard device functions for Amiga OS 4.x
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 clipboard;
interface
uses
exec;
const
CBD_POST = CMD_NONSTD + 0;
CBD_CURRENTREADID = CMD_NONSTD + 1;
CBD_CURRENTWRITEID = CMD_NONSTD + 2;
CBD_CHANGEHOOK = CMD_NONSTD + 3;
CBERR_OBSOLETEID = 1;
type
PClipboardUnitPartial = ^TClipboardUnitPartial;
TClipboardUnitPartial = record
cu_Node: TNode; // list of units
cu_UnitNum: LongWord; // unit number for this unit
// the remaining unit data is private to the device
end;
PIOClipReq = ^TIOClipReq;
TIOClipReq = record
io_Message: TMessage;
io_Device: PDevice; // device node pointer
io_Unit: PClipboardUnitPartial; // unit (driver private)
io_Command: Word; // device command
io_Flags: Byte; // including QUICK and SATISFY
io_Error: Shortint; // error or warning num
io_Actual: LongWord; // number of bytes transferred
io_Length: LongWord; // number of bytes requested
io_Data: STRPTR; // either clip stream or post port
io_Offset: LongWord; // offset in clip stream
io_ClipID: Longint; // ordinal clip identifier
end;
const
PRIMARY_CLIP = 0; // primary clip unit
type
PSatisfyMsg = ^TSatisfyMsg;
TSatisfyMsg = record
sm_Msg: TMessage; // the length will be 6
sm_Unit: Word; // which clip unit this is
sm_ClipID: Longint; // the clip identifier of the post
end;
PClipHookMsg = ^TClipHookMsg;
TClipHookMsg = record
chm_Type: LongWord; // zero for this structure format
chm_ChangeCmd: LongInt; // command that caused this hook invocation: either CMD_UPDATE OR CBD_POST
chm_ClipID : Longint; // the clip identifier of the new data
end;
implementation
end.

View File

@ -1846,7 +1846,7 @@ function Setfunction(Lib: PLibrary; FuncOffset: LongInt; const Newfunction: APTR
procedure CacheClearE(Address: APTR; Length: LongWord; Caches: LongWord); syscall IExec 492;
procedure CacheClearU(); syscall IExec 496;
function Makefunctions(Target: APTR; const FunctionArray: APTR; const FuncDispBase: APTR): LongWord; syscall IExec 500;
function OpenDevice(const DevName: STRPTR; UnitNumber: LongWord; IORequest: PIORequest; Flags: LongWord): LongInt; syscall IExec 508;
function OpenDevice(const DevName: STRPTR; UnitNumber: LongWord; IORequest: PIORequest; Flags: LongWord): LongInt; syscall IExec 504;
procedure CloseDevice(IORequest: PIORequest); syscall IExec 508;
function CreateIORequest(const IOReplyPort: PMsgPort; Size: LongWord): PIORequest; syscall IExec 512;
procedure DeleteIORequest(IORequest: PIORequest); syscall IExec 516;

View File

@ -0,0 +1,238 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2016 by Free Pascal development team
iffparse.library functions for Amiga OS 4.x
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.
**********************************************************************}
{$PACKRECORDS 2}
unit iffparse;
interface
uses
exec, clipboard, utility;
// Struct associated with an active IFF stream. "iff_Stream" is a value used by the client's read/write/seek functions -
// it will not be accessed by the library itself and can have any value (could even be a pointer or a BPTR).
// This structure can only be allocated by iffparse.library
type
PIFFHandle = ^TIFFHandle;
TIFFHandle = record
iff_Stream: LongWord;
iff_Flags: LongWord;
iff_Depth: LongInt; // Depth of context stack.
end;
// Bit masks for "iff_Flags" field.
const
IFFF_READ = 0; // read mode - default
IFFF_WRITE = 1; // write mode
IFFF_RWBITS = IFFF_READ + IFFF_WRITE; // read/write bits
IFFF_FSEEK = 1 shl 1; // forward seek only
IFFF_RSEEK = 1 shl 2; // random seek
IFFF_RESERVED = $FFFF0000; // Don't touch these bits.
// When the library calls your stream handler, you'll be passed a pointer to this structure as the "message packet".
type
PIFFStreamCmd = ^TIFFStreamCmd;
TIFFStreamCmd = record
sc_Command: LongInt; // Operation to be performed (IFFCMD_)
sc_Buf: APTR; // Pointer to data buffer
sc_NBytes: LongInt; // Number of bytes to be affected
end;
// A node associated with a context on the iff_Stack. Each node represents a chunk, the stack representing the current nesting of chunks in the
// open IFF file. Each context node has associated local context items in the (private) LocalItems list.
// The ID, type, size and scan values describe the chunk associated with this node.
// This structure can only be allocated by iffparse.library
PContextNode = ^TContextNode;
TContextNode = record
cn_Node: TMinNode;
cn_ID: LongInt;
cn_Type: LongInt;
cn_Size: LongInt; // Size of this chunk
cn_Scan: LongInt; // # of bytes read/written so far
end;
// Local context items live in the ContextNode's. Each class is identified by its lci_Ident code and has a (private) purge vector for when the
// parent context node is popped. This structure can only be allocated by iffparse.library
PLocalContextItem = ^TLocalContextItem;
TLocalContextItem = record
lci_Node: TMinNode;
lci_ID: LongWord;
lci_Type: LongWord;
lci_Ident: LongWord;
end;
// StoredProperty: a local context item containing the data stored from a previously encountered property chunk.
PStoredProperty = ^TStoredProperty;
TStoredProperty = record
sp_Size: LongInt;
sp_Data: APTR;
end;
// Collection Item: the actual node in the collection list at which client will look.
// The next pointers cross context boundaries so that the complete list is accessable.
PCollectionItem = ^TCollectionItem;
TCollectionItem = record
ci_Next: PCollectionItem;
ci_Size: LongInt;
ci_Data: APTR;
end;
// Structure returned by OpenClipboard(). You may do CMD_POSTs and such using this structure.
// However, once you call OpenIFF(), you may not do any more of your own I/O to the clipboard until you call CloseIFF().
PClipboardHandle = ^TClipBoardHandle;
TClipboardHandle = record
cbh_Req: TIOClipReq;
cbh_CBport: TMsgPort;
cbh_SatisfyPort: TMsgPort;
end;
const
// IFF return codes. Most functions return either zero for success or one of these codes. The exceptions are the read/write functions which
// return positive values for number of bytes or records read or written, or a negative error code.
// Some of these codes are not errors per sae, but valid conditions such as EOF or EOC (End of Chunk).
IFFERR_EOF = -1; // Reached logical END of file
IFFERR_EOC = -2; // About to leave context
IFFERR_NOSCOPE = -3; // No valid scope for property
IFFERR_NOMEM = -4; // Internal memory alloc failed
IFFERR_READ = -5; // Stream read error
IFFERR_WRITE = -6; // Stream write error
IFFERR_SEEK = -7; // Stream seek error
IFFERR_MANGLED = -8; // Data in file is corrupt
IFFERR_SYNTAX = -9; // IFF syntax error
IFFERR_NOTIFF = -10; // Not an IFF file
IFFERR_NOHOOK = -11; // No call-back hook provided
IFF_RETURN2CLIENT = -12; // Client handler normal return
// Universal IFF identifiers.
ID_FORM = 1179603533; // 'FORM'
ID_LIST = 1279873876; // 'LIST'
ID_CAT = 1128354848; // 'CAT '
ID_PROP = 1347571536; // 'PROP'
ID_NULL = 538976288; // ' '
// Ident codes for universally recognized local context items.
IFFLCI_PROP = 1886547824; // 'prop'
IFFLCI_COLLECTION = 1668246636; // 'coll'
IFFLCI_ENTRYHANDLER = 1701734500; // 'enhd'
IFFLCI_EXITHANDLER = 1702389860; // 'exhd'
// Control modes for ParseIFF() function.
IFFPARSE_SCAN = 0;
IFFPARSE_STEP = 1;
IFFPARSE_RAWSTEP = 2;
// Control modes for StoreLocalItem() function
IFFSLI_ROOT = 1; // Store in default context
IFFSLI_TOP = 2; // Store in current context
IFFSLI_PROP = 3; // Store in topmost FORM OR LIST
// Magic value for writing functions. If you pass this value in as a size to PushChunk() when writing a file, the parser will figure out the
// size of the chunk for you. If you know the size, is it better to provide as it makes things faster.
IFFSIZE_UNKNOWN = -1;
// Possible call-back command values.
IFFCMD_INIT = 0; // Prepare the stream for a session
IFFCMD_CLEANUP = 1; // Terminate stream session
IFFCMD_READ = 2; // Read bytes from stream
IFFCMD_WRITE = 3; // Write bytes to stream
IFFCMD_SEEK = 4; // Seek on stream
IFFCMD_ENTRY = 5; // You just entered a new context
IFFCMD_EXIT = 6; // You're about to leave a context
IFFCMD_PURGELCI = 7; // Purge a LocalContextItem
const
IFFPARSENAME: PChar = 'iffparse.library';
var
IFFParseBase: PLibrary = nil;
IIFFParse: PInterface = nil;
function IFFParseObtain(): LongWord; syscall IIFFParse 60;
function IFFParseRelease(): LongWord; syscall IIFFParse 64;
procedure IFFParseExpunge(); syscall IIFFParse 68;
function IFFParseClone(): PInterface; syscall IIFFParse 72;
function AllocIFF: PIFFHandle; syscall IIFFParse 76;
function OpenIFF(Iff: PIFFHandle; RWMode: LongInt): LongInt; syscall IIFFParse 80;
function ParseIFF(Iff: PIFFHandle; Control: LongInt): LongInt; syscall IIFFParse 84;
procedure CloseIFF(Iff: PIFFHandle); syscall IIFFParse 88;
procedure FreeIFF(Iff: PIFFHandle); syscall IIFFParse 92;
function ReadChunkBytes(Iff: PIFFHandle; Buf: APTR; NumBytes: LongInt): LongInt; syscall IIFFParse 96;
function WriteChunkBytes(Iff: PIFFHandle; const Buf: APTR; NumBytes: LongInt): LongInt; syscall IIFFParse 100;
function ReadChunkRecords(Iff: PIFFHandle; Buf: APTR; BytesPerRecord: LongInt; NumRecords: LongInt): LongInt; syscall IIFFParse 104;
function WriteChunkRecords(Iff: PIFFHandle; const Buf: APTR; BytesPerRecord: LongInt; NumRecords: LongInt): LongInt; syscall IIFFParse 108;
function PushChunk(Iff: PIFFHandle; Type_, ID, Size: LongInt): LongInt; syscall IIFFParse 112;
function PopChunk(Iff: PIFFHandle): LongInt; syscall IIFFParse 116;
function EntryHandler(Iff: PIFFHandle; Type_, ID, Position: LongInt; Handler: PHook; Obj: APTR): LongInt; syscall IIFFParse 120;
function ExitHandler(Iff: PIFFHandle; Type_, ID, Position: LongInt; Handler: PHook; Obj: APTR): LongInt; syscall IIFFParse 124;
function PropChunk(Iff: PIFFHandle; Type_, ID: LongInt): LongInt; syscall IIFFParse 128;
function PropChunks(Iff: PIFFHandle; const PropArray: PLongInt; NumPairs: LongInt): LongInt; syscall IIFFParse 132;
function StopChunk(Iff: PIFFHandle; Type_, ID: LongInt): LongInt; syscall IIFFParse 136;
function StopChunks(Iff: PIFFHandle; const PropArray: PLongInt; NumPairs: LongInt): LongInt; syscall IIFFParse 140;
function CollectionChunk(Iff: PIFFHandle; Type_, ID: LongInt): LongInt; syscall IIFFParse 144;
function CollectionChunks(Iff: PIFFHandle; const PropArray: PLongInt; NumPairs: LongInt): LongInt; syscall IIFFParse 148;
function StopOnExit(Iff: PIFFHandle; Type_, ID: LongInt): LongInt; syscall IIFFParse 152;
function FindProp(const Iff: PIFFHandle; Type_, ID: LongInt): PStoredProperty; syscall IIFFParse 156;
function FindCollection(const Iff: PIFFHandle; Type_, ID: LongInt): PCollectionItem; syscall IIFFParse 160;
function FindPropContext(const Iff: PIFFHandle): PContextNode; syscall IIFFParse 164;
function CurrentChunk(const Iff: PIFFHandle): PContextNode; syscall IIFFParse 168;
function ParentChunk(const ContextNode: PContextNode): PContextNode; syscall IIFFParse 172;
function AllocLocalItem(Type_, ID, Ident, DataSize: LongInt): PLocalContextItem; syscall IIFFParse 176;
function LocalItemData(const LocalItem: PLocalContextItem): POINTER; syscall IIFFParse 180;
procedure SetLocalItemPurge(LocalItem: PLocalContextItem; const PurgeHook: PHook); syscall IIFFParse 184;
procedure FreeLocalItem(LocalItem: PLocalContextItem); syscall IIFFParse 188;
function FindLocalItem(const Iff: PIFFHandle; Type_, ID, Ident: LongInt): PLocalContextItem; syscall IIFFParse 192;
function StoreLocalItem(Iff: PIFFHandle; LocalItem: PLocalContextItem; Position: LongInt): LongInt; syscall IIFFParse 196;
procedure StoreItemInContext(Iff: PIFFHandle; LocalItem: PLocalContextItem; ContextNode: PContextNode); syscall IIFFParse 200;
procedure InitIFF(Iff: PIFFHandle; Flags: LongInt; const StreamHook: PHook); syscall IIFFParse 204;
procedure InitIFFasDOS(Iff: PIFFHandle); syscall IIFFParse 208;
procedure InitIFFasClip(Iff: PIFFHandle); syscall IIFFParse 212;
function OpenClipboard(UnitNumber: LongInt): PClipboardHandle; syscall IIFFParse 216;
procedure CloseClipboard(clipHandle: PClipboardHandle); syscall IIFFParse 220;
function GoodID(ID: LongInt): LongInt; syscall IIFFParse 224;
function GoodType(Type_: LongInt): LongInt; syscall IIFFParse 228;
function IDtoStr(ID: LongInt; Buf: STRPTR): STRPTR; syscall IIFFParse 232;
function Make_ID(Str: string): LongWord;
implementation
function Make_ID(Str: string): LongWord;
begin
Make_ID := 0;
if Length(Str) >= 4 then
Make_ID := (LongWord(Ord(Str[1])) shl 24) or
(LongWord(Ord(Str[2])) shl 16) or
(LongWord(Ord(Str[3])) shl 8) or
(LongWord(Ord(Str[4])));
end;
const
{ Change LIBVERSION to proper values }
LIBVERSION : longword = 0;
initialization
IFFParseBase := OpenLibrary(IFFPARSENAME,LIBVERSION);
if Assigned(IFFParseBase) then
IIFFParse := GetInterface(PLibrary(IFFParseBase), 'main', 1, nil);
finalization
if Assigned(IIFFParse) then
DropInterface(IIFFParse);
if Assigned(IFFParseBase) then
CloseLibrary(IFFParseBase);
end.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,231 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 2016 by Free Pascal development team
keymap.library functions for Amiga OS 4.x
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.
**********************************************************************}
{$PACKRECORDS 2}
unit keymap;
interface
uses
exec, inputevent;
type
PKeyMap = ^TKeyMap;
TKeyMap = record
km_LoKeyMapTypes: PByte;
km_LoKeyMap: PLongWord;
km_LoCapsable: PByte;
km_LoRepeatable: PByte;
km_HiKeyMapTypes: PByte;
km_HiKeyMap: PLongWord;
km_HiCapsable: PByte;
km_HiRepeatable: PByte;
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
// Some useful definitions for rawkey codes which are assumed
// to be the same on all keyboards so no call of MapRawKey()
//is necessary. These are the keydown codes only.
RAWKEY_SPACE = $40;
RAWKEY_BACKSPACE = $41;
RAWKEY_TAB = $42;
RAWKEY_ENTER = $43; // Numeric pad
RAWKEY_RETURN = $44;
RAWKEY_ESC = $45;
RAWKEY_DEL = $46;
RAWKEY_INSERT = $47; // Not on classic keyboards
RAWKEY_PAGEUP = $48; // Not on classic keyboards
RAWKEY_PAGEDOWN = $49; // Not on classic keyboards
RAWKEY_F11 = $4B; // Not on classic keyboards
RAWKEY_CRSRUP = $4C;
RAWKEY_CRSRDOWN = $4D;
RAWKEY_CRSRRIGHT = $4E;
RAWKEY_CRSRLEFT = $4F;
RAWKEY_F1 = $50;
RAWKEY_F2 = $51;
RAWKEY_F3 = $52;
RAWKEY_F4 = $53;
RAWKEY_F5 = $54;
RAWKEY_F6 = $55;
RAWKEY_F7 = $56;
RAWKEY_F8 = $57;
RAWKEY_F9 = $58;
RAWKEY_F10 = $59;
RAWKEY_HELP = $5F;
RAWKEY_LSHIFT = $60;
RAWKEY_RSHIFT = $61;
RAWKEY_CAPSLOCK = $62;
RAWKEY_LCTRL = $63; // Right Ctrl is the same for now
RAWKEY_LALT = $64;
RAWKEY_RALT = $65;
RAWKEY_LCOMMAND = $66; // LAmiga|LWin|LApple|LMeta
RAWKEY_RCOMMAND = $67; // RAmiga|RWin|RApple|RMeta
RAWKEY_MENU = $6B; // Not on classic keyboards
// Menu|Win|Compose
// Dont use, its reserved
RAWKEY_PRINTSCR = $6D; // Not on classic keyboards
RAWKEY_BREAK = $6E; // Not on classic keyboards
// Pause/Break
RAWKEY_F12 = $6F; // Not on classic keyboards
RAWKEY_HOME = $70; // Not on classic keyboards
RAWKEY_END = $71; // Not on classic keyboards
{ The following keys can exist on CDTV, CD32 and "multimedia" keyboards:
Rawkey |CD32 color&key |CDTV key |Comment
---------------+-------------------+----------+-----------
= $72 Stop |Blue Stop |Stop |
= $73 Play/Pause|Grey Play/Pause|Play/Pause|
= $74 Prev Track|Charcoal Reverse |<< REW |
= $75 Next Track|Charcoal Forward |>> FF |
= $76 Shuffle |Green Shuffle | |Random Play
= $77 Repeat |Yellow Repeat | |}
RAWKEY_MEDIA_STOP = $72;
RAWKEY_MEDIA_PLAY_PAUSE = $73;
RAWKEY_MEDIA_PREV_TRACK = $74;
RAWKEY_MEDIA_NEXT_TRACK = $75;
RAWKEY_MEDIA_SHUFFLE = $76;
RAWKEY_MEDIA_REPEAT = $77;
// Extended raw keys (via IECLASS_EXTENDEDRAWKEY)
RAWKEY_F13 = $0103;
RAWKEY_F14 = $0104;
RAWKEY_F15 = $0105;
// Tags for keymap.library/ObtainKeyMapInfo()
KEYMAPINFO_KEYMAPNODE = TAG_USER + 0; // (struct KeyMapNode *)
KEYMAPINFO_GETCLASSICKEYBOARD = TAG_USER + 1; // Private, dont use
KEYMAPINFO_SETCLASSICKEYBOARD = TAG_USER + 2; // Private, dont use
// The following tags were added in V51
KEYMAPINFO_INFOTEXT_ENGLISH = TAG_USER + 3; // (^STRPTR)
KEYMAPINFO_INFOTEXT_LOCAL = TAG_USER + 4; // (^STRPTR)
KEYMAPINFO_INFOTEXT_CHARSET = TAG_USER + 5; // (PLongWord)
KEYMAPINFO_CLASSIC_ONLY = TAG_USER + 6; // (PLongWord)
KEYMAPINFO_PC_ONLY = TAG_USER + 7; // (PLongWord)
KEYMAPINFO_SETCHARSET = TAG_USER + 8; // (LongWord)
// Tags for keymap.library/ObtainRawKeyInfo() (V51.7)
RKI_SET_TYPE = TAG_USER + 0; // (LongWord)
RKI_SET_VALUE = TAG_USER + 1; // (LongWord)
RKI_GET_RAWKEY = TAG_USER + 2; // (PLongWord)
RKI_GET_EXT_RAWKEY = TAG_USER + 3; // (PLongWord)
RKI_GET_PS2_SET1 = TAG_USER + 4; // (PLongWord)
RKI_GET_PS2_SET2 = TAG_USER + 5; // (PLongWord)
RKI_GET_USB = TAG_USER + 6; // (PLongWord)
RKI_GET_FLAGS = TAG_USER + 7; // (PLongWord)
RKI_GET_NAME = TAG_USER + 8; // (^STRPTR)
// Types for RKI_SET_TYPE
RKITYPE_RAWKEY = 1; // Amiga 8bit rawkey code
RKITYPE_EXT_RAWKEY = 2; // Amiga 16bit extended rawkey code
RKITYPE_PS2_SET1 = 3; // PS/2 Set1 make or break code
RKITYPE_PS2_SET2 = 4; // PS/2 Set2 make or break code
RKITYPE_USB = 5; // USB HID Usage page and ID code (down)
RKITYPE_USB_UPCODE = 6; // USB HID Usage page and ID code (up)
// Tags for keymap.library/KeyMapControlTagList() (V53.8)
KMCTRL_SetAltAmigaSwap = TAG_USER + 0; // (BOOL)
KMCTRL_GetAltAmigaSwap = TAG_USER + 1; // (PBOOL)
var
KeymapBase: PLibrary = nil;
const
KEYMAPNAME: PChar = 'keymap.library';
IKeymap: PInterface = nil;
function KeymapObtain(): LongWord; syscall IKeymap 60;
function KeymapRelease(): LongWord; syscall IKeymap 64;
procedure KeymapExpunge(); syscall IKeymap 68;
function KeymapClone(): PInterface; syscall IKeymap 72;
procedure SetKeyMapDefault(KeyMap: PKeyMap); syscall IKeymap 76;
function AskKeyMapDefault: PKeyMap; syscall IKeymap 80;
function MapRawKey(Event: PInputEvent; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap): SmallInt; syscall IKeymap 84;
function MapANSI(TheString: PChar; Count: LongInt; Buffer: PChar; Length: LongInt; KeyMap: PKeyMap): LongInt; syscall IKeymap 88;
function OpenKeyMapHandleA(const Filename: STRPTR; const TagList: PTagItem): APTR; syscall IKeymap 92;
// 96 OpenKeyMapHandle
procedure CloseKeyMapHandle(Handle: APTR); syscall IKeymap 100;
function ObtainKeyMapInfoA(Handle: APTR; const TagList: PTagItem): APTR; syscall IKeymap 104;
// 108 ObtainKeyMapInfo
function ReleaseKeyMapInfoA(Handle: APTR; const TagList: PTagItem): APTR; syscall IKeymap 112;
// 116 ReleaseKeyMapInfoA
function ObtainRawKeyInfoA(const TagList: PTagItem): APTR; syscall IKeymap 120;
// 124 ObtainRawKeyInfo
function KeyMapControlTagList(const TagList: PTagItem): APTR; syscall IKeymap 128;
// KeyMapControlTags
implementation
const
{ Change VERSION and LIBVERSION to proper values }
LIBVERSION: LongWord = 0;
initialization
KeymapBase := OpenLibrary(KEYMAPNAME,LIBVERSION);
if Assigned(KeymapBase) then
IKeymap := GetInterface(PLibrary(KeymapBase), 'main', 1, nil);
finalization
if Assigned(IKeymap) then
DropInterface(IKeymap);
if Assigned(KeymapBase) then
CloseLibrary(KeymapBase);
end.

View File

@ -7,16 +7,16 @@ uses fpmkunit;
procedure add_rtl_console(const ADirectory: string);
Const
Const
// All Unices have full set of KVM+Crt in unix/ except QNX which is not
// in workable state atm.
UnixLikes = AllUnixOSes -[QNX];
WinEventOSes = [win32,win64];
KVMAll = [emx,go32v2,netware,netwlibc,os2,win32,win64,win16]+UnixLikes+AllAmigaLikeOSes;
// all full KVMers have crt too, except Amigalikes
CrtOSes = KVMALL+[msdos,WatCom]-[aros,morphos];
CrtOSes = KVMALL+[msdos,WatCom]-[aros,morphos,amiga];
KbdOSes = KVMALL+[msdos];
VideoOSes = KVMALL;
MouseOSes = KVMALL;
@ -41,16 +41,16 @@ begin
P.License := 'LGPL with modification, ';
P.HomepageURL := 'www.freepascal.org';
P.OSes:=Rtl_ConsoleOSes;
if Defaults.CPU=powerpc then
P.OSes:=P.OSes-[amiga];
P.Email := '';
P.Description := 'Rtl-console, console abstraction';
P.NeedLibC:= false;
P.Dependencies.Add('rtl-extra'); // linux,android gpm.
P.Dependencies.Add('morphunits',[morphos]);
P.Dependencies.Add('arosunits',[aros]);
P.Dependencies.Add('amunits',[amiga]);
if Defaults.CPU=m68k then
P.Dependencies.Add('amunits',[amiga]);
if Defaults.CPU=powerpc then
P.Dependencies.Add('os4units',[amiga]);
P.SourcePath.Add('src/inc');
P.SourcePath.Add('src/$(OS)');
P.SourcePath.Add('src/darwin',[iphonesim]);
@ -111,7 +111,7 @@ begin
AddUnit('video');
end
end;
{$ifndef ALLPACKAGES}
begin
add_rtl_console('');

View File

@ -131,14 +131,14 @@ 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
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
In windowed mode it returns a window with another kind of
settings then when it has to reside on it's own customscreen.
*)
function _OpenWindowTags(a: Pointer; tags: array of PtrUInt): pWindow;
@ -181,8 +181,8 @@ begin
WA_BackDrop , 1,
WA_FLAGS , VIDEO_WFLG_DEFAULTS,
WA_IDCMP , VIDEO_IDCMP_DEFAULTS
]);
end else
]);
end else
begin // Windowed Mode
GetWindow:=_OpenWindowTags(nil, [
WA_Left , LastL,
@ -251,13 +251,13 @@ begin
// the screen in both directions. Try to be as accurate as possible.
if FPC_VIDEO_FULLSCREEN then
begin
// just to make sure that we are going to use the window width
// and height instead of the screen dimensions.
// just to make sure that we are going to use the window width
// and height instead of the screen dimensions.
// This is to circumvent that the window (or virtual window from
// vision based on characters pixels * characters in both
// 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 its
// Can happen for instance when the window does not hide its
// borders or titlebar as intended.
ScreenWidth := VideoWindow^.GZZWidth div 8;
ScreenHeight := VideoWindow^.GZZHeight div 16;
@ -280,7 +280,7 @@ begin
{ viewpostcolormap info }
videoColorMap := pScreen(videoWindow^.WScreen)^.ViewPort.ColorMap;
for Counter := 0 to 15 do
for Counter := 0 to 15 do
begin
VideoPens[Counter] := ObtainBestPenA(VideoColorMap,
vgacolors[counter, 0] shl 24, vgacolors[counter, 1] shl 24, vgacolors[counter, 2] shl 24, nil);
@ -709,7 +709,7 @@ begin
winT:=PChar(PtrInt(-1))
else
winT:=PChar(globWinT);
if globScreenT = '' then
if globScreenT = '' then
screenT:=PChar(PtrInt(-1))
else
screenT:=PChar(globScreenT);
@ -777,4 +777,4 @@ finalization
FreeBitmap(BufRp^.Bitmap);
FreeRastPort(BufRp);
{$endif}
end.
end.

View File

@ -47,7 +47,7 @@ procedure InitSemaphore(sigSem: PSignalSemaphore); syscall IExec 364;
procedure ObtainSemaphore(sigSem: PSignalSemaphore); syscall IExec 368;
procedure ObtainSemaphoreShared(sigSem: PSignalSemaphore); syscall IExec 376;
procedure ReleaseSemaphore(sigSem: PSignalSemaphore); syscall IExec 388;
procedure ReleaseSemaphore(sigSem: PSignalSemaphore); syscall IExec 384;
function OpenLibrary(name: PChar; version: longword): PLibrary; syscall IExec 424;
function CloseLibrary(_library: PLibrary): Pointer; syscall IExec 428;
@ -61,5 +61,4 @@ function CloseDevice(ioRequest: PIORequest): Pointer; syscall IExec 508;
function DoIO(ioRequest: PIORequest): shortint; syscall IExec 528;
{$WARNING FIXME: the offset is dummy, was too lazy to calculate for now }
procedure RawPutChar(d0arg: Char); syscall IExec 4096;
procedure RawPutChar(c: Char); syscall IExec 760;