2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Added initial implementation of Windows tray.

This commit is contained in:
23rd
2022-04-18 16:34:59 +03:00
parent 56fdc7d39a
commit 70acc7a0e3
4 changed files with 269 additions and 1 deletions

View File

@@ -9,6 +9,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/platform_tray.h"
#include "base/unique_qptr.h"
namespace Ui {
class PopupMenu;
} // namespace Ui
class QSystemTrayIcon;
namespace Platform {
class Tray final {
@@ -36,6 +44,14 @@ public:
[[nodiscard]] rpl::lifetime &lifetime();
private:
base::unique_qptr<QSystemTrayIcon> _icon;
base::unique_qptr<Ui::PopupMenu> _menu;
rpl::event_stream<> _iconClicks;
rpl::event_stream<> _aboutToShowRequests;
rpl::lifetime _actionsLifetime;
rpl::lifetime _lifetime;
};