* changes by Ramon Bosque

This commit is contained in:
Tomas Hajny 1999-06-02 16:01:29 +00:00
parent 6cf5f41dc7
commit 395ddade10
8 changed files with 3564 additions and 3416 deletions

View File

@ -1,24 +1,23 @@
{****************************************************************************
Copyright (c) 1993,94 by Florian Kl„mpfl
$Id$
Copyright (c) 1993,94,99 by FK, RB
****************************************************************************}
unit pmbitmap;
interface
uses
os2def;
{$PACKRECORDS 1}
type
BITMAPINFOHEADER = record
cbFix : ULONG;
cx : USHORT;
cy : USHORT;
cPlanes : USHORT;
cBitCount : USHORT;
cbFix : cardinal;
cx : word;
cy : word;
cPlanes : word;
cBitCount : word;
end;
PBITMAPINFOHEADER = ^BITMAPINFOHEADER;
@ -30,16 +29,121 @@ unit pmbitmap;
end;
BITMAPINFO = record
cbFix : ULONG;
cx : USHORT;
cy : USHORT;
cPlanes : USHORT;
cBitCount : USHORT;
cbFix : cardinal;
cx : word;
cy : word;
cPlanes : word;
cBitCount : word;
argbColor : array[0..1-1] of RGB;
end;
PBITMAPINFO = ^BITMAPINFO;
BITMAPINFOHEADER2 = record
cbFix : cardinal;
cx : cardinal;
cy : cardinal;
cPlanes : word;
cBitCount : word;
ulCompression : cardinal;
cbImage : cardinal;
cxResolution : cardinal;
cyResolution : cardinal;
cclrUsed : cardinal;
cclrImportant : cardinal;
usUnits : word;
usReserved : word;
usRecording : word;
usRendering : word;
cSize1 : cardinal;
cSize2 : cardinal;
ulColorEncoding : cardinal;
ulIdentifier : cardinal;
end;
PBITMAPINFOHEADER2 = ^BITMAPINFOHEADER2;
RGB2 = record
bBlue : BYTE;
bGreen : BYTE;
bRed : BYTE;
fcOptions : BYTE;
end;
PRGB2 = ^RGB2;
BITMAPINFO2 = record
cbFix : cardinal;
cx : cardinal;
cy : cardinal;
cPlanes : word;
cBitCount : word;
ulCompression : cardinal;
cbImage : cardinal;
cxResolution : cardinal;
cyResolution : cardinal;
cclrUsed : cardinal;
cclrImportant : cardinal;
usUnits : word;
usReserved : word;
usRecording : word;
usRendering : word;
cSize1 : cardinal;
cSize2 : cardinal;
ulColorEncoding : cardinal;
ulIdentifier : cardinal;
argbColor : array[0..1-1] of RGB2;
end;
PBITMAPINFO2 = ^BITMAPINFO2;
BITMAPFILEHEADER = record
usType : word;
cbSize : cardinal;
xHotspot : integer;
yHotspot : integer;
offBits : cardinal;
bmp : BITMAPINFOHEADER;
end;
PBITMAPFILEHEADER = ^BITMAPFILEHEADER;
BITMAPARRAYFILEHEADER = record
usType : word;
cbSize : cardinal;
offNext : cardinal;
cxDisplay : word;
cyDisplay : word;
bfh : BITMAPFILEHEADER;
end;
PBITMAPARRAYFILEHEADER = ^BITMAPARRAYFILEHEADER;
BITMAPFILEHEADER2 = record
usType : word;
cbSize : cardinal;
xHotspot : integer;
yHotspot : integer;
offBits : cardinal;
bmp2 : BITMAPINFOHEADER2;
end;
PBITMAPFILEHEADER2 = ^BITMAPFILEHEADER2;
BITMAPARRAYFILEHEADER2 = record
usType : word;
cbSize : cardinal;
offNext : cardinal;
cxDisplay : word;
cyDisplay : word;
bfh2 : BITMAPFILEHEADER2;
end;
PBITMAPARRAYFILEHEADER2 = ^BITMAPARRAYFILEHEADER2;
{$PACKRECORDS NORMAL}
const
CBD_COMPRESSION = 1;
CBD_DECOMPRESSION = 2;
@ -59,118 +163,20 @@ unit pmbitmap;
BCE_PALETTE = (-1);
BCE_RGB = 0;
type
BITMAPINFOHEADER2 = record
cbFix : ULONG;
cx : ULONG;
cy : ULONG;
cPlanes : USHORT;
cBitCount : USHORT;
ulCompression : ULONG;
cbImage : ULONG;
cxResolution : ULONG;
cyResolution : ULONG;
cclrUsed : ULONG;
cclrImportant : ULONG;
usUnits : USHORT;
usReserved : USHORT;
usRecording : USHORT;
usRendering : USHORT;
cSize1 : ULONG;
cSize2 : ULONG;
ulColorEncoding : ULONG;
ulIdentifier : ULONG;
end;
PBITMAPINFOHEADER2 = ^BITMAPINFOHEADER2;
RGB2 = record
bBlue : BYTE;
bGreen : BYTE;
bRed : BYTE;
fcOptions : BYTE;
end;
PRGB2 = ^RGB2;
BITMAPINFO2 = record
cbFix : ULONG;
cx : ULONG;
cy : ULONG;
cPlanes : USHORT;
cBitCount : USHORT;
ulCompression : ULONG;
cbImage : ULONG;
cxResolution : ULONG;
cyResolution : ULONG;
cclrUsed : ULONG;
cclrImportant : ULONG;
usUnits : USHORT;
usReserved : USHORT;
usRecording : USHORT;
usRendering : USHORT;
cSize1 : ULONG;
cSize2 : ULONG;
ulColorEncoding : ULONG;
ulIdentifier : ULONG;
argbColor : array[0..1-1] of RGB2;
end;
PBITMAPINFO2 = ^BITMAPINFO2;
BITMAPFILEHEADER = record
usType : USHORT;
cbSize : ULONG;
xHotspot : SHORT;
yHotspot : SHORT;
offBits : ULONG;
bmp : BITMAPINFOHEADER;
end;
PBITMAPFILEHEADER = ^BITMAPFILEHEADER;
BITMAPARRAYFILEHEADER = record
usType : USHORT;
cbSize : ULONG;
offNext : ULONG;
cxDisplay : USHORT;
cyDisplay : USHORT;
bfh : BITMAPFILEHEADER;
end;
PBITMAPARRAYFILEHEADER = ^BITMAPARRAYFILEHEADER;
BITMAPFILEHEADER2 = record
usType : USHORT;
cbSize : ULONG;
xHotspot : SHORT;
yHotspot : SHORT;
offBits : ULONG;
bmp2 : BITMAPINFOHEADER2;
end;
PBITMAPFILEHEADER2 = ^BITMAPFILEHEADER2;
BITMAPARRAYFILEHEADER2 = record
usType : USHORT;
cbSize : ULONG;
offNext : ULONG;
cxDisplay : USHORT;
cyDisplay : USHORT;
bfh2 : BITMAPFILEHEADER2;
end;
PBITMAPARRAYFILEHEADER2 = ^BITMAPARRAYFILEHEADER2;
const
BFT_ICON = $4349;
BFT_BMAP = $4d42;
BFT_POINTER = $5450;
BFT_COLORICON = $4943;
BFT_COLORPOINTER = $5043;
BFT_BITMAPARRAY = $4142;
{$PACKRECORDS NORMAL}
implementation
end.
{
$Log$
Revision 1.3 1999-06-02 16:01:31 hajny
* changes by Ramon Bosque
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

12
rtl/os2/tests/PMDEMO1.DEF Normal file
View File

@ -0,0 +1,12 @@
NAME PMDEMO1 WINDOWAPI
PROTMODE
DESCRIPTION 'Compiled by FPKPascal'
DATA MULTIPLE
STACKSIZE 8096
HEAPSIZE 8096
EXPORTS _CLIENTWNDPROC$HWND$LONGINT$MPARAM$MPARAM

13
rtl/os2/tests/PMDEMO1.H Normal file
View File

@ -0,0 +1,13 @@
/*******************************************
Header f<EFBFBD>r den Ressourcecompiler
********************************************/
#define ID_ClientWindow 1
/*
$Log$
Revision 1.1 1999-06-02 16:01:35 hajny
* changes by Ramon Bosque
*/

View File

@ -0,0 +1,6 @@
pmdemo1.exe: pmdemo1.pp pmdemo1.res
ppc -Dow -Ch8096 -Cs8096 pmdemo1.pp
rc pmdemo1.res
pmdemo1.res: pmdemo1.rc
rc -r pmdemo1

75
rtl/os2/tests/PMDEMO1.PP Normal file
View File

@ -0,0 +1,75 @@
{****************************************************************************
Copyright (c) 1993,94 by Florian Kl„mpfl
****************************************************************************}
{ Demonstrationsprogramm zu FPKPascal unter OS/2 }
{ traditionelles Hello world-Porgamm (PM-Version) }
program pmdemo1;
uses
os2def,pmwin;
var
frame,client : cardinal;
ab : cardinal;
mq : cardinal;
msg : QMSG;
const
frameflags : longint = FCF_TITLEBAR+FCF_SYSMENU+FCF_SIZEBORDER+
FCF_MINBUTTON+FCF_MAXBUTTON+FCF_SHELLPOSITION+
FCF_TASKLIST+FCF_MENU;
function clientwndproc(window : cardinal;msg : longint;mp1,mp2 : cardinal) :
cardinal;export;
const
text = 'Hello world by OS/2 and FPKPascal';
var
ps : cardinal;
rcl : RECTL;
begin
{clientwndproc:=nil; }
case msg of
{WM_CREATE : DosBeep(200,500);}
WM_PAINT : begin
ps:=WinBeginPaint(window,0,nil);
WinQueryWindowRect(window,@rcl);
WinDrawText(ps,-1,text,@rcl,0,7,$8500);
WinEndPaint(ps);
end;
WM_COMMAND : case lo(longint(mp1)) of
{101 : DosBeep(4500,1000);}
109 : WinPostMsg(0,WM_QUIT,nil,nil);
201 : WinMessageBox(cardinal(1),cardinal(1),
'HelloPM von FPKPascal',
'šber',0,MB_ICONEXCLAMATION+MB_MOVEABLE);
end;
else
clientwndproc:=WinDefWindowProc(window,msg,mp1,mp2);
end;
end;
begin
ab:=WinInitialize(0);
mq:=WinCreateMsgQueue(ab,0);
WinRegisterClass(ab,'HELLOPM',@clientwndproc,4,0);
frame:=WinCreateStdWindow(cardinal(1),WS_VISIBLE,@frameflags,'HELLOPM',
'PMDemo 1',WS_VISIBLE,0,1,@client);
while (WinGetMsg(ab,@msg,0,0,0)<>0) do
WinDispatchMsg(ab,@msg);
WinDestroyWindow(frame);
WinDestroyMsgQueue(mq);
WinTerminate(ab);
end.
{
$Log$
Revision 1.1 1999-06-02 16:01:35 hajny
* changes by Ramon Bosque
}

24
rtl/os2/tests/PMDEMO1.RC Normal file
View File

@ -0,0 +1,24 @@
/******************
* Name : TEXT.RC *
******************/
#include "PMDEMO1.H"
MENU ID_ClientWindow
BEGIN
SUBMENU "~File",100
BEGIN
MENUITEM "~Open...",101
MENUITEM "~Exit",109
END
SUBMENU "~Help",200
BEGIN
MENUITEM "~About...",201
END
END
/*
$Log$
Revision 1.1 1999-06-02 16:01:35 hajny
* changes by Ramon Bosque
*/