summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2018-08-12 11:07:33 -0400
committerPietro Gagliardi <[email protected]>2018-08-12 11:07:33 -0400
commit925adc0782c4dd9b978a712b1b5645b5f31bf802 (patch)
tree66590ea495c0c680c3dfcd22a55896c864ad35a7 /window.go
parentcfea745dc745dcb0af8704d7cdb50d9725714b04 (diff)
Fixed build errors.
Diffstat (limited to 'window.go')
-rw-r--r--window.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/window.go b/window.go
index 784d485..a40ddd9 100644
--- a/window.go
+++ b/window.go
@@ -8,6 +8,8 @@ import (
// #include "ui.h"
// extern int doWindowOnClosing(uiWindow *, void *);
+// // see golang/go#19835
+// typedef int (*windowOnClosingCallback)(uiWindow *, void *);
import "C"
// Window is a Control that represents a top-level window.
@@ -29,7 +31,7 @@ func NewWindow(title string, width int, height int, hasMenubar bool) *Window {
w.w = C.uiNewWindow(ctitle, C.int(width), C.int(height), frombool(hasMenubar))
freestr(ctitle)
- C.uiWindowOnClosing(w.w, C.doWindowOnClosing, nil)
+ C.uiWindowOnClosing(w.w, C.windowOnClosingCallback(C.doWindowOnClosing), nil)
w.ControlBase = NewControlBase(w, uintptr(unsafe.Pointer(w.w)))
return w