2 Star 0 Fork 0

scpro / gotk3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
glib_export.go 703 Bytes
一键复制 编辑 原始数据 按行查看 历史
英杰 提交于 2021-12-13 10:33 . 升级代码
package glib
// #cgo pkg-config: gio-2.0
// #include <gio/gio.h>
import "C"
import (
"unsafe"
"gitee.com/scpro/gotk3/internal/callback"
)
//export goAsyncReadyCallbacks
func goAsyncReadyCallbacks(sourceObject *C.GObject, res *C.GAsyncResult, userData C.gpointer) {
var source *Object
if sourceObject != nil {
source = wrapObject(unsafe.Pointer(sourceObject))
}
fn := callback.Get(uintptr(userData)).(AsyncReadyCallback)
fn(source, wrapAsyncResult(wrapObject(unsafe.Pointer(res))))
}
//export goCompareDataFuncs
func goCompareDataFuncs(a, b C.gconstpointer, userData C.gpointer) C.gint {
fn := callback.Get(uintptr(userData)).(CompareDataFunc)
return C.gint(fn(uintptr(a), uintptr(b)))
}
1
https://gitee.com/scpro/gotk3.git
git@gitee.com:scpro/gotk3.git
scpro
gotk3
gotk3
v1.0.1

搜索帮助