From 3ade409ddebc48f9960415816d2f4439c6d5d4ae Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 29 Jun 2014 14:08:01 -0400 Subject: [PATCH] FIxed compilation errors in the Mac OS X build. It works, but I still need to fix dialogs before I can push anything. --- dialog_darwin.m | 2 +- sysdata_darwin.go | 6 +++--- uitask_darwin.go | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dialog_darwin.m b/dialog_darwin.m index cd4e684..226ad4b 100644 --- a/dialog_darwin.m +++ b/dialog_darwin.m @@ -9,7 +9,7 @@ #define to(T, x) ((T *) (x)) #define toNSWindow(x) to(NSWindow, (x)) -static void alert(id parent, NSString *primary, NSString *secondary, NSAlertStyle style) +static intptr_t alert(id parent, NSString *primary, NSString *secondary, NSAlertStyle style) { NSAlert *box; diff --git a/sysdata_darwin.go b/sysdata_darwin.go index 687f81e..cd25748 100644 --- a/sysdata_darwin.go +++ b/sysdata_darwin.go @@ -308,15 +308,15 @@ func (s *sysData) len() int { } func (s *sysData) setAreaSize(width int, height int) { - return C.setAreaSize(s.id, C.intptr_t(width), C.intptr_t(height)) + C.setAreaSize(s.id, C.intptr_t(width), C.intptr_t(height)) } func (s *sysData) repaintAll() { - return C.display(s.id) + C.display(s.id) } func (s *sysData) center() { - return C.center(s.id) + C.center(s.id) } func (s *sysData) setChecked(checked bool) { diff --git a/uitask_darwin.go b/uitask_darwin.go index 695b5c5..317cb12 100644 --- a/uitask_darwin.go +++ b/uitask_darwin.go @@ -4,7 +4,6 @@ package ui import ( "fmt" - "runtime" "unsafe" ) @@ -32,7 +31,7 @@ func ui() { go func() { for { select { - case f := range uitask: + case f := <-uitask: C.douitask(appDelegate, unsafe.Pointer(&f)) case <-Stop: C.breakMainLoop()