From 00243442d2ed438e1e581b00aae369a2eb9836d9 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 1 Mar 2014 13:58:38 -0500 Subject: Fixed Mac OS X sysData.setWindowSize() to get the window origin. Now to fix the rest of the errors... --- bleh_darwin.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bleh_darwin.m') diff --git a/bleh_darwin.m b/bleh_darwin.m index 699f177..5a2cbcf 100644 --- a/bleh_darwin.m +++ b/bleh_darwin.m @@ -29,6 +29,20 @@ These are the objc_msgSend() wrappers around NSRect. The problem is that while o I use int64_t for maximum safety, as my coordinates are stored as Go ints and Go int -> C int (which is what is documented as happening) isn't reliable. */ +struct xrect objc_msgSend_stret_rect_noargs(id obj, SEL sel) +{ + NSRect s; + struct xrect t; + + objc_msgSend_stret(&s, obj, sel); + t.x = (int64_t) s.origin.x; + t.y = (int64_t) s.origin.y; + t.width = (int64_t) s.size.width; + t.height = (int64_t) s.size.height; + return t; +} + + #define OurRect() (NSMakeRect((CGFloat) x, (CGFloat) y, (CGFloat) w, (CGFloat) h)) id _objc_msgSend_rect(id obj, SEL sel, int64_t x, int64_t y, int64_t w, int64_t h) -- cgit v1.2.3