Documentation ¶
Index ¶
- Constants
- func NewButton(markup string, callback func()) *gtk.ModelButton
- func NewModelButton(markup string) *gtk.ModelButton
- type Popover
- type PopoverCreator
- type StatefulPopupBody
- type UserPopup
- type UserPopupActivity
- type UserPopupBody
- func (b *UserPopupBody) Attach(w gtk.IWidget, row int)
- func (b *UserPopupBody) Update(u discord.User)
- func (b *UserPopupBody) UpdateActivity(a *discord.Activity)
- func (b *UserPopupBody) UpdateMember(m discord.Member)
- func (b *UserPopupBody) UpdateMemberPart(nick string, u discord.User)
- func (b *UserPopupBody) UpdateStatus(status discord.Status)
- type UserPopupRole
- type UserPopupRoles
Constants ¶
View Source
const ( PopupAvatarSize = 96 PopupImageSize = 48 // rich presence image PopupWidth = 240 OfflineColor = 0x747F8D BusyColor = 0xF04747 IdleColor = 0xFAA61A OnlineColor = 0x43B581 )
View Source
const SectionPadding = 10
Variables ¶
This section is empty.
Functions ¶
func NewButton ¶
func NewButton(markup string, callback func()) *gtk.ModelButton
func NewModelButton ¶
func NewModelButton(markup string) *gtk.ModelButton
Types ¶
type Popover ¶
type Popover struct { *gtk.Popover Style *gtk.StyleContext Children gtkutils.WidgetDestroyer // contains filtered or unexported fields }
func NewDynamicPopover ¶
func NewDynamicPopover(relative gtkutils.WidgetConnector, create PopoverCreator) *Popover
func NewPopover ¶
func (*Popover) SetChildren ¶
func (p *Popover) SetChildren(children gtkutils.WidgetDestroyer)
type PopoverCreator ¶
type PopoverCreator = func(p *gtk.Popover) gtkutils.WidgetDestroyer
type StatefulPopupBody ¶
type StatefulPopupBody struct { *UserPopupBody ParentStyle *gtk.StyleContext User discord.UserID Guild discord.GuildID Prefetch *discord.User // contains filtered or unexported fields }
func NewStatefulPopupBody ¶
func NewStatefulPopupUser ¶
func (*StatefulPopupBody) Destroy ¶
func (s *StatefulPopupBody) Destroy()
func (*StatefulPopupBody) UpdateActivity ¶
func (s *StatefulPopupBody) UpdateActivity(a *discord.Activity)
type UserPopup ¶
type UserPopup struct { *Popover *UserPopupBody }
func NewUserPopupCustom ¶
func NewUserPopupCustom(relative gtk.IWidget, body *UserPopupBody) *UserPopup
not thread safe
func (*UserPopup) UpdateActivity ¶
type UserPopupActivity ¶
type UserPopupActivity struct { *gtk.Box Header *gtk.Label Custom bool Details *gtk.Box Image *gtk.Image Info *gtk.Label // contains filtered or unexported fields }
func NewUserPopupActivity ¶
func NewUserPopupActivity() *UserPopupActivity
func (*UserPopupActivity) Update ¶
func (a *UserPopupActivity) Update(ac discord.Activity)
func (*UserPopupActivity) UpdateUnsafe ¶
func (a *UserPopupActivity) UpdateUnsafe(ac discord.Activity)
type UserPopupBody ¶
type UserPopupBody struct { *gtk.Grid GridMax int Avatar *gtk.Image AvatarStyle *gtk.StyleContext // .avatar Username *gtk.Label Activity *UserPopupActivity // contains filtered or unexported fields }
func NewUserPopupBody ¶
func NewUserPopupBody() *UserPopupBody
func (*UserPopupBody) Update ¶
func (b *UserPopupBody) Update(u discord.User)
func (*UserPopupBody) UpdateActivity ¶
func (b *UserPopupBody) UpdateActivity(a *discord.Activity)
func (*UserPopupBody) UpdateMember ¶
func (b *UserPopupBody) UpdateMember(m discord.Member)
func (*UserPopupBody) UpdateMemberPart ¶
func (b *UserPopupBody) UpdateMemberPart(nick string, u discord.User)
func (*UserPopupBody) UpdateStatus ¶
func (b *UserPopupBody) UpdateStatus(status discord.Status)
type UserPopupRole ¶
type UserPopupRole struct { *gtk.FlowBoxChild Main *gtk.Label }
type UserPopupRoles ¶
type UserPopupRoles struct { *gtk.Box Header *gtk.Label // can be nil Main *gtk.FlowBox Roles []UserPopupRole }
func NewUserPopupRoles ¶
func NewUserPopupRoles(s *ningen.State, guild discord.GuildID, ids []discord.RoleID) (*UserPopupRoles, error)
thread-safe
Click to show internal directories.
Click to hide internal directories.