Documentation ¶
Index ¶
- Constants
- Variables
- type Application
- func (a *Application) Activate()
- func (a *Application) Close()
- func (a *Application) FocusMessages()
- func (a *Application) LogOut()
- func (a *Application) Ready(s *ningen.State) error
- func (a *Application) SwitchChannel(ch Channel)
- func (a *Application) SwitchDM()
- func (a *Application) SwitchGuild(g *guild.Guild)
- func (a *Application) SwitchLastChannel(g *guild.Guild)
- func (a *Application) SwitchToID(chID discord.ChannelID, guildID discord.GuildID) bool
- type Channel
- type Plugin
- type Settings
Constants ¶
View Source
const LastReadFile = "lastread.json"
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 // LastRead contains the persistent state of the latest channels mapped from // guilds. LastRead lastread.State // contains filtered or unexported fields }
func (*Application) Activate ¶
func (a *Application) Activate()
func (*Application) Close ¶
func (a *Application) Close()
func (*Application) FocusMessages ¶
func (a *Application) FocusMessages()
func (*Application) LogOut ¶
func (a *Application) LogOut()
func (*Application) SwitchChannel ¶
func (a *Application) SwitchChannel(ch Channel)
func (*Application) SwitchDM ¶
func (a *Application) SwitchDM()
func (*Application) SwitchGuild ¶
func (a *Application) SwitchGuild(g *guild.Guild)
func (*Application) SwitchLastChannel ¶
func (a *Application) SwitchLastChannel(g *guild.Guild)
SwitchLastChannel, nil for DM.
func (*Application) SwitchToID ¶
SwitchToID returns true if it can find the channel.
type Plugin ¶
type Plugin struct { // Plugin constants/functions Name string // optional Author string // optional OnReady func(a *Application) // Auto-detected Path string Err error }
type Settings ¶
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"` }
func MakeSettings ¶
func MakeSettings() *Settings
func (*Settings) InitWidgets ¶
func (s *Settings) InitWidgets(a *Application)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.