Skip to content

Commit

Permalink
Add GdkEvent.Scroll.delta_{x,y} (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
talex5 authored Jan 30, 2024
1 parent 7e41440 commit 46c50b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gdkEvent.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/ml_gdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 46c50b4

Please sign in to comment.