google / gxui

An experimental Go cross platform UI library.
BSD 3-Clause "New" or "Revised" License
4.44k stars 297 forks source link

FR: tray icon support #126

Open michael-schaller opened 9 years ago

michael-schaller commented 9 years ago

I'm missing tray icon support similarly to GTK+3's GtkStatusIcon [1] or Window's Notification Icon [2]. Is this something that would fit nicely into GXUI or is this something that is rather unlikely to appear in GXUI in the foreseeable future?

[1] https://developer.gnome.org/gtk3/stable/GtkStatusIcon.html [2] https://msdn.microsoft.com/en-us/library/windows/desktop/ee330740(v=vs.85).aspx

ben-clayton commented 9 years ago

Hi @michael-schaller, I have no objections to this being added, but I'm not going to get around to implementing it any time soon. I'm happy to advise if anyone fancies implementing it. This should probably be exposed as an additional CreateTrayIcon method in the the Driver interface. I'm guessing the function would just return an error for targets that do not support it - i.e. the new WebGL backend.

dmitshur commented 9 years ago

I'll mention this here just in case it's helpful. Feel free to take a look at trayhost package (godoc), it's a Go library for making tray (only) apps. There are a few forks, mine focuses on OS X functionality (since that's the platform I use it on). I'm not sure how it would interact with GLFW though, that's the tricky part.

michael-schaller commented 9 years ago

@shurcooL Thanks. That looks interesting and might be already enough for my use case.