[fpc-devel] TRect and TPoint on OsX have different layout.

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Tue Jul 3 21:49:13 CEST 2007


On 7/3/07, Den Jean <Den.Jean at telenet.be> wrote:
> with different member names, there already is a defintion

Point is not the same things as TPoint

Also several files declare TPoint and Point.

Here is the declarations from types unit:

{$ifdef Windows}
  TPoint = Windows.TPoint;
{$else}
  TPoint =
{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
  packed
{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
  record
    X : Longint;
    Y : Longint;
  end;
{$endif}
  PPoint = ^TPoint;

My recomendation is to define a new point type on qt4.pas (TQPoint or
anything like that), make it compatible with what Qt expects and use
that.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list