diff options
| -rw-r--r-- | bleh_darwin.m | 15 | ||||
| -rw-r--r-- | objc_darwin.h | 7 |
2 files changed, 22 insertions, 0 deletions
diff --git a/bleh_darwin.m b/bleh_darwin.m index f24806c..7b10134 100644 --- a/bleh_darwin.m +++ b/bleh_darwin.m @@ -44,3 +44,18 @@ id _objc_msgSend_rect_uint_uint_bool(id obj, SEL sel, int64_t x, int64_t y, int6 { return objc_msgSend(obj, sel, OurRect(), (NSUInteger) b, (NSUInteger) c, d); } + +/* +Same as NSRect above, but for NSSize now. +*/ + +struct xsize objc_msgSend_stret_size_noargs(id obj, SEL sel) +{ + NSSize s; + struct xsize t; + + objc_msgSend_stret(&s, obj, sel); + t.width = (int64_t) s.width; + t.height = (int64_t) s.height; + return t; +} diff --git a/objc_darwin.h b/objc_darwin.h index 171d260..242b605 100644 --- a/objc_darwin.h +++ b/objc_darwin.h @@ -21,6 +21,13 @@ inline id objc_msgSend_noargs(id obj, SEL sel) return objc_msgSend(obj, sel); } +struct xsize { + int64_t width; + int64_t height; +}; + +extern struct xsize objc_msgsSend_stret_size_noargs(id obj, SEL sel); + #define m1(name, type1) \ inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \ { \ |
