diff options
author | 2017-06-14 18:53:32 -0400 | |
---|---|---|
committer | 2017-06-14 18:53:32 -0400 | |
commit | eb6e38c86d2deb37cc6f378f8644c4a530fd7448 (patch) | |
tree | e3c567c4684faf0f9a7f77494f1bf638171d5349 /include/swaybar/event_loop.h | |
parent | Merge pull request #1236 from ykrivopalov/fix_complex_status_command (diff) | |
parent | Merge branch 'master' into tray (diff) | |
download | sway-eb6e38c86d2deb37cc6f378f8644c4a530fd7448.tar.gz sway-eb6e38c86d2deb37cc6f378f8644c4a530fd7448.tar.zst sway-eb6e38c86d2deb37cc6f378f8644c4a530fd7448.zip |
Implement Tray Icons
Diffstat (limited to 'include/swaybar/event_loop.h')
-rw-r--r-- | include/swaybar/event_loop.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/swaybar/event_loop.h b/include/swaybar/event_loop.h new file mode 100644 index 00000000..a0cde07f --- /dev/null +++ b/include/swaybar/event_loop.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _SWAYBAR_EVENT_LOOP_H | ||
2 | #define _SWAYBAR_EVENT_LOOP_H | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include <time.h> | ||
6 | |||
7 | void add_event(int fd, short mask, | ||
8 | void(*cb)(int fd, short mask, void *data), | ||
9 | void *data); | ||
10 | |||
11 | // Not guaranteed to notify cb immediately | ||
12 | void add_timer(timer_t timer, | ||
13 | void(*cb)(timer_t timer, void *data), | ||
14 | void *data); | ||
15 | |||
16 | // Returns false if nothing exists, true otherwise | ||
17 | bool remove_event(int fd); | ||
18 | |||
19 | // Returns false if nothing exists, true otherwise | ||
20 | bool remove_timer(timer_t timer); | ||
21 | |||
22 | // Blocks and returns after sending callbacks | ||
23 | void event_loop_poll(); | ||
24 | |||
25 | void init_event_loop(); | ||
26 | #endif /*_SWAYBAR_EVENT_LOOP_H */ | ||