Correct some typing issues for upcoming FPC 2.7.1 trunk commit
Original Reporter info from Mantis: jonas@freepascal.org
-
Reporter name: Jonas Maebe
Original Reporter info from Mantis: jonas@freepascal.org
- Reporter name: Jonas Maebe
Description:
The univint interfaces (MacOSAll) in FPC trunk will soon be updated. The primary change is that the headers were updated to the Mac OS X 10.8 SDK, but in addition a number of types that used to be simply pointers to longint have been changed to be pointers to different opaque records. As a result, the compiler will now complain when such types are mixed.
I've attached a patch to fix these issues in Lazarus. Regarding the HIObject/ControlRef, see http://lists.apple.com/archives/carbon-dev/2007/Jan/msg00665.html (on short: it's completely safe to cast those types to each other, but they are different and also in C require typecasts).
There is one "major" change, in carbonobject.inc:
- Target := GetWindowEventTarget(Widget.Widget)
+ Target := GetWindowEventTarget(TCarbonWindow(Widget).Window)
I think the original code was wrong: GetWindowEventTarget needs a WindowRef, and as far as I can tell the windowref of a TCarbonWindow is stored in its fwindowref field, which is accessible via its Window property. But Maybe I'm wrong and the parameter has to be changed into WindowRef(Widget.Widget) instead.
Mantis conversion info:
- Mantis ID: 23254
- OS: Mac OS X
- OS Build: 10.6.8
- Build: 38335
- Platform: Darwin
- Version: 1.1 (SVN)
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 39214 (#8309b61d)