quickswitcher

package
v0.0.2 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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccelSpawnDialog = "<gtkcord>/quickswitcher.SpawnDialog"
)
View Source
const IconSize = 24

Variables

This section is empty.

Functions

func Bind

func Bind(spawner Spawner)

Types

type Dialog

type Dialog struct {
	*gtk.Dialog
	Entry *gtk.Entry   // in header
	List  *gtk.ListBox // in dialog

	// callback functions
	OnGuild   func(guildid discord.Snowflake)
	OnChannel func(channel, guild discord.Snowflake)
	OnFriend  func(userid discord.Snowflake)
	// contains filtered or unexported fields
}

func NewDialog

func NewDialog(s *ningen.State) *Dialog

func (*Dialog) Down

func (d *Dialog) Down()

func (*Dialog) Up

func (d *Dialog) Up()

type Entry

type Entry struct {
	// will create if nil
	*gtk.ListBoxRow

	// Icon enum
	IconChar rune
	IconURL  string

	PrimaryText   string
	SecondaryText string
	RightText     string

	// enum
	GuildID   discord.Snowflake
	ChannelID discord.Snowflake // could be DM, displayed as one
	FriendID  discord.Snowflake // only called if needed a new channel
}

type Spawner

type Spawner struct {
	State *ningen.State

	OnGuild   func(discord.Snowflake)
	OnChannel func(_, _ discord.Snowflake)
	OnFriend  func(discord.Snowflake)
}

func (Spawner) Spawn

func (s Spawner) Spawn()

Jump to

Keyboard shortcuts

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