From d989e7f1e88f83655699d9dd4f11ceeb88b26407 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 14 Dec 2023 12:07:52 +0000 Subject: [PATCH] Add GdkEvent.Scroll.delta_{x,y} --- src/gdkEvent.ml | 2 ++ src/ml_gdk.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gdkEvent.ml b/src/gdkEvent.ml index 418240c6c..e72b52acc 100644 --- a/src/gdkEvent.ml +++ b/src/gdkEvent.ml @@ -121,6 +121,8 @@ module Scroll = struct external device : t -> device = "ml_GdkEventScroll_device" external x_root : t -> float = "ml_GdkEventScroll_x_root" external y_root : t -> float = "ml_GdkEventScroll_y_root" + external delta_x : t -> float = "ml_GdkEventScroll_delta_x" + external delta_y : t -> float = "ml_GdkEventScroll_delta_y" end module Key = struct diff --git a/src/ml_gdk.c b/src/ml_gdk.c index 2718a1859..4d36eb23d 100644 --- a/src/ml_gdk.c +++ b/src/ml_gdk.c @@ -548,6 +548,8 @@ Make_Extractor (GdkEventScroll, GdkEvent_arg(Scroll), Make_Extractor (GdkEventScroll, GdkEvent_arg(Scroll), device, Val_GdkDevice) Make_Extractor (GdkEventScroll, GdkEvent_arg(Scroll), x_root, copy_double) Make_Extractor (GdkEventScroll, GdkEvent_arg(Scroll), y_root, copy_double) +Make_Extractor (GdkEventScroll, GdkEvent_arg(Scroll), delta_x, copy_double) +Make_Extractor (GdkEventScroll, GdkEvent_arg(Scroll), delta_y, copy_double) Make_Extractor (GdkEventKey, GdkEvent_arg(Key), state, Val_int) Make_Extractor (GdkEventKey, GdkEvent_arg(Key), keyval, Val_int)