Exemplo n.º 1
0
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)
}
Exemplo n.º 2
0
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)
}