make hotspot callback take an x11 button id

This commit is contained in:
Peter Rice 2018-07-15 20:16:37 -04:00
parent b314a8f2cc
commit 79a998849b
5 changed files with 51 additions and 6 deletions

View file

@ -16,11 +16,24 @@ struct swaybar_pointer {
int x, y;
};
enum x11_button {
NONE,
LEFT,
MIDDLE,
RIGHT,
SCROLL_UP,
SCROLL_DOWN,
SCROLL_LEFT,
SCROLL_RIGHT,
BACK,
FORWARD,
};
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);
int x, int y, enum x11_button button, void *data);
void (*destroy)(void *data);
void *data;
};