diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-30 19:53:44 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-30 19:53:44 -0400 |
| commit | 6a7cb73ddaa92a87fb4df77a7a3f3c2332f8761f (patch) | |
| tree | aec15845b480cee8528f104a5685fccf54327780 /bleh_darwin.m | |
| parent | 41a7e3dab8193d8c19aa43eac344eb274deef5a8 (diff) | |
Added key events to Mac OS X Areas. Now Area is feature-complete (but buggy) on all platforms :D Also more TODOs.
Diffstat (limited to 'bleh_darwin.m')
| -rw-r--r-- | bleh_darwin.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bleh_darwin.m b/bleh_darwin.m index 48f0ae7..720da0f 100644 --- a/bleh_darwin.m +++ b/bleh_darwin.m @@ -67,6 +67,15 @@ id objc_msgSend_id_int(id obj, SEL sel, id a, intptr_t b) } /* +same as above, but for unsigned short +*/ + +uintptr_t objc_msgSend_ushortret_noargs(id obj, SEL sel) +{ + return (uintptr_t) ((unsigned short) objc_msgSend(obj, sel)); +} + +/* These are the objc_msgSend() wrappers around NSRect. The problem is that while on 32-bit systems, NSRect is a concrete structure, on 64-bit systems it's just a typedef to CGRect. While in practice just using CGRect everywhere seems to work, better to be safe than sorry. 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. |
