quickswitcher

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 13 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(discord.GuildID)
	OnChannel func(discord.ChannelID, discord.GuildID)
	OnFriend  func(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 added in v0.0.4

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