From 1cb268f2e7bcf406828cb00dbf3a2f363b219274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 29 Dec 2018 12:55:03 +0100 Subject: [PATCH] exposable: define an 'on_mouse' interface function --- particle.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/particle.h b/particle.h index 232fef7..b2211f6 100644 --- a/particle.h +++ b/particle.h @@ -20,6 +20,10 @@ struct particle { const struct tag_set *tags); }; +enum mouse_event { + ON_MOUSE_MOTION, + ON_MOUSE_CLICK, +}; struct exposable { const struct particle *particle; @@ -31,6 +35,9 @@ struct exposable { int (*begin_expose)(struct exposable *exposable, cairo_t *cr); void (*expose)(const struct exposable *exposable, cairo_t *cr, int x, int y, int height); + + void (*on_mouse)(struct exposable *exposable, struct bar *bar, + enum mouse_event event, int x, int y); }; struct particle *particle_common_new(int left_margin, int right_margin);