MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / SetIcon

Method SetIcon

pkg/sys/shell.go:115–123  ·  view source on GitHub ↗

SetIcon sets the tray icon.

(icon Hicon)

Source from the content-addressed store, hash-verified

113
114// SetIcon sets the tray icon.
115func (s *SystrayIcon) SetIcon(icon Hicon) error {
116 var data NotifyIconData
117 data.Size = uint32(unsafe.Sizeof(data))
118 data.Flags = NotifyIconGUIDFlag | NotifyIconIconFlag
119 data.GUIDItem = SystrayIconGUID
120 data.HWnd = s.wnd
121 data.Icon = icon
122 return ShellNotifyIcon(ShellModifyIcon, &data)
123}
124
125// SetTooltip sets the tray icon tooltip.
126func (s *SystrayIcon) SetTooltip(tooltip string) error {

Callers 1

newSystrayFunction · 0.80

Calls 1

ShellNotifyIconFunction · 0.85

Tested by

no test coverage detected