ui

package
v2.0.2-50+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2015 License: MIT Imports: 29 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChannelServicesContinuous

func GetChannelServicesContinuous(thingType string, protocol string, filter func(thing *model.Thing) bool, cb func([]*ninja.ServiceClient, error))

func StartSearchTasks

func StartSearchTasks(c *ninja.Connection)

Types

type CertPane

type CertPane struct {
	// contains filtered or unexported fields
}

func NewCertPane

func NewCertPane(conn bus.Bus) *CertPane

func (*CertPane) Gesture

func (p *CertPane) Gesture(gesture *gestic.GestureMessage)

func (*CertPane) IsDirty

func (p *CertPane) IsDirty() bool

func (*CertPane) IsEnabled

func (p *CertPane) IsEnabled() bool

func (*CertPane) KeepAwake

func (p *CertPane) KeepAwake() bool

func (*CertPane) Render

func (p *CertPane) Render() (*image.RGBA, error)

func (*CertPane) StartRssi

func (p *CertPane) StartRssi(conn bus.Bus)

type ClockPane

type ClockPane struct {
	// contains filtered or unexported fields
}

func NewClockPane

func NewClockPane() *ClockPane

func (*ClockPane) DoAlarm

func (p *ClockPane) DoAlarm()

func (*ClockPane) Gesture

func (p *ClockPane) Gesture(gesture *gestic.GestureMessage)

func (*ClockPane) IsDirty

func (p *ClockPane) IsDirty() bool

func (*ClockPane) IsEnabled

func (p *ClockPane) IsEnabled() bool

func (*ClockPane) KeepAwake

func (p *ClockPane) KeepAwake() bool

func (*ClockPane) Render

func (p *ClockPane) Render() (*image.RGBA, error)

type ColorPane

type ColorPane struct {
	// contains filtered or unexported fields
}

func NewColorPane

func NewColorPane(in color.Color) *ColorPane

func NewFadingColorPane

func NewFadingColorPane(in color.Color, d time.Duration) *ColorPane

func NewFadingShrinkingColorPane

func NewFadingShrinkingColorPane(in color.Color, d time.Duration) *ColorPane

creates a pane that fades and shrinks towards the center as time progresses

func (*ColorPane) Gesture

func (p *ColorPane) Gesture(gesture *gestic.GestureMessage)

func (*ColorPane) IsDirty

func (p *ColorPane) IsDirty() bool

func (*ColorPane) IsEnabled

func (p *ColorPane) IsEnabled() bool

func (*ColorPane) KeepAwake

func (p *ColorPane) KeepAwake() bool

func (*ColorPane) Render

func (p *ColorPane) Render() (*image.RGBA, error)

type Field

type Field struct {
	// contains filtered or unexported fields
}

Field represents a two-dimensional field of cells.

func NewField

func NewField(w, h int) *Field

NewField returns an empty field of the specified width and height.

func (*Field) Alive

func (f *Field) Alive(x, y int) bool

Alive reports whether the specified cell is alive. If the x or y coordinates are outside the field boundaries they are wrapped toroidally. For instance, an x value of -1 is treated as width-1.

func (*Field) Next

func (f *Field) Next(x, y int) bool

Next returns the state of the specified cell at the next time step.

func (*Field) Set

func (f *Field) Set(x, y int, b bool)

Set sets the state of the specified cell to the given value.

type GameOfLifePane

type GameOfLifePane struct {
	// contains filtered or unexported fields
}

func NewGameOfLifePane

func NewGameOfLifePane() *GameOfLifePane

func (*GameOfLifePane) Gesture

func (p *GameOfLifePane) Gesture(gesture *gestic.GestureMessage)

func (*GameOfLifePane) IsDirty

func (p *GameOfLifePane) IsDirty() bool

func (*GameOfLifePane) IsEnabled

func (p *GameOfLifePane) IsEnabled() bool

func (*GameOfLifePane) KeepAwake

func (p *GameOfLifePane) KeepAwake() bool

func (*GameOfLifePane) Render

func (p *GameOfLifePane) Render() (*image.RGBA, error)

type GesturePane

type GesturePane struct {
	// contains filtered or unexported fields
}

func NewGesturePane

func NewGesturePane() *GesturePane

func (*GesturePane) Gesture

func (p *GesturePane) Gesture(gesture *gestic.GestureMessage)

func (*GesturePane) IsDirty

func (p *GesturePane) IsDirty() bool

func (*GesturePane) IsEnabled

func (p *GesturePane) IsEnabled() bool

func (*GesturePane) KeepAwake

func (p *GesturePane) KeepAwake() bool

func (*GesturePane) Render

func (p *GesturePane) Render() (*image.RGBA, error)

type ImagePane

type ImagePane struct {
	// contains filtered or unexported fields
}

func NewImagePane

func NewImagePane(image string) *ImagePane

func (*ImagePane) Gesture

func (p *ImagePane) Gesture(gesture *gestic.GestureMessage)

func (*ImagePane) IsDirty

func (p *ImagePane) IsDirty() bool

