VT_Player/third_party/gotk3/gtk/version.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

30 lines
531 B
Go

package gtk
// #include <gtk/gtk.h>
import "C"
import "errors"
func CheckVersion(major, minor, micro uint) error {
errChar := C.gtk_check_version(C.guint(major), C.guint(minor), C.guint(micro))
if errChar == nil {
return nil
}
return errors.New(C.GoString((*C.char)(errChar)))
}
func GetMajorVersion() uint {
v := C.gtk_get_major_version()
return uint(v)
}
func GetMinorVersion() uint {
v := C.gtk_get_minor_version()
return uint(v)
}
func GetMicroVersion() uint {
v := C.gtk_get_micro_version()
return uint(v)
}