* Layout and copyright updates.

This commit is contained in:
daniel 1999-06-11 13:16:19 +00:00
parent 5c2a5a30ce
commit 4674146d94
2 changed files with 1332 additions and 1300 deletions

View File

@ -2,44 +2,68 @@
$Id$
Copyright (c) 1993,94,99 by FK, RB
Copyright (c) 1993,94 by Florian Klaempfl
Copyright (c) 1999 by Ramon Bosque
The Free Pascal runtime library is distributed under the Library GNU Public
License v2. So is this unit. The Library GNU Public License requires you to
distribute the source code of this unit with any product that uses it.
Because the EMX library isn't under the LGPL, we grant you an exception to
this, and that is, when you compile a program with the Free Pascal compiler,
you do not need to ship source code with that program, AS LONG AS YOU ARE
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
line:
<This an official, unmodified FPK Pascal source code file.>
Send us your modified files, we can work together if you want!
FPK-Pascal 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. See the
Library GNU General Public License for more details.
You should have received a copy of the Library GNU General Public License
along with Free Pascal; see the file COPYING.LIB. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
****************************************************************************}
unit pmbitmap;
{Warning: This code is alfa. Future versions of this unit will propably
not be compatible.}
interface
{$PACKRECORDS 1}
type
BITMAPINFOHEADER = record
type Tbitmapinfoheader=record
cbFix:cardinal;
cx:word;
cy:word;
cPlanes:word;
cBitCount:word;
end;
Pbitmapinfoheader = ^Tbitmapinfoheader;
PBITMAPINFOHEADER = ^BITMAPINFOHEADER;
RGB = record
bBlue : BYTE;
bGreen : BYTE;
Trgb=record
bBlue,
bGreen,
bRed:BYTE;
end;
BITMAPINFO = record
Tbitmapinfo=record
cbFix:cardinal;
cx:word;
cy:word;
cPlanes:word;
cBitCount:word;
argbColor : array[0..1-1] of RGB;
argbColor:array[0..1-1] of Trgb;
end;
Pbitmapinfo=^Tbitmapinfo;
PBITMAPINFO = ^BITMAPINFO;
BITMAPINFOHEADER2 = record
Tbitmapinfoheader2=record
cbFix:cardinal;
cx:cardinal;
cy:cardinal;
@ -60,19 +84,17 @@ unit pmbitmap;
ulColorEncoding:cardinal;
ulIdentifier:cardinal;
end;
Pbitmapinfoheader2=^Tbitmapinfoheader2;
PBITMAPINFOHEADER2 = ^BITMAPINFOHEADER2;
RGB2 = record
bBlue : BYTE;
bGreen : BYTE;
bRed : BYTE;
fcOptions : BYTE;
Trgb2=record
bBlue,
bGreen,
bRed,
fcOptions:byte;
end;
Prgb2=^Trgb2;
PRGB2 = ^RGB2;
BITMAPINFO2 = record
Tbitmapinfo2=record
cbFix:cardinal;
cx:cardinal;
cy:cardinal;
@ -92,63 +114,56 @@ unit pmbitmap;
cSize2:cardinal;
ulColorEncoding:cardinal;
ulIdentifier:cardinal;
argbColor : array[0..1-1] of RGB2;
argbColor:array[0..1-1] of Trgb2;
end;
Pbitmapinfo2=^Tbitmapinfo2;
PBITMAPINFO2 = ^BITMAPINFO2;
BITMAPFILEHEADER = record
Tbitmapfileheader=record
usType:word;
cbSize:cardinal;
xHotspot:integer;
yHotspot:integer;
offBits:cardinal;
bmp : BITMAPINFOHEADER;
bmp:Tbitmapinfoheader;
end;
PBITMAPFILEHEADER = ^BITMAPFILEHEADER;
Pbitmapfileheader=^Tbitmapfileheader;
BITMAPARRAYFILEHEADER = record
Tbitmaparrayfileheader=record
usType:word;
cbSize:cardinal;
offNext:cardinal;
cxDisplay:word;
cyDisplay:word;
bfh : BITMAPFILEHEADER;
bfh:Tbitmapfileheader;
end;
Pbitmaparrayfileheader=^Tbitmaparrayfileheader;
PBITMAPARRAYFILEHEADER = ^BITMAPARRAYFILEHEADER;
BITMAPFILEHEADER2 = record
Tbitmapfileheader2=record
usType:word;
cbSize:cardinal;
xHotspot:integer;
yHotspot:integer;
offBits:cardinal;
bmp2 : BITMAPINFOHEADER2;
bmp2:Tbitmapinfoheader2;
end;
Pbitmapfileheader2=^Tbitmapfileheader2;
PBITMAPFILEHEADER2 = ^BITMAPFILEHEADER2;
BITMAPARRAYFILEHEADER2 = record
Tbitmaparrayfileheader2=record
usType:word;
cbSize:cardinal;
offNext:cardinal;
cxDisplay:word;
cyDisplay:word;
bfh2 : BITMAPFILEHEADER2;
bfh2:Tbitmapfileheader2;
end;
PBITMAPARRAYFILEHEADER2 = ^BITMAPARRAYFILEHEADER2;
Pbitmaparrayfileheader2=^Tbitmaparrayfileheader2;
{$PACKRECORDS NORMAL}
const
CBD_COMPRESSION = 1;
const CBD_COMPRESSION = 1;
CBD_DECOMPRESSION = 2;
CBD_BITS = 0;
CBD_COLOR_CONVERSION = $00000001;
CBD_COLOR_CONVERSION =$0000001;
BCA_UNCOMP = 0;
BCA_HUFFMAN1D = 3;
BCA_RLE4 = 2;
@ -176,7 +191,10 @@ unit pmbitmap;
end.
{
$Log$
Revision 1.3 1999-06-02 16:01:31 hajny
Revision 1.4 1999-06-11 13:16:21 daniel
* Layout and copyright updates.
Revision 1.3 1999/06/02 16:01:31 hajny
* changes by Ramon Bosque
}

