+ some new converted header files added

This commit is contained in:
florian 1998-08-05 21:47:21 +00:00
parent c14b7e966b
commit 0ecb4adcc5
8 changed files with 133 additions and 3 deletions

5
rtl/palmos/api/font.imn Normal file
View File

@ -0,0 +1,5 @@
function FntIsAppDefined(fnt : FontID) : boolean;
begin
FntIsAppDefined:=longint(fnt)>=longint(fntAppFontCustomBase);
end;

52
rtl/palmos/api/font.inc Normal file
View File

@ -0,0 +1,52 @@
type
FontCharInfoType = record
offset : SByte;
width : SByte;
end;
FontType = record
fontType : SWord;
firstChar : SWord;
lastChar : SWord;
maxWidth : SWord;
kernMax : SWord;
nDescent : SWord;
fRectWidth : SWord;
fRectHeight : SWord;
owTLoc : SWord;
ascent : SWord;
descent : SWord;
leading : SWord;
rowWords : SWord;
end;
FontPtr = ^FontType;
FontTablePtr = ^FontPtr;
fontID = (stdFont := $00,boldFont,largeFont,symbolFont,
symbol11Font,symbol7Font,ledFont,largeBoldFont,
fntAppFontCustomBase := $80);
const
checkboxFont = symbol11Font;
function FntIsAppDefined(fnt : FontID) : boolean;
function FntGetFont:FontID;systrap sysTrapFntGetFont;
function FntSetFont(font:FontID):FontID;systrap sysTrapFntSetFont;
function FntGetFontPtr:FontPtr;systrap sysTrapFntGetFontPtr;
function FntBaseLine:SWord;systrap sysTrapFntBaseLine;
function FntCharHeight:SWord;systrap sysTrapFntCharHeight;
function FntLineHeight:SWord;systrap sysTrapFntLineHeight;
function FntAverageCharWidth:SWord;systrap sysTrapFntAverageCharWidth;
function FntCharWidth(ch:Char):SWord;systrap sysTrapFntCharWidth;
function FntCharsWidth(chars:pChar; len:Word):SWord;systrap sysTrapFntCharsWidth;
procedure FntCharsInWidth(string:pChar; stringWidthP:pSWord; stringLengthP:pSWord; fitWithinWidth:pBoolean);systrap sysTrapFntCharsInWidth;
function FntDescenderHeight:SWord;systrap sysTrapFntDescenderHeight;
function FntLineWidth(pChars:pChar; length:Word):SWord;systrap sysTrapFntLineWidth;
function FntWordWrap(chars:pChar; maxWidth:Word):Word;systrap sysTrapFntWordWrap;
procedure FntWordWrapReverseNLines(chars:pChar; maxWidth:Word; linesToScrollP:WordPtr; scrollPosP:WordPtr);systrap sysTrapFntWordWrapReverseNLines;
procedure FntGetScrollValues(chars:pChar; width:Word; scrollPos:Word; linesP:WordPtr; topLine:WordPtr);systrap sysTrapFntGetScrollValues;
function FntDefineFont(font:FontID; fontP:FontPtr):Err;systrap sysTrapFntDefineFont;

View File

@ -0,0 +1 @@
function FontSelect(fontID:FontID):FontID;systrap sysTrapFontSelect;

2
rtl/palmos/api/init.inc Normal file
View File

@ -0,0 +1,2 @@
procedure UIInitialize;systrap sysTrapUIInitialize;
procedure UIReset;systrap sysTrapUIReset;

View File

@ -1,3 +1,6 @@
This directory contains the interface units for the PalmOS.
Renaming scheme (because of the 8.3 DOS limitation):
---------------------------------------------------
systemmgr --> sysmgr
fontselect --> fontsel

27
rtl/palmos/api/rect.inc Normal file
View File

@ -0,0 +1,27 @@
type
AbsRectType = record
left : SWord;
top : SWord;
right : SWord;
bottom : SWord;
end;
PointType = record
x : SWord;
y : SWord;
end;
RectangleType = record
topLeft : PointType;
extent : PointType;
end;
RectanglePtr = ^RectangleType;
procedure RctSetRectangle(r:RectanglePtr; left:SWord; top:SWord; width:SWord; height:SWord);systrap sysTrapRctSetRectangle;
procedure RctCopyRectangle(srcRect:RectanglePtr; dstRect:RectanglePtr);systrap sysTrapRctCopyRectangle;
procedure RctInsetRectangle(r:RectanglePtr; insetAmt:SWord);systrap sysTrapRctInsetRectangle;
procedure RctOffsetRectangle(r:RectanglePtr; deltaX:SWord; deltaY:SWord);systrap sysTrapRctOffsetRectangle;
function RctPtInRectangle(x:SWord; y:SWord; r:RectanglePtr):Boolean;systrap sysTrapRctPtInRectangle;
procedure RctGetIntersection(r1:RectanglePtr; r2:RectanglePtr; r3:RectanglePtr);systrap sysTrapRctGetIntersection;

View File

@ -24,12 +24,16 @@ unit sysall;
{ include trap number definitions }
{$I systraps.inc}
{$I sysmgr.inc}
implementation
end.
{
$Log$
Revision 1.1 1998-08-05 17:19:07 florian
+ first few things for PalmOS support
Revision 1.2 1998-08-05 21:47:22 florian
+ some new converted header files added
Revision 1.1 1998/08/05 17:19:07 florian
+ first few things for PalmOS support
}

36
rtl/palmos/api/ui.pp Normal file
View File

@ -0,0 +1,36 @@
{
$Id$
This file is part of the Free Pascal run time library.
Copyright (c) 1998 Florian Klaempfl
member of the Free Pascal 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 ui;
interface
{$I init.inc}
{$I rect.inc}
{$I font.inc}
{$I fontsel.inc}
implementation
{$I font.imn}
end.
{
$Log$
Revision 1.1 1998-08-05 21:47:23 florian
+ some new converted header files added
}