func (p *progressbar) SetPercent(percent int) { if percent < 0 || percent > 100 { panic(fmt.Errorf("given ProgressBar percentage %d out of range", percent)) } C.gtk_progress_bar_set_fraction(p.pbar, C.gdouble(percent)/100) }
func gtk_progress_bar_set_fraction(w *C.GtkWidget, percent int) { p := C.gdouble(percent) / 100 C.gtk_progress_bar_set_fraction(togtkprogressbar(w), p) }