mirror of
https://github.com/bluszcz/cutego.git
synced 2024-09-28 21:25:16 +03:00
47435cc1dd
* js/wasm GOCACHE fix for Go 1.12+ * make use of the official Go 1.12 wasm build and replace js.NewCallback with js.FuncOf * update docker images to Go 1.12.4 * revive raspberry images * fix raspberry related bundling issue * add the multimedia module to the raspberry images * fix raspberry related QT_API issue * remove unecessary *char to []byte copy overhead in some unlikely cases * fix Qt install script * initial partially support for Felgo (former V-Play) on darwin * fix charts/audio example and darwin * fix common/widgets_demo example on iOS (issue #451) * fix widgets/renderer memory leak * fix possible QT_PKG_CONFIG + QT_VERSION race condition * fix static linux docker image
25 lines
426 B
Go
25 lines
426 B
Go
// +build js,wasm
|
|
|
|
package qt
|
|
|
|
import (
|
|
"syscall/js"
|
|
"unsafe"
|
|
)
|
|
|
|
func init() {
|
|
WASM.Set("_callbackReleaseTypedArray", js.FuncOf(func(_ js.Value, args []js.Value) interface{} {
|
|
(*js.TypedArray)(unsafe.Pointer(uintptr(args[0].Int()))).Release()
|
|
return nil
|
|
}))
|
|
}
|
|
|
|
var Global = js.Global()
|
|
var Module = Global.Call("eval", "Module")
|
|
|
|
//TODO: func MakeWrapper(i interface{}) *js.Value
|
|
|
|
//
|
|
|
|
var WASM = Module //TODO: remove
|