diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-01 13:58:38 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-01 13:58:38 -0500 |
| commit | 00243442d2ed438e1e581b00aae369a2eb9836d9 (patch) | |
| tree | 8b5bd359bed91685764b330db9314f3fdeb5f6da /bleh_darwin.m | |
| parent | 0770c2a6973e94b64e2a0cb8327f76acd23af799 (diff) | |
Fixed Mac OS X sysData.setWindowSize() to get the window origin. Now to fix the rest of the errors...
Diffstat (limited to 'bleh_darwin.m')
| -rw-r--r-- | bleh_darwin.m | 14 |
1 files changed, 14 insertions, 0 deletions
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) |
