Exemple #1
0
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)))
}
Exemple #2
0
// const gchar* gtk_check_version (guint   required_major,
//                                 guint   required_minor,
//                                 guint   required_micro);
func CheckVersion(required_major, required_minor,
	required_micro uint32) string {
	ret := C.gtk_check_version(C.guint(required_major),
		C.guint(required_minor),
		C.guint(required_micro))
	if ret == nil {
		return ""
	}
	s := C.GoString((*C.char)(ret))
	return s
}