summaryrefslogtreecommitdiff
path: root/darwintest/objc_darwin.go
blob: 79fe4d377ab82b45b063459a0ff1ff8237ce9d93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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)
}