diff options
| author | Pietro Gagliardi <[email protected]> | 2014-02-28 19:34:18 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-02-28 19:34:18 -0500 |
| commit | fabddf9e0ecfe5097b1cf0c8a9724cbf4e533e13 (patch) | |
| tree | 8b19ea7204c19be9a61b5a4e0c0877ab43390737 /darwintest/bleh_darwin.go | |
| parent | 8af591388f3bc0295ba196135452e29e845925a8 (diff) | |
Added a .m file to handle the edge cases in objc_msgSend() wrappers that cannot be easily expressed otherwise.
Diffstat (limited to 'darwintest/bleh_darwin.go')
| -rw-r--r-- | darwintest/bleh_darwin.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/darwintest/bleh_darwin.go b/darwintest/bleh_darwin.go new file mode 100644 index 0000000..79fe4d3 --- /dev/null +++ b/darwintest/bleh_darwin.go @@ -0,0 +1,27 @@ +// 28 february 2014 +package main + +/* +These are wrapper functions for the functions in bleh_darwin.m to wrap around stdint.h type casting. + +This will eventually be expanded to include the other Objective-C runtime support functions. +*/ + +// #cgo LDFLAGS: -lobjc -framework Foundation +// #include "objc_darwin.h" +import "C" + +func objc_msgSend_rect(obj C.id, sel C.SEL, x int, y int, w int, h int) C.id { + return C._objc_msgSend_rect(obj, sel, + C.int64_t(x), C.int64_t(y), C.int64_t(w), C.int64_t(h)) +} + +func objc_msgSend_uint(obj C.id, sel C.SEL, a uintptr) C.id { + return C._objc_msgSend_uint(obj, sel, C.uintptr_t(a)) +} + +func objc_msgSend_rect_uint_uint_bool(obj C.id, sel C.SEL, x int, y int, w int, h int, b uintptr, c uintptr, d C.BOOL) C.id { + return C._objc_msgSend_rect_uint_uint_bool(obj, sel, + C.int64_t(x), C.int64_t(y), C.int64_t(w), C.int64_t(h), + C.uintptr_t(b), C.uintptr_t(c), d) +} |
