gtkcord

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpinnerSize  = 56
	ChannelWidth = 240
)

Variables

View Source
var HTTPClient = http.Client{
	Timeout: 10 * time.Second,
}

Functions

This section is empty.

Types

type Application

type Application struct {
	*gtk.Application
	Notifier *gdbus.Notifier
	Window   *window.Container

	State *ningen.State

	// Main Grid, left is always LeftGrid - *gtk.Grid
	Main  *handy.Leaflet // LeftGrid -- Right
	Right *singlebox.Box // Stack of Messages or full screen server details TODO

	// Left Grid
	LeftGrid *gtk.Grid

	// Application states
	Header   *header.Header
	Guilds   *guild.Guilds
	Privates *channel.PrivateChannels
	Channels *channel.Channels
	Messages *message.Messages

	// GuildID -> ChannelID; if GuildID == 0 then DM
	LastAccess map[discord.Snowflake]discord.Snowflake
	// contains filtered or unexported fields
}

func New

func New(app *gtk.Application) *Application

New is not thread-safe.

func (*Application) Activate

func (a *Application) Activate()

func (*Application) Close

func (a *Application) Close()

func (*Application) FocusMessages

func (a *Application) FocusMessages()

func (*Application) LogOut

func (a *Application) LogOut()

func (*Application) Ready

func (a *Application) Ready(s *ningen.State) error

func (*Application) SwitchChannel

func (a *Application) SwitchChannel(ch Channel)

func (*Application) SwitchDM

func (a *Application) SwitchDM()

func (*Application) SwitchGuild

func (a *Application) SwitchGuild(g *guild.Guild)

func (*Application) SwitchLastChannel

func (a *Application) SwitchLastChannel(g *guild.Guild)

SwitchLastChannel, nil for DM.

func (*Application) SwitchToID

func (a *Application) SwitchToID(ch, guild discord.Snowflake) bool

SwitchToID returns true if it can find the channel.

type Channel

type Channel interface {
	GuildID() discord.Snowflake
	ChannelID() discord.Snowflake
	ChannelInfo() (name, topic string)
}

Jump to

Keyboard shortcuts

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