A portable version of go systray, using stdin/stdout to communicate with other language
Each line is a json string.
tray binary =>
=> ready {"type": "ready"}
<= init menu
{
"icon": "<base64 string of image>",
"title": "Title",
"tooltip": "Tooltips",
"items":[{
"title": "aa",
"tooltip":"bb",
"checked": true,
"enabled": true
}, {
"title": "aa2",
"tooltip":"bb",
"checked": false,
"enabled": true
}]}
=> clicked
{
"type":"clicked",
"item":{"title":"aa","tooltip":"bb","enabled":true,"checked":true},
"menu":{"icon":"","title":"","tooltip":"","items":null},
"seq_id":0
}
<= update-item / update-menu / update-item-and-menu
{
"type": "update-item",
"item": {"title":"aa3","tooltip":"bb","enabled":true,"checked":true},
"seq_id": 0
}
main_xxx_release: go build -ldflags "-s -w" tray.go
main_xxx: go build tray.go