mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
JS: add missing mouseevent methods (#542)
This commit is contained in:
parent
b718e7852f
commit
bec0f44869
|
@ -41,6 +41,18 @@ public interface MouseEvent extends Event {
|
||||||
@JSProperty
|
@JSProperty
|
||||||
int getClientY();
|
int getClientY();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getOffsetX();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getOffsetY();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getPageX();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
int getPageY();
|
||||||
|
|
||||||
@JSProperty
|
@JSProperty
|
||||||
boolean getCtrlKey();
|
boolean getCtrlKey();
|
||||||
|
|
||||||
|
@ -56,6 +68,9 @@ public interface MouseEvent extends Event {
|
||||||
@JSProperty
|
@JSProperty
|
||||||
short getButton();
|
short getButton();
|
||||||
|
|
||||||
|
@JSProperty
|
||||||
|
short getButtons();
|
||||||
|
|
||||||
@JSProperty
|
@JSProperty
|
||||||
EventTarget getRelatedTarget();
|
EventTarget getRelatedTarget();
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,14 @@ public interface MouseEventTarget extends EventTarget {
|
||||||
removeEventListener("mouseup", listener);
|
removeEventListener("mouseup", listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default void listenMouseMove(EventListener<MouseEvent> listener) {
|
||||||
|
addEventListener("mousemove", listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
default void neglectMouseMove(EventListener<MouseEvent> listener) {
|
||||||
|
removeEventListener("mousemove", listener);
|
||||||
|
}
|
||||||
|
|
||||||
default void listenMouseOver(EventListener<MouseEvent> listener) {
|
default void listenMouseOver(EventListener<MouseEvent> listener) {
|
||||||
addEventListener("mouseover", listener);
|
addEventListener("mouseover", listener);
|
||||||
}
|
}
|
||||||
|
@ -64,7 +72,7 @@ public interface MouseEventTarget extends EventTarget {
|
||||||
removeEventListener("mouseenter", listener);
|
removeEventListener("mouseenter", listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
default void listenMouseLeaeve(EventListener<MouseEvent> listener) {
|
default void listenMouseLeave(EventListener<MouseEvent> listener) {
|
||||||
addEventListener("mouseleave", listener);
|
addEventListener("mouseleave", listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user