summaryrefslogtreecommitdiff
path: root/progressbar.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2018-08-26 09:55:07 -0400
committerPietro Gagliardi <[email protected]>2018-08-26 09:55:07 -0400
commit62ac2527732a01dfa6bd2c9523215c0ba3816641 (patch)
tree84244a69e048f79e4d9f134c121f4cf581200986 /progressbar.go
parenta5a00c644c08a6e0f52740c3f2a280977929a285 (diff)
Moved all the Go files out of the way again, this time so we can migrate them to more proper cgo usage.
Diffstat (limited to 'progressbar.go')
-rw-r--r--progressbar.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/progressbar.go b/progressbar.go
deleted file mode 100644
index f58976f..0000000
--- a/progressbar.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// 12 december 2015
-
-package ui
-
-import (
- "unsafe"
-)
-
-// #include "ui.h"
-import "C"
-
-// ProgressBar is a Control that represents a horizontal bar that
-// is filled in progressively over time as a process completes.
-type ProgressBar struct {
- ControlBase
- p *C.uiProgressBar
-}
-
-// NewProgressBar creates a new ProgressBar.
-func NewProgressBar() *ProgressBar {
- p := new(ProgressBar)
-
- p.p = C.uiNewProgressBar()
-
- p.ControlBase = NewControlBase(p, uintptr(unsafe.Pointer(p.p)))
- return p
-}
-
-// Value returns the value currently shown in the ProgressBar.
-func (p *ProgressBar) Value() int {
- return int(C.uiProgressBarValue(p.p))
-}
-
-// SetValue sets the ProgressBar's currently displayed percentage
-// to value. value must be between 0 and 100 inclusive, or -1 for
-// an indeterminate progressbar.
-func (p *ProgressBar) SetValue(value int) {
- C.uiProgressBarSetValue(p.p, C.int(value))
-}