Documentation ¶
Index ¶
- Constants
- type Banner
- type BaseChannelNode
- type CategoryNode
- type ChannelNode
- type ForumNode
- type GuildTree
- func (t *GuildTree) Add(channels []discord.Channel)
- func (t *GuildTree) Has(id discord.ChannelID) bool
- func (t *GuildTree) Node(id discord.ChannelID) Node
- func (t *GuildTree) NodeFromIter(iter *gtk.TreeIter) Node
- func (t *GuildTree) NodeFromPath(path *gtk.TreePath) Node
- func (t *GuildTree) Remove(id discord.ChannelID)
- func (t *GuildTree) SetUnread(id discord.ChannelID, unread ningen.UnreadIndication)
- func (t *GuildTree) UpdateChannel(id discord.ChannelID)
- func (t *GuildTree) UpdateUnread(id discord.ChannelID)
- type Node
- type Opener
- type ThreadNode
- type View
- type VoiceChannelNode
Constants ¶
const ChannelsWidth = bannerWidth
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Banner ¶
type Banner struct { *gtk.Overlay Shadows *gtk.Box Picture *onlineimage.Picture // contains filtered or unexported fields }
Banner is the guild banner display on top of the channel view.
func (*Banner) Invalidate ¶
func (b *Banner) Invalidate()
Invalidate invalidates and updates the Banner image.
func (*Banner) SetScrollOpacity ¶ added in v0.0.2
SetScrollOpacity sets the opacity of the shadow depending on the scroll level. If the scroll goes past the banner, then scrolled is true.
type BaseChannelNode ¶
type BaseChannelNode struct {
// contains filtered or unexported fields
}
BaseChannelNode is the base of all channel nodes. It implements the Node interface and contains common information that all channels have.
func (*BaseChannelNode) TreePath ¶
func (n *BaseChannelNode) TreePath() *gtk.TreePath
TreePath implements Node.
func (*BaseChannelNode) Update ¶
func (n *BaseChannelNode) Update(ch *discord.Channel)
Update implements Node. It does nothing.
type CategoryNode ¶
type CategoryNode struct { BaseChannelNode // contains filtered or unexported fields }
CategoryNode is a category node.
func (*CategoryNode) Update ¶
func (n *CategoryNode) Update(ch *discord.Channel)
type ChannelNode ¶
type ChannelNode struct { BaseChannelNode // contains filtered or unexported fields }
ChannelNode is a regular text channel node.
func (*ChannelNode) SetUnread ¶
func (n *ChannelNode) SetUnread(unread ningen.UnreadIndication)
SetUnread sets whether the channel is unread and mentioned.
func (*ChannelNode) Update ¶
func (n *ChannelNode) Update(ch *discord.Channel)
type ForumNode ¶ added in v0.0.5
type ForumNode struct {
BaseChannelNode
}
ForumNode is a node indicating a Discord forum.
type GuildTree ¶
type GuildTree struct { *gtk.TreeStore // contains filtered or unexported fields }
GuildTree is the channel tree that holds the state of all channels.
func NewGuildTree ¶
NewGuildTree creates a new GuildTree.
func (*GuildTree) NodeFromIter ¶
NodeFromIter returns the channel from the given TreeIter.
func (*GuildTree) NodeFromPath ¶
NodeFromPath quickly looks up the channel tree for a node from the given tree path.
func (*GuildTree) UpdateChannel ¶
UpdateChannel updates the channel node with the given ID, or if the node is not known, then it does nothing.
func (*GuildTree) UpdateUnread ¶
UpdateUnread updates the unread state of the channel with the given ID.
type Node ¶
type Node interface { // ID is the ID of the channel node. ID() discord.ChannelID // Update passes the new Channel object into the Node for it to update its // own information. Update(*discord.Channel) // TreePath is the tree path pointing to the channel node. TreePath() *gtk.TreePath }
Node describes a channel node in the channel tree.
type ThreadNode ¶
type ThreadNode struct {
BaseChannelNode
}
ThreadNode is a node indicating a Discord thread.
func (*ThreadNode) SetUnread ¶
func (n *ThreadNode) SetUnread(unread ningen.UnreadIndication)
func (*ThreadNode) Update ¶
func (n *ThreadNode) Update(ch *discord.Channel)
type View ¶
type View struct { *adaptive.LoadablePage Overlay *gtk.Overlay // covers whole Header struct { *gtk.WindowHandle Box *gtk.Box Name *gtk.Label } Scroll *gtk.ScrolledWindow Child struct { *gtk.Box Banner *Banner Tree *gtk.TreeView } // contains filtered or unexported fields }
View holds the entire channel sidebar containing all the categories, channels and threads.
func (*View) InvalidateChannels ¶
func (v *View) InvalidateChannels()
InvalidateChannels invalidates the channels list.
func (*View) InvalidateHeader ¶
func (v *View) InvalidateHeader()
InvalidateHeader invalidates the guild name and banner.
func (*View) SelectChannel ¶
SelectChannel selects a known channel. If none is known, then it is selected later when the list is changed or never selected if the user selects something else.
type VoiceChannelNode ¶ added in v0.0.3
type VoiceChannelNode struct { BaseChannelNode // contains filtered or unexported fields }
func (*VoiceChannelNode) Update ¶ added in v0.0.3
func (n *VoiceChannelNode) Update(ch *discord.Channel)