typing

package
v0.0.0-...-6513b37 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Keep the same as input.
	ClampMaxSize   = 1000 - 6*2 // account for margin
	ClampThreshold = ClampMaxSize
)

Variables

This section is empty.

Functions

func NewDots

func NewDots() *gtk.Box

Types

type Container

type Container struct {
	*gtk.Revealer
	// contains filtered or unexported fields
}

func New

func New() *Container

func (*Container) BorrowLabel

func (c *Container) BorrowLabel(markup string)

BorrowLabel borrows the container label. The typing indicator will display the given markup string instead of the markup it is intended to display until Unborrow is called.

func (*Container) RemoveAuthor

func (c *Container) RemoveAuthor(userID cchat.ID)

func (*Container) Reset

func (c *Container) Reset()

func (*Container) TrySubscribe

func (c *Container) TrySubscribe(svmsg cchat.Messenger) bool

func (*Container) Unborrow

func (c *Container) Unborrow()

Unborrow stops borrowing the typing indicator, returning it to the state it is supposed to show. Calling Unborrow multiple times will only take effect for the first time.

type State

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

func NewState

func NewState(changed func(s *State, empty bool)) *State

func (*State) AddTyper

func (s *State) AddTyper(user cchat.User)

AddTyper is thread-safe.

func (*State) RemoveTyper

func (s *State) RemoveTyper(typerID string)

RemoveTyper is thread-safe.

func (*State) Subscribe

func (s *State) Subscribe(indicator cchat.TypingIndicator)

Subscribe is thread-safe.

Jump to

Keyboard shortcuts

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