mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 08:08:13 +02:00

* tw34438 failed with -O3, fixes also dfa for inline functions returning results as "complex" parameter git-svn-id: trunk@40202 -
43 lines
765 B
ObjectPascal
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.
|