From 6d67bce9b18ab01d99f636068ab5652857749c32 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 16 May 2014 20:29:16 -0400 Subject: [PATCH] Moved toBOOL() from sysdata_darwin.go to objc_darwin.go since it's used by other Mac OS X files too. --- objc_darwin.go | 7 +++++++ sysdata_darwin.go | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/objc_darwin.go b/objc_darwin.go index a94e13a..2d20076 100644 --- a/objc_darwin.go +++ b/objc_darwin.go @@ -22,6 +22,13 @@ func fromNSString(str C.id) string { return C.GoString(C.fromNSString(str)) } +func toBOOL(what bool) C.BOOL { + if what { + return C.YES + } + return C.NO +} + // These consolidate the NSScrollView code (used by listbox_darwin.go and area_darwin.go) into a single place. func newScrollView(content C.id) C.id { diff --git a/sysdata_darwin.go b/sysdata_darwin.go index 1f9370c..b240e70 100644 --- a/sysdata_darwin.go +++ b/sysdata_darwin.go @@ -48,14 +48,6 @@ func controlHide(what C.id) { C.controlHide(what) } -// TODO move to objc_darwin.go unless the only thing that uses it is alternate -func toBOOL(what bool) C.BOOL { - if what { - return C.YES - } - return C.NO -} - // By default some controls do not use the correct font. // These functions set the appropriate control font. // Which one is used on each control was determined by comparing https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Characteristics/Characteristics.html#//apple_ref/doc/uid/TP40002721-SW10 to what Interface Builder says for each control.