View File

@ -4,20 +4,51 @@
Copyright (c) 1993,94,99 by FK, RB
PMGPI interface unit
FPC Pascal Runtime Library for OS/2
Copyright (c) 1993,94 by Florian Kl„mpfl
Copyright (c) 1999 by Ramon Bosque
The FPK-Pascal runtime library is distributed under the Library GNU Public
License v2. So is this unit. The Library GNU Public License requires you to
distribute the source code of this unit with any product that uses it.
Because the EMX library isn't under the LGPL, we grant you an exception to
this, and that is, when you compile a program with the FPK Pascal compiler,
you do not need to ship source code with that program, AS LONG AS YOU ARE
USING UNMODIFIED CODE! If you modify this code, you MUST change the next
line:
<This an official, unmodified FPK Pascal source code file.>
Send us your modified files, we can work together if you want!
FPK-Pascal 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. See the
Library GNU General Public License for more details.
You should have received a copy of the Library GNU General Public License
along with FPK-Pascal; see the file COPYING.LIB. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
****************************************************************************}
{Warning: This code is alfa. Future versions of this unit will propably
not be compatible.}
unit pmgpi;
interface
uses
os2def,pmbitmap;
uses os2def,pmbitmap;
const
GPI_ERROR = 0;
const GPI_ERROR = 0;
GPI_OK = 1;
GPI_ALTERROR = (-1);
CLR_NOINDEX = (-254);
PU_ARBITRARY = $0004;
PU_PELS = $0008;
PU_LOMETRIC = $000C;
@ -134,37 +165,39 @@ unit pmgpi;
PC_EXPLICIT = $02;
PC_NOCOLLAPSE = $04;
CLR_FALSE = (-5);
CLR_TRUE = (-4);
CLR_ERROR = (-255);
CLR_DEFAULT = (-3);
CLR_WHITE = (-2);
CLR_BLACK = (-1);
CLR_BACKGROUND = 0;
CLR_BLUE = 1;
CLR_RED = 2;
CLR_PINK = 3;
CLR_GREEN = 4;
CLR_CYAN = 5;
CLR_YELLOW = 6;
CLR_NEUTRAL = 7;
CLR_DARKGRAY = 8;
CLR_DARKBLUE = 9;
CLR_DARKRED = 10;
CLR_DARKPINK = 11;
CLR_DARKGREEN = 12;
CLR_DARKCYAN = 13;
CLR_BROWN = 14;
CLR_PALEGRAY = 15;
RGB_ERROR = (-255);
RGB_BLACK = $00000000;
RGB_BLUE = $000000FF;
RGB_GREEN = $0000FF00;
RGB_CYAN = $0000FFFF;
RGB_RED = $00FF0000;
RGB_PINK = $00FF00FF;
RGB_YELLOW = $00FFFF00;
RGB_WHITE = $00FFFFFF;
CLR_false = (-5);
CLR_true = (-4);
CLR_error = (-255);
CLR_default = (-3);
CLR_white = (-2);
CLR_black = (-1);
CLR_background = 0;
CLR_blue = 1;
CLR_red = 2;
CLR_pink = 3;
CLR_green = 4;
CLR_cyan = 5;
CLR_yellow = 6;
CLR_neutral = 7;
CLR_darkgray = 8;
CLR_darkblue = 9;
CLR_darkred = 10;
CLR_darkpink = 11;
CLR_darkgreen = 12;
CLR_darkcyan = 13;
CLR_brown = 14;
CLR_palegray = 15;
RGB_error = (-255);
RGB_black = $00000000;
RGB_blue = $000000FF;
RGB_green = $0000FF00;
RGB_cyan = $0000FFFF;
RGB_red = $00FF0000;
RGB_pink = $00FF00FF;
RGB_yellow = $00FFFF00;
RGB_white = $00FFFFFF;
BA_NOBOUNDARY = 0;
BA_BOUNDARY = $0001;
BA_ALTERNATE = 0;
@ -511,51 +544,41 @@ unit pmgpi;
POLYGON_EXCL = 0;
POLYGON_INCL = $0008;
type
SIZEL = record
cx : longint;
cy : longint;
type sizel=record
cx,cy:longint;
end;
PSIZEL = ^SIZEL;
Psizel=^sizel;
MATRIXLF = record
fxM11 : longint;
fxM12 : longint;
lM13 : longint;
fxM21 : longint;
fxM22 : longint;
lM23 : longint;
lM31 : longint;
lM32 : longint;
lM33 : longint;
matrixlf=record
fxm11 : longint;
fxm12 : longint;
lm13 : longint;
fxm21 : longint;
fxm22 : longint;
lm23 : longint;
lm31 : longint;
lm32 : longint;
lm33 : longint;
end;
PMATRIXLF = ^MATRIXLF;
Pmatrixlf=^matrixlf;
ARCPARAMS = record
lP : longint;
lQ : longint;
lR : longint;
lS : longint;
arcparams=record
lp,lq,lr,ls:longint;
end;
Parcparams=^arcparams;
PARCPARAMS = ^ARCPARAMS;
SIZEF = record
cx : longint;
cy : longint;
sizef=record
cx,cy:longint;
end;
Psizef=^sizef;
PSIZEF = ^SIZEF;
GRADIENTL = record
x : longint;
y : longint;
gradientl=record
x,y:longint;
end;
Pgradientl=^gradientl;
PGRADIENTL = ^GRADIENTL;
LINEBUNDLE = record
linebundle=record
lColor:longint;
lBackColor:longint;
usMixMode:word;
@ -567,112 +590,100 @@ unit pmgpi;
usJoin:word;
usReserved:word;
end;
Plinebundle=^linebundle;
PLINEBUNDLE = ^LINEBUNDLE;
CHARBUNDLE = record
charbundle=record
lColor:longint;
lBackColor:longint;
usMixMode:word;
usBackMixMode:word;
usSet:word;
usPrecision:word;
sizfxCell : SIZEF;
ptlAngle : POINTL;
ptlShear : POINTL;
sizfxCell:sizef;
ptlAngle:pointl;
ptlShear:pointl;
usDirection:word;
usTextAlign:word;
fxExtra:longint;
fxBreakExtra:longint;
end;
Pcharbundle=^charbundle;
PCHARBUNDLE = ^CHARBUNDLE;
MARKERBUNDLE = record
markerbundle=record
lColor:longint;
lBackColor:longint;
usMixMode:word;
usBackMixMode:word;
usSet:word;
usSymbol:word;
sizfxCell : SIZEF;
sizfxCell:sizef;
end;
Pmarkerbundle=^markerbundle;
PMARKERBUNDLE = ^MARKERBUNDLE;
AREABUNDLE = record
areabundle=record
lColor:longint;
lBackColor:longint;
usMixMode:word;
usBackMixMode:word;
usSet:word;
usSymbol:word;
ptlRefPoint : POINTL;
ptlRefPoint:pointl;
end;
Pareabundle=^areabundle;
PAREABUNDLE = ^AREABUNDLE;
IMAGEBUNDLE = record
imagebundle=record
lColor:longint;
lBackColor:longint;
usMixMode:word;
usBackMixMode:word;
end;
Pimagebundle=^imagebundle;
PIMAGEBUNDLE = ^IMAGEBUNDLE;
KERNINGPAIRS = record
kerningpairs=record
sFirstChar:integer;
sSecondChar:integer;
lKerningAmount:longint;
end;
Pkerningpairs=^kerningpairs;
PKERNINGPAIRS = ^KERNINGPAIRS;
FACENAMEDESC = record
facenamedesc=record
usSize:word;
usWeightClass:word;
usWidthClass:word;
usReserved:word;
flOptions:cardinal;
end;
Pfacenamedesc=^facenamedesc;
PFACENAMEDESC = ^FACENAMEDESC;
ffdescs=array[0..1,0..facesize-1] of char;
Pffdescs=^ffdescs;
FFDESCS = array[0..1,0..FACESIZE-1] of char;
PFFDESCS = ^FFDESCS;
FFDESCS2 = record
ffdescs2=record
cbLength:cardinal;
cbFacenameOffset:cardinal;
abFamilyName : array[0..1-1] of BYTE;
abFamilyName:array[0..1-1] of byte;
end;
Pffdescs2=^ffdescs2;
PFFDESCS2 = ^FFDESCS2;
RGNRECT = record
rgnrect=record
ircStart:cardinal;
crc:cardinal;
crcReturned:cardinal;
ulDirection:cardinal;
end;
Prgnrect=^rgnrect;
PRGNRECT = ^RGNRECT;
POLYGON = record
polygon=record
ulPoints:cardinal;
aPointl : PPOINTL;
aPointl:Ppointl;
end;
Ppolygon=^polygon;
PPOLYGON = ^POLYGON;
POLYSET = record
polyset=record
ulPolys:cardinal;
aPolygon : array[0..1-1] of POLYGON;
aPolygon:array[0..1-1] of polygon;
end;
PPOLYSET = ^POLYSET;
Ppolyset=^polyset;
function GpiCreatePS(hab,hdc : cardinal;var psizlSize : SIZEL;flOptions : cardinal) : cardinal;cdecl;
function GpiDestroyPS(hps : cardinal) : longbool;cdecl;
@ -886,20 +897,20 @@ unit pmgpi;
function GpiLoadBitmap(hps,Resource,idBitmap : cardinal;lWidth,lHeight : longint) : cardinal; cdecl;
function GpiSetBitmap(hps,hbm : cardinal) : cardinal; cdecl;
function GpiWCBitBlt(hpsTarget,hbmSource : cardinal;lCount : longint;var aptlPoints : POINTL;lRop : longint;flOptions : cardinal) : longint; cdecl;
function GpiCreateBitmap(hps : cardinal;var pbmpNew : BITMAPINFOHEADER2;flOptions : cardinal;var pbInitData : BYTE;var pbmiInfoTable : BITMAPINFO2) : cardinal; cdecl;
function GpiSetBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable : BITMAPINFO2) : longint; cdecl;
function GpiCreateBitmap(hps : cardinal;var pbmpNew : Tbitmapinfoheader2;flOptions : cardinal;var pbInitData : BYTE;var pbmiInfoTable : Tbitmapinfo2) : cardinal; cdecl;
function GpiSetBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable : Tbitmapinfo2) : longint; cdecl;
function GpiSetBitmapDimension(hbm : cardinal;var psizlBitmapDimension : SIZEL) : longbool; cdecl;
function GpiSetBitmapId(hps,hbm : cardinal;lLcid : longint) : longbool; cdecl;
function GpiQueryBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable : BITMAPINFO2) : longint; cdecl;
function GpiQueryBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable :Tbitmapinfo2) : longint; cdecl;
function GpiQueryBitmapDimension(hbm : cardinal;var psizlBitmapDimension : SIZEL) : longbool; cdecl;
function GpiQueryBitmapHandle(hps : cardinal;lLcid : longint) : cardinal; cdecl;
function GpiQueryBitmapParameters(hbm : cardinal;var pbmpData : BITMAPINFOHEADER) : longbool; cdecl;
function GpiQueryBitmapInfoHeader(hbm : cardinal;var pbmpData : BITMAPINFOHEADER2) : longbool; cdecl;
function GpiQueryBitmapParameters(hbm : cardinal;var pbmpData : Tbitmapinfoheader) : longbool; cdecl;
function GpiQueryBitmapInfoHeader(hbm : cardinal;var pbmpData : Tbitmapinfoheader2) : longbool; cdecl;
function GpiQueryDeviceBitmapFormats(hps : cardinal;lCount : longint;var alArray : longint) : longbool; cdecl;
function GpiSetPel(hps : cardinal;var pptlPoint : POINTL) : longint; cdecl;
function GpiQueryPel(hps : cardinal;var pptlPoint : POINTL) : longint; cdecl;
function GpiFloodFill(hps : cardinal;lOptions,lColor : longint) : longint; cdecl;
function GpiDrawBits(hps : cardinal;pBits : pointer;var pbmiInfoTable : BITMAPINFO2;lCount : longint;var aptlPoints : POINTL;lRop : longint;flOptions : cardinal) : longint; cdecl;
function GpiDrawBits(hps : cardinal;pBits : pointer;var pbmiInfoTable :Tbitmapinfo2;lCount : longint;var aptlPoints : POINTL;lRop : longint;flOptions : cardinal) : longint; cdecl;
function GpiCombineRegion(hps,hrgnDest,hrgnSrc1,hrgnSrc2 : cardinal;lMode : longint) : longint; cdecl;
function GpiCreateRegion(hps : cardinal;lCount : longint;var arclRectangles : RECTL) : cardinal; cdecl;
function GpiDestroyRegion(hps,hrgn : cardinal) : longbool; cdecl;
@ -1150,20 +1161,20 @@ unit pmgpi;
function GpiLoadBitmap(hps,Resource,idBitmap:cardinal;lWidth,lHeight : longint) : cardinal; cdecl; external 'pmgpi' index 399;
function GpiSetBitmap(hps,hbm : cardinal) : cardinal; cdecl; external 'pmgpi' index 506;
function GpiWCBitBlt(hpsTarget,hbmSource : cardinal;lCount : longint;var aptlPoints : POINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; external 'pmgpi' index 557;
function GpiCreateBitmap(hps : cardinal;var pbmpNew : BITMAPINFOHEADER2;flOptions : cardinal;var pbInitData : BYTE;var pbmiInfoTable : BITMAPINFO2) : cardinal; cdecl; external 'pmgpi' index 598;
function GpiSetBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable : BITMAPINFO2) : longint; cdecl; external 'pmgpi' index 602;
function GpiCreateBitmap(hps : cardinal;var pbmpNew :Tbitmapinfoheader2;flOptions : cardinal;var pbInitData : BYTE;var pbmiInfoTable :Tbitmapinfo2) : cardinal; cdecl; external 'pmgpi' index 598;
function GpiSetBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable :Tbitmapinfo2) : longint; cdecl; external 'pmgpi' index 602;
function GpiSetBitmapDimension(hbm : cardinal;var psizlBitmapDimension : SIZEL) : longbool; cdecl; external 'pmgpi' index 507;
function GpiSetBitmapId(hps,hbm : cardinal;lLcid : longint) : longbool; cdecl; external 'pmgpi' index 508;
function GpiQueryBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable : BITMAPINFO2) : longint; cdecl; external 'pmgpi' index 599;
function GpiQueryBitmapBits(hps : cardinal;lScanStart,lScans : longint;var pbBuffer : BYTE;var pbmiInfoTable :Tbitmapinfo2) : longint; cdecl; external 'pmgpi' index 599;
function GpiQueryBitmapDimension(hbm : cardinal;var psizlBitmapDimension : SIZEL) : longbool; cdecl; external 'pmgpi' index 426;
function GpiQueryBitmapHandle(hps : cardinal;lLcid : longint) : cardinal; cdecl; external 'pmgpi' index 427;
function GpiQueryBitmapParameters(hbm : cardinal;var pbmpData : BITMAPINFOHEADER) : longbool; cdecl; external 'pmgpi' index 573;
function GpiQueryBitmapInfoHeader(hbm : cardinal;var pbmpData : BITMAPINFOHEADER2) : longbool; cdecl; external 'pmgpi' index 601;
function GpiQueryBitmapParameters(hbm : cardinal;var pbmpData :Tbitmapinfoheader) : longbool; cdecl; external 'pmgpi' index 573;
function GpiQueryBitmapInfoHeader(hbm : cardinal;var pbmpData :Tbitmapinfoheader2) : longbool; cdecl; external 'pmgpi' index 601;
function GpiQueryDeviceBitmapFormats(hps : cardinal;lCount : longint;var alArray : longint) : longbool; cdecl; external 'pmgpi' index 445;
function GpiSetPel(hps : cardinal;var pptlPoint : POINTL) : longint; cdecl; external 'pmgpi' index 544;
function GpiQueryPel(hps : cardinal;var pptlPoint : POINTL) : longint; cdecl; external 'pmgpi' index 476;
function GpiFloodFill(hps : cardinal;lOptions,lColor : longint) : longint; cdecl; external 'pmgpi' index 560;
function GpiDrawBits(hps : cardinal;pBits : pointer;var pbmiInfoTable : BITMAPINFO2;lCount : longint;var aptlPoints : POINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; external 'pmgpi' index 603;
function GpiDrawBits(hps : cardinal;pBits : pointer;var pbmiInfoTable :Tbitmapinfo2;lCount : longint;var aptlPoints : POINTL;lRop : longint;flOptions : cardinal) : longint; cdecl; external 'pmgpi' index 603;
function GpiCombineRegion(hps,hrgnDest,hrgnSrc1,hrgnSrc2 : cardinal;lMode : longint) : longint; cdecl; external 'pmgpi' index 362;
function GpiCreateRegion(hps : cardinal;lCount : longint;var arclRectangles : RECTL) : cardinal; cdecl; external 'pmgpi' index 370;
function GpiDestroyRegion(hps,hrgn : cardinal) : longbool; cdecl; external 'pmgpi' index 611;
@ -1203,7 +1214,10 @@ unit pmgpi;
end.
{
$Log$
Revision 1.4 1999-06-02 16:01:33 hajny
Revision 1.5 1999-06-11 13:16:19 daniel
* Layout and copyright updates.
Revision 1.4 1999/06/02 16:01:33 hajny
* changes by Ramon Bosque
}