Moved toBOOL() from sysdata_darwin.go to objc_darwin.go since it's used by other Mac OS X files too.

This commit is contained in:
Pietro Gagliardi 2014-05-16 20:29:16 -04:00
parent 8ce1555ca2
commit 6d67bce9b1
2 changed files with 7 additions and 8 deletions

View File

@ -22,6 +22,13 @@ func fromNSString(str C.id) string {
return C.GoString(C.fromNSString(str)) 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. // 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 { func newScrollView(content C.id) C.id {

View File

@ -48,14 +48,6 @@ func controlHide(what C.id) {
C.controlHide(what) 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. // By default some controls do not use the correct font.
// These functions set the appropriate control 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. // 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.