Add support for a tooltip (Windows only currently)

This commit is contained in:
Andreas Opferkuch
2018-08-02 16:47:29 +02:00
committed by Dmitry Mikushin
parent 95b83171b7
commit 5cc49f2f32
2 changed files with 11 additions and 6 deletions

View File

@@ -56,29 +56,32 @@ static void submenu_cb(struct tray_menu *item) {
// Test tray init
static struct tray tray = {
.icon = TRAY_ICON1,
#if TRAY_WINAPI
.tooltip = "Tray",
#endif
.menu =
(struct tray_menu[]){
(struct tray_menu[]) {
{.text = "Hello", .cb = hello_cb},
{.text = "Checked", .checked = 1, .cb = toggle_cb},
{.text = "Disabled", .disabled = 1},
{.text = "-"},
{.text = "SubMenu",
.submenu =
(struct tray_menu[]){
(struct tray_menu[]) {
{.text = "FIRST", .checked = 1, .cb = submenu_cb},
{.text = "SECOND",
.submenu =
(struct tray_menu[]){
(struct tray_menu[]) {
{.text = "THIRD",
.submenu =
(struct tray_menu[]){
(struct tray_menu[]) {
{.text = "7", .cb = submenu_cb},
{.text = "-"},
{.text = "8", .cb = submenu_cb},
{.text = NULL}}},
{.text = "FOUR",
.submenu =
(struct tray_menu[]){
(struct tray_menu[]) {
{.text = "5", .cb = submenu_cb},
{.text = "6", .cb = submenu_cb},
{.text = NULL}}},