summaryrefslogtreecommitdiff
path: root/gui-over.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-14 13:01:35 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-14 13:01:58 -0300
commit332b9b085d45225dac6adf5ed055ebe6d96d084b (patch)
tree6b9aba579d87f5d3b6427f9f2965815d252a616e /gui-over.c
parent3e54107e82c79c03fd1bdc8f6bcb519b57d31450 (diff)
downloadeeshow-332b9b085d45225dac6adf5ed055ebe6d96d084b.tar.gz
eeshow-332b9b085d45225dac6adf5ed055ebe6d96d084b.tar.bz2
eeshow-332b9b085d45225dac6adf5ed055ebe6d96d084b.zip
eeshow/: history list can now be dragged
Diffstat (limited to 'gui-over.c')
-rw-r--r--gui-over.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui-over.c b/gui-over.c
index cfdd9ef..72e7a75 100644
--- a/gui-over.c
+++ b/gui-over.c
@@ -44,6 +44,7 @@ struct overlay {
struct aoi **aois;
bool (*hover)(void *user, bool on);
void (*click)(void *user);
+ void (*drag)(void *user, int dx, int dy);
void *user;
struct aoi *aoi;
@@ -163,6 +164,7 @@ fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over->
.h = h,
.hover = over->hover,
.click = over->click,
+ .drag = over->drag,
.user = over->user,
};
@@ -220,6 +222,13 @@ void overlay_style(struct overlay *over, const struct overlay_style *style)
}
+void overlay_draggable(struct overlay *over,
+ void (*drag)(void *user, int dx, int dy))
+{
+ over->drag = drag;
+}
+
+
void overlay_text_raw(struct overlay *over, const char *s)
{
free((char *) over->s);