glfw: Bug fix: Compilation error on Windows

This commit is contained in:
Hajime Hoshi 2019-01-09 10:34:54 +09:00
parent ae84e79d16
commit 28665cfc4b

View File

@ -203,6 +203,19 @@ func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallbac
return nil // TODO
}
func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous FramebufferSizeCallback) {
var gcb uintptr
if cbfun != nil {
gcb = windows.NewCallbackCDecl(func(window uintptr, width int, height int) uintptr {
cbfun(theGLFWWindows.get(window), width, height)
return 0
})
}
glfwDLL.call("glfwSetWindowSizeCallback", w.w, gcb)
panicError()
return nil // TODO
}
func (w *Window) SetIcon(images []image.Image) {
gimgs := make([]glfwImage, len(images))
defer runtime.KeepAlive(gimgs)