func (*ImagePane) IsEnabled

func (p *ImagePane) IsEnabled() bool

func (*ImagePane) KeepAwake

func (p *ImagePane) KeepAwake() bool

func (*ImagePane) Render

func (p *ImagePane) Render() (*image.RGBA, error)

type Life

type Life struct {
	// contains filtered or unexported fields
}

Life stores the state of a round of Conway's Game of Life.

func NewLife

func NewLife(w, h int) *Life

NewLife returns a new Life game state with a random initial state.

func (*Life) Alive

func (l *Life) Alive(x, y int) bool

func (*Life) Step

func (l *Life) Step()

Step advances the game by one instant, recomputing and updating all cells.

func (*Life) String

func (l *Life) String() string

String returns the game board as a string.

type LightPane

type LightPane struct {
	// contains filtered or unexported fields
}

func NewLightPane

func NewLightPane(colorMode bool, offImage string, onImage string, conn *ninja.Connection) *LightPane

func (*LightPane) Gesture

func (p *LightPane) Gesture(gesture *gestic.GestureMessage)

func (*LightPane) IsDirty

func (p *LightPane) IsDirty() bool

func (*LightPane) IsEnabled

func (p *LightPane) IsEnabled() bool

func (*LightPane) KeepAwake

func (p *LightPane) KeepAwake() bool

func (*LightPane) Render

func (p *LightPane) Render() (*image.RGBA, error)

func (*LightPane) SendBrightnessToDevices

func (p *LightPane) SendBrightnessToDevices()

func (*LightPane) SendColorToDevices

func (p *LightPane) SendColorToDevices()

func (*LightPane) SendOnOffToDevices

func (p *LightPane) SendOnOffToDevices()

func (*LightPane) SetOnOffState

func (p *LightPane) SetOnOffState(state bool)

type MediaPane

type MediaPane struct {
	// contains filtered or unexported fields
}

func NewMediaPane

func NewMediaPane(conn *ninja.Connection) *MediaPane

func (*MediaPane) Gesture

func (p *MediaPane) Gesture(gesture *gestic.GestureMessage)

func (*MediaPane) IsDirty

func (p *MediaPane) IsDirty() bool

func (*MediaPane) IsEnabled

func (p *MediaPane) IsEnabled() bool

func (*MediaPane) KeepAwake

func (p *MediaPane) KeepAwake() bool

func (*MediaPane) Render

func (p *MediaPane) Render() (*image.RGBA, error)

func (*MediaPane) SendVolume

func (p *MediaPane) SendVolume()

func (*MediaPane) SendVolumeAdjust

func (p *MediaPane) SendVolumeAdjust(direction bool)

func (*MediaPane) SetControlState

func (p *MediaPane) SetControlState(state string)

type MediaPaneImages

type MediaPaneImages struct {
	Volume     string
	VolumeUp   string
	VolumeDown string
	Mute       string
	Play       string
	Pause      string
	Stop       string
	Next       string
}

type OnOffPane

type OnOffPane struct {
	// contains filtered or unexported fields
}

func NewOnOffPane

func NewOnOffPane(offImage string, onImage string, onStateChange func(bool), conn *ninja.Connection, thingType string) *OnOffPane

func (*OnOffPane) Gesture

func (p *OnOffPane) Gesture(gesture *gestic.GestureMessage)

func (*OnOffPane) IsDirty

func (p *OnOffPane) IsDirty() bool

func (*OnOffPane) IsEnabled

func (p *OnOffPane) IsEnabled() bool

func (*OnOffPane) KeepAwake

func (p *OnOffPane) KeepAwake() bool

func (*OnOffPane) Render

func (p *OnOffPane) Render() (*image.RGBA, error)

func (*OnOffPane) SetState

func (p *OnOffPane) SetState(state bool)

type PairingCodePane

type PairingCodePane struct {
	// contains filtered or unexported fields
}

func NewPairingCodePane

func NewPairingCodePane(text string) *PairingCodePane

func (*PairingCodePane) Gesture

func (p *PairingCodePane) Gesture(gesture *gestic.GestureMessage)

func (*PairingCodePane) IsDirty

func (p *PairingCodePane) IsDirty() bool

func (*PairingCodePane) IsEnabled

func (p *PairingCodePane) IsEnabled() bool

func (*PairingCodePane) KeepAwake

func (p *PairingCodePane) KeepAwake() bool

func (*PairingCodePane) Render

func (p *PairingCodePane) Render() (*image.RGBA, error)

type PairingColorPane

type PairingColorPane struct {
	// contains filtered or unexported fields
}

func NewPairingColorPane

func NewPairingColorPane(maskImage string, color color.Color) *PairingColorPane

func (*PairingColorPane) Gesture

func (p *PairingColorPane) Gesture(gesture *gestic.GestureMessage)

func (*PairingColorPane) IsDirty

func (p *PairingColorPane) IsDirty() bool

func (*PairingColorPane) IsEnabled

func (p *PairingColorPane) IsEnabled() bool

