From 871de15b30f3135abe3c57a06d546a3b90151f77 Mon Sep 17 00:00:00 2001 From: Yuri Pourre Date: Thu, 1 Jul 2021 16:43:13 -0300 Subject: [PATCH 1/2] Add preventDefault method to Event --- .../src/main/java/de/mirkosertic/bytecoder/api/web/Event.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/Event.java b/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/Event.java index 9b446fb9bd..583cd64b4e 100644 --- a/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/Event.java +++ b/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/Event.java @@ -15,6 +15,7 @@ */ package de.mirkosertic.bytecoder.api.web; +import de.mirkosertic.bytecoder.api.OpaqueMethod; import de.mirkosertic.bytecoder.api.OpaqueProperty; import de.mirkosertic.bytecoder.api.OpaqueReferenceType; @@ -23,4 +24,6 @@ public interface Event extends OpaqueReferenceType { @OpaqueProperty String type(); + @OpaqueMethod("preventDefault") + void preventDefault(); } From 7ce23d67ac95c2696d462d467fe6d7abe6a9d671 Mon Sep 17 00:00:00 2001 From: Yuri Pourre Date: Thu, 1 Jul 2021 16:43:24 -0300 Subject: [PATCH 2/2] Add WheelEvent --- .../bytecoder/api/web/WheelEvent.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/WheelEvent.java diff --git a/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/WheelEvent.java b/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/WheelEvent.java new file mode 100644 index 0000000000..8a5163f4a5 --- /dev/null +++ b/classlib/bytecoder.web/src/main/java/de/mirkosertic/bytecoder/api/web/WheelEvent.java @@ -0,0 +1,18 @@ +package de.mirkosertic.bytecoder.api.web; + +import de.mirkosertic.bytecoder.api.OpaqueProperty; + +public interface WheelEvent extends MouseEvent { + + @OpaqueProperty + int deltaX(); + + @OpaqueProperty + int deltaY(); + + @OpaqueProperty + int deltaZ(); + + @OpaqueProperty + int deltaMode(); +}