screen

package
v0.9.32 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package screen represents screen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScreen

func NewScreen(config *config.Config) (tcell.Screen, error)

NewScreen initilize screen.

Types

type Client

type Client interface {
	GetScreen() tcell.Screen
	ScreenSize() (int, int)

	Clear()
	Finish()

	StartPollEvent(context.Context)
	StopPollEvent()

	GetEventChan() chan Event
}

Client include related screen.

type Event

type Event interface{}

Event screen event.

type EventCancel

type EventCancel struct{}

EventCancel cancel event.

type EventDelete

type EventDelete struct{}

EventDelete delete event.

type EventEnter

type EventEnter struct{}

EventEnter press Enter event.

type EventKeyDown

type EventKeyDown struct{}

EventKeyDown press keydown event.

type EventKeyUp

type EventKeyUp struct{}

EventKeyUp press keyup event.

type EventRune

type EventRune rune

EventRune press rune.

type EventScreenResize

type EventScreenResize struct{}

EventScreenResize resize screen Event.

type IClient added in v0.9.31

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

IClient implements Client interface.

func NewClient

func NewClient(s tcell.Screen) *IClient

NewClient initilize Client.

func (*IClient) Clear added in v0.9.31

func (c *IClient) Clear()

Clear clears screen.

func (*IClient) Finish added in v0.9.31

func (c *IClient) Finish()

Finish finishes screen.

func (*IClient) GetEventChan added in v0.9.31

func (c *IClient) GetEventChan() chan Event

GetEventChan gets an event connection.

func (*IClient) GetScreen added in v0.9.31

func (c *IClient) GetScreen() tcell.Screen

GetScreen gets screen.

func (*IClient) ScreenSize added in v0.9.31

func (c *IClient) ScreenSize() (int, int)

ScreenSize gets screen size.

func (*IClient) StartPollEvent added in v0.9.31

func (c *IClient) StartPollEvent(ctx context.Context)

StartPollEvent starts polling event on goroutine.

func (*IClient) StopPollEvent added in v0.9.31

func (c *IClient) StopPollEvent()

StopPollEvent stops polling event of screen.

Directories

Path Synopsis
Package draw is managed screen
Package draw is managed screen

Jump to

Keyboard shortcuts

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