-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show the window when left-clicking tray icon
- Loading branch information
Showing
6 changed files
with
289 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef TRAY_H | ||
#define TRAY_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
struct tray { | ||
const char *icon_filepath; | ||
const char *tooltip; | ||
void (*cb)(struct tray *); // called on left click, leave null to just open menu | ||
struct tray_menu_item *menu; | ||
}; | ||
|
||
struct tray_menu_item { | ||
const char *text; | ||
int disabled; | ||
int checked; | ||
void (*cb)(struct tray_menu_item *); | ||
struct tray_menu_item *submenu; | ||
}; | ||
|
||
struct tray * tray_get_instance(); | ||
|
||
int tray_init(struct tray *tray); | ||
|
||
int tray_loop(int blocking); | ||
|
||
void tray_update(struct tray *tray); | ||
|
||
void tray_exit(void); | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif | ||
|
||
#endif /* TRAY_H */ |
Oops, something went wrong.