diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-16 20:29:16 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-16 20:29:16 -0400 |
| commit | 6d67bce9b18ab01d99f636068ab5652857749c32 (patch) | |
| tree | 097a3634605d9021cdecae0b2053fcfe7091dc32 | |
| parent | 8ce1555ca25f8522cf5ed6fe3a2692d8b025d358 (diff) | |
Moved toBOOL() from sysdata_darwin.go to objc_darwin.go since it's used by other Mac OS X files too.
| -rw-r--r-- | objc_darwin.go | 7 | ||||
| -rw-r--r-- | 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. |
