forked from Leak_Technologies/VideoTools
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>
30 lines
531 B
Go
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)
|
|
}
|