terminal

package module
v0.0.0-...-ec2c575 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

README

Code Status Build Status Coverage Status Join us on Slack

Fyne Terminal

A Linux terminal emulator using the Fyne toolkit.

screenshot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Title         string
	Rows, Columns uint
}

Config is the state of a terminal, updated upon certain actions or commands. Use Terminal.OnConfigure hook to register for changes.

type Terminal

type Terminal struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

Terminal is a terminal widget that loads a shell and handles input/output.

func NewTerminal

func NewTerminal() *Terminal

NewTerminal sets up a new terminal instance with the bash shell

func (*Terminal) AddListener

func (t *Terminal) AddListener(listener chan Config)

AddListener registers a new outgoing channel that will have our Config sent each time it changes.

func (*Terminal) CreateRenderer

func (t *Terminal) CreateRenderer() fyne.WidgetRenderer

CreateRenderer requests a new renderer for this terminal (just a wrapper around the TextGrid)

func (*Terminal) Exit

func (t *Terminal) Exit()

Exit requests that this terminal exits. If there are embedded shells it will exit the child one only.

func (*Terminal) FocusGained

func (t *Terminal) FocusGained()

FocusGained notifies the terminal that it has focus

func (*Terminal) FocusLost

func (t *Terminal) FocusLost()

FocusLost tells the terminal it no longer has focus

func (*Terminal) Focused

func (t *Terminal) Focused() bool

Focused is used to determine if this terminal currently has focus

func (*Terminal) RemoveListener

func (t *Terminal) RemoveListener(listener chan Config)

RemoveListener de-registers a Config channel and closes it

func (*Terminal) Resize

func (t *Terminal) Resize(s fyne.Size)

Resize is called when this terminal widget has been resized. It ensures that the virtual terminal is within the bounds of the widget.

func (*Terminal) Run

func (t *Terminal) Run() error

Run starts the terminal by loading a shell and starting to process the input/output

func (*Terminal) TypedKey

func (t *Terminal) TypedKey(e *fyne.KeyEvent)

TypedKey will be called if a non-printable keyboard event occurs

func (*Terminal) TypedRune

func (t *Terminal) TypedRune(r rune)

TypedRune is called when the user types a visible character

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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