diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-13 16:04:37 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-15 00:26:27 +1000 |
commit | 4056c09e13c1aeead6dd4085fc7e263a17a0b195 (patch) | |
tree | a3413f2a5717968e370d68521b689580d5adc5a0 /include/swaybar/bar.h | |
parent | Document `border csd` (diff) | |
download | sway-4056c09e13c1aeead6dd4085fc7e263a17a0b195.tar.gz sway-4056c09e13c1aeead6dd4085fc7e263a17a0b195.tar.zst sway-4056c09e13c1aeead6dd4085fc7e263a17a0b195.zip |
Move swaybar's event loop to common directory and refactor
* The loop functions are now prefixed with `loop_`.
* It is now easy to add timers to the loop.
* Timers are implemented using pollfd and timerfd, rather than manually
checking them when any other event happens to arrive.
Diffstat (limited to 'include/swaybar/bar.h')
-rw-r--r-- | include/swaybar/bar.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h index 9ff3fe7b..d61da5dc 100644 --- a/include/swaybar/bar.h +++ b/include/swaybar/bar.h | |||
@@ -8,6 +8,8 @@ | |||
8 | struct swaybar_config; | 8 | struct swaybar_config; |
9 | struct swaybar_output; | 9 | struct swaybar_output; |
10 | struct swaybar_workspace; | 10 | struct swaybar_workspace; |
11 | struct loop; | ||
12 | struct loop_event; | ||
11 | 13 | ||
12 | struct swaybar_pointer { | 14 | struct swaybar_pointer { |
13 | struct wl_pointer *pointer; | 15 | struct wl_pointer *pointer; |
@@ -66,6 +68,9 @@ struct swaybar { | |||
66 | struct swaybar_pointer pointer; | 68 | struct swaybar_pointer pointer; |
67 | struct status_line *status; | 69 | struct status_line *status; |
68 | 70 | ||
71 | struct loop *eventloop; | ||
72 | struct loop_event *status_event; | ||
73 | |||
69 | int ipc_event_socketfd; | 74 | int ipc_event_socketfd; |
70 | int ipc_socketfd; | 75 | int ipc_socketfd; |
71 | 76 | ||