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