fpc/tests/webtbs/tw34438.pp
florian 34d11046e0 * wrapcomplexinlinepara takes care of function results which need different temp. handling, resolves #34438
* tw34438 failed with -O3, fixes also dfa for inline functions returning results as "complex" parameter

git-svn-id: trunk@40202 -
2018-11-03 17:31:10 +00:00

43 lines
765 B
ObjectPascal

{%norun}
{$mode objfpc}
uses
types,math;
type
PGtkWidget = pointer;
PGtkNotebook = pointer;
function MyRect(Left,Top,Right,Bottom : Integer) : TRect; inline;
begin
MyRect.Left:=Left;
MyRect.Top:=Top;
MyRect.Right:=Right;
MyRect.Bottom:=Bottom;
end;
function GetWidgetClientRect(TheWidget: PGtkWidget): TRect;
var
Widget, ClientWidget: PGtkWidget;
AChild: PGtkWidget;
procedure GetNoteBookClientRect(NBWidget: PGtkNotebook);
var
PageIndex: LongInt;
PageWidget: PGtkWidget;
FrameBorders: TRect;
aWidth: LongInt;
aHeight: LongInt;
begin
Result:=MyRect(0,0,
Max(0,AWidth-FrameBorders.Left-FrameBorders.Right),
Max(0,aHeight-FrameBorders.Top-FrameBorders.Bottom));
end;
begin
end;
begin
end.