MCPcopy Create free account
hub / github.com/HumbleUI/JWM / EventMouseScroll

Class EventMouseScroll

shared/java/EventMouseScroll.java:6–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import org.jetbrains.annotations.*;
5
6@Data
7public class EventMouseScroll implements Event {
8 /**
9 * Always has pixel value, but might be an estimation on Windows.
10 * Direction ← + / − →
11 */
12 @ApiStatus.Internal public final float _deltaX;
13
14 /**
15 * Always has pixel value to scroll, but might be an estimation on Windows.
16 * ↑ + / ↓ −
17 */
18 @ApiStatus.Internal public final float _deltaY;
19
20 /**
21 * On Windows, how many characters to scroll horizontally.
22 * Might be used instead of deltaX for more precise scrolling.
23 * Always zero on macOS.
24 */
25 @ApiStatus.Internal public final float _deltaChars;
26
27 /**
28 * On Windows, how many lines of content to scroll vertically.
29 * Might be used instead of deltaY for more precise scrolling.
30 * Always zero on macOS and on Windows if scrolling is set to pages.
31 */
32 @ApiStatus.Internal public final float _deltaLines;
33
34 /**
35 * On Windows, how many whole pages to scroll vertically.
36 * Only non-zero on Windows if scrolling is set to pages.
37 */
38 @ApiStatus.Internal public final float _deltaPages;
39
40 @ApiStatus.Internal public final int _x;
41 @ApiStatus.Internal public final int _y;
42
43 @ApiStatus.Internal @Getter(AccessLevel.NONE) public final int _modifiers;
44
45 public boolean isModifierDown(KeyModifier modifier) {
46 return (_modifiers & modifier._mask) != 0;
47 }
48}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected