Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-04

definition of TRect on Mac OS

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Den Jean

Hi,

in the Qt4 binding I do a direct copy of qrect into trect, therefore qrect and trect need to have the same binary layout.

For some reason the definition of trect on Mac Os X is different

qrect.h:
---------
#if defined(Q_OS_MAC)

    int y1;
    int x1;
    int y2;
    int x2;

#else

    int x1;
    int y1;
    int x2;
    int y2;

#endif
------------
I do not have a Mac, so I do not know why.
I guess for compatible with the OS API.
I only see that in FPC there is not a Mac specific TRect definition (types.pp)

Should there be one?
If not I will solve it in the binding, but perhaps it is a good idea to have TRect differently defined on mac (but breaking binary compatibility ...)

please just decide.

Den Jean

Reply by email