From 3b9e26ab38cab5718f8ca370afd53141511beb78 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 28 Feb 2014 12:09:15 -0500 Subject: [PATCH] Added a button bezel style to the darwintest button. --- darwintest/runtimetest.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/darwintest/runtimetest.go b/darwintest/runtimetest.go index e6854a9..9145a74 100644 --- a/darwintest/runtimetest.go +++ b/darwintest/runtimetest.go @@ -23,6 +23,7 @@ import ( // id objc_msgSend_id(id obj, SEL sel, id a) { return objc_msgSend(obj, sel, a); } // id objc_msgSend_NSRect(id obj, SEL sel, CGRect a) { return objc_msgSend(obj, sel, a); } // id objc_msgSend_sel(id obj, SEL sel, SEL a) { return objc_msgSend(obj, sel, a); } +// id objc_msgSend_uint(id obj, SEL sel, NSUInteger a) { return objc_msgSend(obj, sel, a); } // Class NilClass = Nil; /* for newtypes.go */ import "C" @@ -68,6 +69,10 @@ const ( NSBackingStoreBuffered = 2 ) +const ( + NSRoundedBezelStyle = 1 +) + var alloc = sel_getUid("alloc") func main() { @@ -109,6 +114,9 @@ func main() { C.objc_msgSend_sel(button, sel_getUid("setAction:"), sel_getUid("buttonClicked:")) + C.objc_msgSend_uint(button, + sel_getUid("setBezelStyle:"), + C.NSUInteger(NSRoundedBezelStyle)) C.objc_msgSend_id(windowView, sel_getUid("addSubview:"), button)