From d2f09a02225281fbd30fe068f228ca0f3fd26471 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 18 Jul 2014 00:22:21 -0400 Subject: Fixed all the remaining compiler errors. C conversion works! --- redo/controls_windows.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'redo/controls_windows.go') diff --git a/redo/controls_windows.go b/redo/controls_windows.go index a553144..ec2f827 100644 --- a/redo/controls_windows.go +++ b/redo/controls_windows.go @@ -3,8 +3,6 @@ package ui import ( - "fmt" - "syscall" "unsafe" ) @@ -15,7 +13,7 @@ type widgetbase struct { hwnd C.HWND } -func newWidget(class C.LPCWSTR, style uintptr, extstyle uintptr) *widgetbase { +func newWidget(class C.LPCWSTR, style C.DWORD, extstyle C.DWORD) *widgetbase { return &widgetbase{ hwnd: C.newWidget(class, style, extstyle), } @@ -43,7 +41,7 @@ func (w *widgetbase) text() *Request { } } -func (w *widgetbase) settext(text string, results ...t_LRESULT) *Request { +func (w *widgetbase) settext(text string) *Request { c := make(chan interface{}) return &Request{ op: func() { @@ -99,13 +97,6 @@ func (b *button) SetText(text string) *Request { return b.settext(text) } -var buttonsubprocptr uintptr - -// to avoid recursive initialization loop -func init() { - buttonsubprocptr = syscall.NewCallback(buttonSubProc) -} - //export buttonClicked func buttonClicked(data unsafe.Pointer) { b := (*button)(data) -- cgit v1.2.3