mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 04:45:41 +02:00
exposable: define an 'on_mouse' interface function
This commit is contained in:
parent
e8d8bf70d3
commit
1cb268f2e7
1 changed files with 7 additions and 0 deletions
|
@ -20,6 +20,10 @@ struct particle {
|
||||||
const struct tag_set *tags);
|
const struct tag_set *tags);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum mouse_event {
|
||||||
|
ON_MOUSE_MOTION,
|
||||||
|
ON_MOUSE_CLICK,
|
||||||
|
};
|
||||||
|
|
||||||
struct exposable {
|
struct exposable {
|
||||||
const struct particle *particle;
|
const struct particle *particle;
|
||||||
|
@ -31,6 +35,9 @@ struct exposable {
|
||||||
int (*begin_expose)(struct exposable *exposable, cairo_t *cr);
|
int (*begin_expose)(struct exposable *exposable, cairo_t *cr);
|
||||||
void (*expose)(const struct exposable *exposable, cairo_t *cr,
|
void (*expose)(const struct exposable *exposable, cairo_t *cr,
|
||||||
int x, int y, int height);
|
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);
|
struct particle *particle_common_new(int left_margin, int right_margin);
|
||||||
|
|
Loading…
Add table
Reference in a new issue