1
0
forked from Yadciel/c_tray

Delete main.c

This commit is contained in:
Jesse Lawson
2017-08-22 10:32:55 -07:00
committed by GitHub
parent 64cb5fc36e
commit b7fec21c1f

35
main.c
View File

@@ -1,35 +0,0 @@
#include <stdio.h>
#include "tray.h"
extern void toggle_cb(struct tray_menu *item);
extern void quit_cb(struct tray_menu *item);
struct tray main_tray = {
.icon = "icon.ico",
.menu = (struct tray_menu[]){{"Toggle me", 0, 0, toggle_cb, NULL},
{"-", 0, 0, NULL, NULL},
{"Quit", 0, 0, quit_cb, NULL},
{NULL, 0, 0, NULL, NULL}},
};
void toggle_cb(struct tray_menu *item) {
item->checked = !item->checked;
tray_update(&main_tray);
}
void quit_cb(struct tray_menu *item) {
tray_exit();
}
int main() {
tray_init(&main_tray);
while (tray_loop(1) == 0);
tray_exit();
return 0;
}