VT_Player/third_party/gotk3/glib/glib_export.go
Stu d4efa91ce1 Add vendored gotk3 GTK3 bindings for Go
Vendor gotk3 library to ensure consistent GTK3 bindings across
environments and simplify dependency management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:40:43 -05:00

28 lines
704 B
Go

package glib
// #cgo pkg-config: gio-2.0
// #include <gio/gio.h>
import "C"
import (
"unsafe"
"github.com/gotk3/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)))
}