aboutsummaryrefslogtreecommitdiffstats
path: root/systray_windows.go
diff options
context:
space:
mode:
authorOx Cart2017-09-11 21:18:05 -0500
committerOx Cart2017-09-11 21:18:05 -0500
commit3554930085aef7d8668124c205caf423bc4cdeef (patch)
tree69c8713a5417e18509b70d7df321661e4484f0f9 /systray_windows.go
parent52599be7ec432dbbe03cb2cc94b4831e2395873c (diff)
downloadsystray-3554930085aef7d8668124c205caf423bc4cdeef.tar.bz2
Added hide/show for Windows
Diffstat (limited to 'systray_windows.go')
-rw-r--r--systray_windows.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/systray_windows.go b/systray_windows.go
index 664af0c..3649807 100644
--- a/systray_windows.go
+++ b/systray_windows.go
@@ -25,6 +25,7 @@ var (
_setTitle = mod.NewProc("setTitle")
_setTooltip = mod.NewProc("setTooltip")
_add_or_update_menu_item = mod.NewProc("add_or_update_menu_item")
+ _hide_menu_item = mod.NewProc("hide_menu_item")
)
func init() {
@@ -131,6 +132,14 @@ func addOrUpdateMenuItem(item *MenuItem) {
)
}
+func hideMenuItem(item *MenuItem) {
+ _hide_menu_item.Call(uintptr(item.id))
+}
+
+func showMenuItem(item *MenuItem) {
+ addOrUpdateMenuItem(item)
+}
+
type utf16 []uint16
// Raw returns the underlying *wchar_t of an utf16 so we can pass to DLL