aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-07-23 20:27:56 -0400
committerDrew DeVault <sir@cmpwn.com>2018-07-23 20:31:11 -0400
commitf4b882475eee7a81c206c7825616cc4656b2f60b (patch)
tree38e6ebf81b235424f105dcbcbb194e5e9eac70c0 /include/swaybar
parentacd79e1505c06089e4fb9fb6c0c6e1d351ba9176 (diff)
parent224ade138208e9aa525423cbfbd643aa9d9b63c3 (diff)
downloadsway-f4b882475eee7a81c206c7825616cc4656b2f60b.tar.xz
Merge branch 'master' into pid-workspaces
Diffstat (limited to 'include/swaybar')
-rw-r--r--include/swaybar/bar.h22
-rw-r--r--include/swaybar/status_line.h6
2 files changed, 24 insertions, 4 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h
index af478f33..1cecea71 100644
--- a/include/swaybar/bar.h
+++ b/include/swaybar/bar.h
@@ -16,11 +16,29 @@ struct swaybar_pointer {
int x, y;
};
+enum x11_button {
+ NONE,
+ LEFT,
+ MIDDLE,
+ RIGHT,
+ SCROLL_UP,
+ SCROLL_DOWN,
+ SCROLL_LEFT,
+ SCROLL_RIGHT,
+ BACK,
+ FORWARD,
+};
+
+enum hotspot_event_handling {
+ HOTSPOT_IGNORE,
+ HOTSPOT_PROCESS,
+};
+
struct swaybar_hotspot {
struct wl_list link;
int x, y, width, height;
- void (*callback)(struct swaybar_output *output,
- int x, int y, uint32_t button, void *data);
+ enum hotspot_event_handling (*callback)(struct swaybar_output *output,
+ int x, int y, enum x11_button button, void *data);
void (*destroy)(void *data);
void *data;
};
diff --git a/include/swaybar/status_line.h b/include/swaybar/status_line.h
index bf12a842..de9b98d7 100644
--- a/include/swaybar/status_line.h
+++ b/include/swaybar/status_line.h
@@ -71,8 +71,10 @@ void status_error(struct status_line *status, const char *text);
bool status_handle_readable(struct status_line *status);
void status_line_free(struct status_line *status);
bool i3bar_handle_readable(struct status_line *status);
-void i3bar_block_send_click(struct status_line *status,
- struct i3bar_block *block, int x, int y, uint32_t button);
+enum hotspot_event_handling i3bar_block_send_click(struct status_line *status,
+ struct i3bar_block *block, int x, int y, enum x11_button button);
void i3bar_block_free(struct i3bar_block *block);
+enum x11_button wl_button_to_x11_button(uint32_t button);
+enum x11_button wl_axis_to_x11_button(uint32_t axis, wl_fixed_t value);
#endif