func (*PairingColorPane) KeepAwake

func (p *PairingColorPane) KeepAwake() bool

func (*PairingColorPane) Render

func (p *PairingColorPane) Render() (*image.RGBA, error)

type PairingLayout

type PairingLayout struct {
	// contains filtered or unexported fields
}

func NewPairingLayout

func NewPairingLayout() *PairingLayout

func (*PairingLayout) Draw

func (l *PairingLayout) Draw(updates *[][]uint8)

func (*PairingLayout) Render

func (l *PairingLayout) Render() (*image.RGBA, error)

func (*PairingLayout) ShowCode

func (l *PairingLayout) ShowCode(text string)

func (*PairingLayout) ShowColor

func (l *PairingLayout) ShowColor(c color.Color)

func (*PairingLayout) ShowDrawing

func (l *PairingLayout) ShowDrawing()

func (*PairingLayout) ShowFadingColor

func (l *PairingLayout) ShowFadingColor(c color.Color, d time.Duration)

func (*PairingLayout) ShowFadingShrinkingColor

func (l *PairingLayout) ShowFadingShrinkingColor(c color.Color, d time.Duration)

func (*PairingLayout) ShowIcon

func (l *PairingLayout) ShowIcon(image string)

func (*PairingLayout) ShowUpdateProgress

func (l *PairingLayout) ShowUpdateProgress(progress float64)

type Pane

type Pane interface {
	IsEnabled() bool
	KeepAwake() bool
	Render() (*image.RGBA, error)
	Gesture(*gestic.GestureMessage)
}

type PaneLayout

type PaneLayout struct {
	// contains filtered or unexported fields
}

func NewPaneLayout

func NewPaneLayout(fakeGestures bool, conn *ninja.Connection) (*PaneLayout, chan (bool))

func (*PaneLayout) AddPane

func (l *PaneLayout) AddPane(pane Pane)

func (*PaneLayout) IsDirty

func (l *PaneLayout) IsDirty() bool

func (*PaneLayout) OnGesture

func (l *PaneLayout) OnGesture(g *gestic.GestureMessage)

func (*PaneLayout) RemovePane

func (l *PaneLayout) RemovePane(pane Pane)

func (*PaneLayout) Render

func (l *PaneLayout) Render() (*image.RGBA, chan (bool), error)

func (*PaneLayout) Sleep

func (l *PaneLayout) Sleep()

func (*PaneLayout) Wake

func (l *PaneLayout) Wake()

type TextScrollPane

type TextScrollPane struct {
	// contains filtered or unexported fields
}

func NewTextScrollPane

func NewTextScrollPane(text string) *TextScrollPane

func (*TextScrollPane) Gesture

func (p *TextScrollPane) Gesture(gesture *gestic.GestureMessage)

func (*TextScrollPane) IsDirty

func (p *TextScrollPane) IsDirty() bool

func (*TextScrollPane) IsEnabled

func (p *TextScrollPane) IsEnabled() bool

func (*TextScrollPane) KeepAwake

func (p *TextScrollPane) KeepAwake() bool

func (*TextScrollPane) Render

func (p *TextScrollPane) Render() (*image.RGBA, error)

type Tick

type Tick struct {
	// contains filtered or unexported fields
}

type Tween

type Tween struct {
	From     float64
	To       float64
	Ease     func(t float64, b float64, c float64, d float64) float64
	Start    time.Time
	Duration time.Duration
}

func (*Tween) Update

func (t *Tween) Update() (float64, bool)

type UpdateProgressPane

type UpdateProgressPane struct {
	// contains filtered or unexported fields
}

func NewUpdateProgressPane

func NewUpdateProgressPane(progressImage string, loopingImage string) *UpdateProgressPane

func (*UpdateProgressPane) Gesture

func (p *UpdateProgressPane) Gesture(gesture *gestic.GestureMessage)

func (*UpdateProgressPane) IsDirty

func (p *UpdateProgressPane) IsDirty() bool

func (*UpdateProgressPane) IsEnabled

func (p *UpdateProgressPane) IsEnabled() bool

func (*UpdateProgressPane) KeepAwake

func (p *UpdateProgressPane) KeepAwake() bool

func (*UpdateProgressPane) Render

func (p *UpdateProgressPane) Render() (*image.RGBA, error)

type WeatherPane

type WeatherPane struct {
	// contains filtered or unexported fields
}

func NewWeatherPane

func NewWeatherPane(conn *ninja.Connection) *WeatherPane

func (*WeatherPane) Gesture

func (p *WeatherPane) Gesture(gesture *gestic.GestureMessage)

func (*WeatherPane) GetWeather

func (p *WeatherPane) GetWeather()

func (*WeatherPane) IsDirty

func (p *WeatherPane) IsDirty() bool

func (*WeatherPane) IsEnabled

func (p *WeatherPane) IsEnabled() bool

func (*WeatherPane) KeepAwake

func (p *WeatherPane) KeepAwake() bool

func (*WeatherPane) Render

func (p *WeatherPane) Render() (*image.RGBA, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL