window

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPreferDarkTheme

func SetPreferDarkTheme(prefer bool)

SetPreferDarkTheme sets whether or not GTK should use a dark theme.

Types

type ChatPage

type ChatPage struct {
	*adw.OverlaySplitView
	Sidebar     *sidebar.Sidebar
	RightHeader *adw.HeaderBar
	// contains filtered or unexported fields
}

func NewChatPage

func NewChatPage(ctx context.Context, w *Window) *ChatPage

func (*ChatPage) OpenChannel

func (p *ChatPage) OpenChannel(chID discord.ChannelID)

OpenChannel opens the channel with the given ID. Use this method to direct the user to a new channel when they request to, e.g. through a notification.

func (*ChatPage) OpenDMs

func (p *ChatPage) OpenDMs()

OpenDMs opens the DMs page.

func (*ChatPage) OpenGuild

func (p *ChatPage) OpenGuild(guildID discord.GuildID)

OpenGuild opens the guild with the given ID.

func (*ChatPage) OpenQuickSwitcher

func (p *ChatPage) OpenQuickSwitcher()

OpenQuickSwitcher opens the Quick Switcher dialog.

func (*ChatPage) ResetView

func (p *ChatPage) ResetView()

ResetView switches out of any channel view and into the placeholder view. This method is used when the guild becomes unavailable.

func (*ChatPage) SwitchToMessages

func (p *ChatPage) SwitchToMessages()

SwitchToMessages reopens a new message page of the same channel ID if the user is opening one. Otherwise, the placeholder is seen.

func (*ChatPage) SwitchToPlaceholder

func (p *ChatPage) SwitchToPlaceholder()

SwitchToPlaceholder switches to the empty placeholder view.

type Window

type Window struct {
	*adw.ApplicationWindow

	Stack   *gtk.Stack
	Login   *login.Page
	Loading *login.LoadingPage
	Chat    *ChatPage
	// contains filtered or unexported fields
}

Window is the main gtkcord window.

func NewWindow

func NewWindow(ctx context.Context) *Window

NewWindow creates a new Window.

func (*Window) Context

func (w *Window) Context() context.Context

func (*Window) SetLoading

func (w *Window) SetLoading()

func (*Window) SetTitle

func (w *Window) SetTitle(title string)

SetTitle sets the window title.

func (*Window) SwitchToChatPage

func (w *Window) SwitchToChatPage()

func (*Window) SwitchToLoginPage

func (w *Window) SwitchToLoginPage()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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