quickswitcher

package
v0.0.5-0...-0379fef Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Any more and Gtk becomes super slow.

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.GuildID)
	OnChannel func(channel discord.ChannelID, guild discord.GuildID)
	OnFriend  func(userid discord.UserID)
	// 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 {

	// Icon enum
	IconChar rune
	IconURL  string

	PrimaryText   string
	SecondaryText string
	RightText     string

	// enum
	GuildID   discord.GuildID
	ChannelID discord.ChannelID // could be DM, visible as one
	FriendID  discord.UserID    // only called if needed a new channel
	// contains filtered or unexported fields
}

type Row

type Row struct {
	*gtk.ListBoxRow
	// contains filtered or unexported fields
}

type Spawner

type Spawner struct {
	State *ningen.State

	OnGuild   func(discord.GuildID)
	OnChannel func(_ discord.ChannelID, _ discord.GuildID)
	OnFriend  func(discord.UserID)
}

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