From 65022e1cbf0ccf8764dcef7e2a738feb3331deeb Mon Sep 17 00:00:00 2001 From: "akokshar@redhat.com" Date: Tue, 29 Aug 2017 11:19:43 +0200 Subject: click_events as documented at https://i3wm.org/docs/i3bar-protocol.html --- include/swaybar/status_line.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/swaybar/status_line.h') diff --git a/include/swaybar/status_line.h b/include/swaybar/status_line.h index 9b77e8a7..0664ddee 100644 --- a/include/swaybar/status_line.h +++ b/include/swaybar/status_line.h @@ -13,6 +13,7 @@ struct status_line { list_t *block_line; const char *text_line; command_protocol protocol; + bool click_events; }; struct status_block { @@ -31,6 +32,10 @@ struct status_block { int border_bottom; int border_left; int border_right; + + // Set during rendering + int x; + int width; }; /** @@ -43,6 +48,11 @@ struct status_line *init_status_line(); */ bool handle_status_line(struct bar *bar); +/** + * Handle mouse clicks. + */ +bool status_line_mouse_event(struct bar *bar, int x, int y, uint32_t button); + /** * Free status line struct. */ -- cgit v1.2.3