Documentation
¶
Index ¶
- Constants
- type Channel
- type Channels
- func (chs *Channels) Cleanup()
- func (chs *Channels) FindByID(id discord.Snowflake) *Channel
- func (chs *Channels) First() *Channel
- func (chs *Channels) LoadGuild(guildID discord.Snowflake) error
- func (chs *Channels) TraverseReadState(s *ningen.State, rs *gateway.ReadState, unread bool)
- func (chs *Channels) UpdateBanner(url string)
- type PrivateChannel
- type PrivateChannels
- func (pcs *PrivateChannels) Cleanup()
- func (pcs *PrivateChannels) FindByID(id discord.Snowflake) *PrivateChannel
- func (pcs *PrivateChannels) LoadChannels() error
- func (pcs *PrivateChannels) Selected() *PrivateChannel
- func (pcs *PrivateChannels) TraverseReadState(_ *ningen.State, rs *gateway.ReadState, unread bool)
Constants ¶
View Source
const ( ChannelsWidth = 240 BannerHeight = 135 LabelHeight = 48 )
View Source
const ( DMAvatarSize = 38 IconPadding = 8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { gtkutils.ExtendedWidget Row *gtk.ListBoxRow Style *gtk.StyleContext Label *gtk.Label ID discord.Snowflake Guild discord.Snowflake Name string Topic string Category bool // contains filtered or unexported fields }
func (*Channel) ChannelInfo ¶
type Channels ¶
type Channels struct { *gtk.ScrolledWindow Main *gtk.Box GuildID discord.Snowflake // Headers BannerImage *gtk.Image // Channel list ChList *gtk.ListBox Channels []*Channel Selected *Channel OnSelect func(ch *Channel) // contains filtered or unexported fields }
func NewChannels ¶
func (*Channels) TraverseReadState ¶
func (*Channels) UpdateBanner ¶
type PrivateChannel ¶
type PrivateChannel struct { *gtk.ListBoxRow Style *gtk.StyleContext Body *user.Container ID discord.Snowflake Name string Group bool // contains filtered or unexported fields }
func (*PrivateChannel) ChannelID ¶
func (pc *PrivateChannel) ChannelID() discord.Snowflake
func (*PrivateChannel) ChannelInfo ¶
func (pc *PrivateChannel) ChannelInfo() (name, topic string)
func (*PrivateChannel) GuildID ¶
func (pc *PrivateChannel) GuildID() discord.Snowflake
type PrivateChannels ¶
type PrivateChannels struct { *gtk.Box List *gtk.ListBox Scroll *gtk.ScrolledWindow Search *gtk.Entry // Channels map[discord.Snowflake]*PrivateChannel Channels map[string]*PrivateChannel OnSelect func(pm *PrivateChannel) // contains filtered or unexported fields }
func NewPrivateChannels ¶
func NewPrivateChannels(s *ningen.State) (pcs *PrivateChannels)
thread-safe
func (*PrivateChannels) Cleanup ¶
func (pcs *PrivateChannels) Cleanup()
func (*PrivateChannels) FindByID ¶
func (pcs *PrivateChannels) FindByID(id discord.Snowflake) *PrivateChannel
func (*PrivateChannels) Selected ¶
func (pcs *PrivateChannels) Selected() *PrivateChannel
func (*PrivateChannels) TraverseReadState ¶
Click to show internal directories.
Click to hide internal directories.