From d78caddaf9ad1b854a800fb74a20ba0f357a8083 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Thu, 18 Aug 2016 02:08:02 -0300 Subject: [PATCH] eeshow/gui/over.h, over.c: remove dragging support (now input.c) The crazy detour through aoi.c and over.c is no longer needed. --- eeshow/gui/over.c | 11 +---------- eeshow/gui/over.h | 2 -- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/eeshow/gui/over.c b/eeshow/gui/over.c index 43aa80a..9583b81 100644 --- a/eeshow/gui/over.c +++ b/eeshow/gui/over.c @@ -44,7 +44,6 @@ 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; @@ -146,7 +145,7 @@ fprintf(stderr, "%u(%d) %u %.60s\n", ty, ink_rect.y / PANGO_SCALE, ink_h, over-> cairo_reset_clip(cr); g_object_unref(layout); - if (over->hover || over->click || over->drag) { + if (over->hover || over->click) { struct aoi aoi_cfg = { .x = x, .y = y, @@ -154,7 +153,6 @@ 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, }; @@ -248,13 +246,6 @@ 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); diff --git a/eeshow/gui/over.h b/eeshow/gui/over.h index f340282..c6f8fed 100644 --- a/eeshow/gui/over.h +++ b/eeshow/gui/over.h @@ -50,8 +50,6 @@ struct overlay *overlay_add(struct overlay **overlays, struct aoi **aois, void overlay_text_raw(struct overlay *over, const char *s); void overlay_text(struct overlay *over, const char *fmt, ...); 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)); void overlay_remove(struct overlay **overlays, struct overlay *over); void overlay_remove_all(struct overlay **overlays);