Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- func (a *Application) Activate()
- func (a *Application) ChannelID() discord.ChannelID
- func (a *Application) Close()
- func (a *Application) FocusMessages()
- func (a *Application) GuildID() discord.GuildID
- func (a *Application) LogOut()
- func (a *Application) Ready(s *ningen.State) error
- func (a *Application) ShowLogin(lastToken string)
- func (a *Application) SwitchChannel(ch ChannelContainer)
- func (a *Application) SwitchDM()
- func (a *Application) SwitchGuild(g *guild.Guild)
- func (a *Application) SwitchToID(chID discord.ChannelID, guildID discord.GuildID) bool
- type ChannelContainer
- type Plugin
- type Settings
Constants ¶
View Source
const ( SpinnerSize = 56 ChannelWidth = 240 )
View Source
const SettingsFile = "settings.json"
Variables ¶
View Source
var HTTPClient = http.Client{ Timeout: 10 * time.Second, }
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { *gtk.Application Window *window.Container Notifier *gdbus.Notifier MPRIS *gdbus.MPRISWatcher Plugins []*Plugin State *ningen.State // Preferences window, hidden by default Settings *Settings // 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 // contains filtered or unexported fields }
func (*Application) Activate ¶
func (a *Application) Activate()
func (*Application) ChannelID ¶ added in v0.1.0
func (a *Application) ChannelID() discord.ChannelID
ChannelID gets the application's channel ID. The same enforcement applies.
func (*Application) Close ¶
func (a *Application) Close()
func (*Application) FocusMessages ¶
func (a *Application) FocusMessages()
func (*Application) GuildID ¶ added in v0.1.0
func (a *Application) GuildID() discord.GuildID
GuildID gets the application's guild ID. It enforces the internal application state to be the same.
func (*Application) LogOut ¶
func (a *Application) LogOut()
func (*Application) Ready ¶
func (a *Application) Ready(s *ningen.State) error
func (*Application) ShowLogin ¶ added in v0.1.0
func (a *Application) ShowLogin(lastToken string)
ShowLogin shows the login screen.
func (*Application) SwitchChannel ¶
func (a *Application) SwitchChannel(ch ChannelContainer)
func (*Application) SwitchDM ¶
func (a *Application) SwitchDM()
func (*Application) SwitchGuild ¶
func (a *Application) SwitchGuild(g *guild.Guild)
func (*Application) SwitchToID ¶
SwitchToID returns true if it can find the channel.
type ChannelContainer ¶ added in v0.1.0
type Plugin ¶ added in v0.0.4
type Plugin struct { // Plugin constants/functions Name string // optional Author string // optional OnReady func(a *Application) // Auto-detected Path string Err error }
type Settings ¶ added in v0.0.4
type Settings struct { *handy.PreferencesWindow `json:"-"` General struct { *handy.PreferencesPage `json:"-"` Behavior struct { *handy.PreferencesGroup `json:"-"` ZeroWidth bool `json:"zero_width"` // true OnTyping bool `json:"on_typing"` // true } Customization struct { *handy.PreferencesGroup `json:"-"` // only 1 file since files can import others. CSSFile string `json:"css_files"` // https://xyproto.github.io/splash/docs/all.html HighlightStyle string `json:"highlight_style"` // Default 750 MessageWidth int `json:"messages_width"` } `json:"customization"` } `json:"general"` Integrations struct { *handy.PreferencesPage `json:"-"` RichPresence struct { *handy.PreferencesGroup `json:"-"` MPRIS bool `json:"mpris"` } `json:"rich_presence"` // Ignore plugins in config Plugins struct { *handy.PreferencesGroup `json:"-"` } `json:"-"` } `json:"integrations"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.