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>
18 lines
313 B
Go
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))
|
|
}
|