From 5c5f54709cc99370d7c71a8c03dc0643821be9a6 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Thu, 19 May 2016 15:47:40 +0200
Subject: [PATCH] gui/timeline.c scroll up/down event to include x, y,
 key_modifiers

---
 common/utils/T/tracer/gui/gui.h      |  4 ++--
 common/utils/T/tracer/gui/timeline.c | 12 +++++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/common/utils/T/tracer/gui/gui.h b/common/utils/T/tracer/gui/gui.h
index 5ae623f559..464ac94463 100644
--- a/common/utils/T/tracer/gui/gui.h
+++ b/common/utils/T/tracer/gui/gui.h
@@ -86,8 +86,8 @@ int new_color(gui *gui, char *color);
  *      - click      { int: button } (if enabled)
  * - timeline
  *      - resize     { int: width }
- *      - scrollup   { void *: NULL }
- *      - scrolldown { void *: NULL }
+ *      - scrollup   { int [3]: x, y, key_modifiers }
+ *      - scrolldown { int [3]: x, y, key_modifiers }
  */
 
 /* same type as in gui_defs.h */
diff --git a/common/utils/T/tracer/gui/timeline.c b/common/utils/T/tracer/gui/timeline.c
index 43cbcc525f..afcb681f9d 100644
--- a/common/utils/T/tracer/gui/timeline.c
+++ b/common/utils/T/tracer/gui/timeline.c
@@ -58,15 +58,21 @@ static void button(gui *_g, widget *_this, int x, int y,
     int key_modifiers, int button, int up)
 {
   struct gui *g = _g;
-  struct timeline_widget *this = _this;
+  int d[3];
   LOGD("BUTTON timeline %p xy %d %d button %d up %d\n", _this, x, y, button, up);
   /* scroll up */
   if (button == 4 && up == 0) {
-    gui_notify(g, "scrollup", _this, NULL);
+    d[0] = x;
+    d[1] = y;
+    d[2] = key_modifiers;
+    gui_notify(g, "scrollup", _this, d);
   }
   /* scroll down */
   if (button == 5 && up == 0) {
-    gui_notify(g, "scrolldown", _this, NULL);
+    d[0] = x;
+    d[1] = y;
+    d[2] = key_modifiers;
+    gui_notify(g, "scrolldown", _this, d);
   }
 }
 
-- 
2.26.2