VideoTools/third_party/gotk3/glib/quark.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

18 lines
313 B
Go

package glib
import (
"unsafe"
)
// #include <glib.h>
// #include <stdlib.h>
import "C"
// QuarkFromString is a wrapper around g_quark_from_string().
func QuarkFromString(str string) Quark {
cstr := (*C.gchar)(C.CString(str))
defer C.free(unsafe.Pointer(cstr))
return Quark(C.g_quark_from_string(cstr))
}