Brian Buller
17cfbbc5fe
* Caching the day's events (for 6 hours) * Up the Calendar List Cache expiration to a week * Setting things up for a 'UI' mode
25 lines
419 B
Go
25 lines
419 B
Go
package main
|
|
|
|
import "github.com/jroimartin/gocui"
|
|
|
|
type screen interface {
|
|
getGoCuiGui() *gocui.Gui
|
|
updateViews(*gocui.Gui)
|
|
layoutManger(*gocui.Gui) error
|
|
addView(string, int, int, int, int)
|
|
}
|
|
|
|
type position struct {
|
|
// value = pct * MAX + abs
|
|
pct float32
|
|
abs int
|
|
}
|
|
|
|
func (p position) getCoordinate(max int) int {
|
|
return int(p.pct*float32(max)) + p.abs
|
|
}
|
|
|
|
type viewPosition struct {
|
|
x0, y0, x1, y1 position
|
|
}
|