ui

package
v0.0.0-...-7fb543b Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package ui is a general high level representation of all the uis connected to the current instance of Wapty. Use this from other packages to read user input and write output

Index

Constants

View Source
const BUFSIZE = 1024
View Source
const SUBBUFFERSIZE = 50

Variables

This section is empty.

Functions

func MainLoop

func MainLoop()

MainLoop is the UI's mainloop. It should be run on wapty's start and it will not return until an error occours.

Types

type Index

type Index struct {
	Tabs []*Tab
}

type Subscription

type Subscription interface {
	Receive() apis.Command
	RecChannel() <-chan apis.Command
	Send(*apis.Command)
}

Subscription is the high-level representation of a connection between a wapty component and wapty UI. It will multiplex on apis.UIChannel transparently.

func Subscribe

func Subscribe(channel apis.UIChannel) Subscription

Subscribe allows a package to start receiving and sending commands over a apis.UIChannel

type Tab

type Tab struct {
	Title   string
	Active  bool
	ID      string
	Content string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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