summaryrefslogtreecommitdiff
path: root/gui/aoi.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 03:25:56 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 03:25:56 -0300
commit7dba2d97f3964f29e0d89b213b37e1a1b6bac3a9 (patch)
tree6d47d6590e9197781cf2d0e5d8fcb31f5a952dfe /gui/aoi.h
parent9e65d63432b334111b78bebbf29525b330e54730 (diff)
downloadeeshow-7dba2d97f3964f29e0d89b213b37e1a1b6bac3a9.tar.gz
eeshow-7dba2d97f3964f29e0d89b213b37e1a1b6bac3a9.tar.bz2
eeshow-7dba2d97f3964f29e0d89b213b37e1a1b6bac3a9.zip
eeshow/gui/aoi.c (aoi_set_related): AoIs can now share clicks
If A is related to B, then A can receive clicks while B is hovering, without getting B de-hovered. Note that in aoi_set_related(A, B), more than one A can share one B, but an A can't have more than one B.
Diffstat (limited to 'gui/aoi.h')
-rw-r--r--gui/aoi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gui/aoi.h b/gui/aoi.h
index 959762f..935f526 100644
--- a/gui/aoi.h
+++ b/gui/aoi.h
@@ -24,6 +24,8 @@ struct aoi {
void (*click)(void *user);
void *user;
+ const struct aoi *related; /* considered equal for clicks */
+
struct aoi *next;
};
@@ -34,6 +36,8 @@ bool aoi_hover(const struct aoi *aois, int x, int y);
bool aoi_click(const struct aoi *aois, int x, int y);
+void aoi_set_related(struct aoi *aoi, const struct aoi *related);
+
void aoi_remove(struct aoi **aois, const struct aoi *aoi);
void aoi_dehover(void);