Skip to content

Lwjgl2InputForwarder

final class Lwjgl2InputForwarder
Package: dev.joid.base.lwjgl2.input · Module: base-lwjgl2 · Source: Lwjgl2InputForwarder.java
Backends: LWJGL 2

Reads the pending mouse and keyboard events of LWJGL 2 and forwards them to the UI bridges of JOID.

ReturnsSignatureSummary
voidpoll() staticDrains the event queues of Mouse and Keyboard and forwards every event with forwardMouseEvent() and forwardKeyboardEvent().
booleanforwardMouseEvent() staticForwards the current event of Mouse, after Mouse.next(), to BridgeHandler.UI: a move, a press or a release, and the wheel in notches of 120.
booleanforwardKeyboardEvent() staticForwards the current event of Keyboard, after Keyboard.next(), to BridgeHandler.UI: a press with the character it types, a repeat as a question on its press with its character, a release, or a character alone.
booleanisForwardingMouseEvent() staticIf true, forwardMouseEvent() is running, and Lwjgl2WindowBridge reads the position of the event of Mouse instead of its current position.

void poll() static

Drains the event queues of Mouse and Keyboard and forwards every event with forwardMouseEvent() and forwardKeyboardEvent(). Call it once per frame, before frame(); the rest of the application does not receive the events that it reads.

boolean forwardMouseEvent() static

Forwards the current event of Mouse, after Mouse.next(), to BridgeHandler.UI: a move, a press or a release, and the wheel in notches of 120. During the call, Lwjgl2WindowBridge reports the position of the event. Returns true when JOID consumed the event, which the host then drops.

boolean forwardKeyboardEvent() static

Forwards the current event of Keyboard, after Keyboard.next(), to BridgeHandler.UI: a press with the character it types, a repeat as a question on its press with its character, a release, or a character alone. Returns true when JOID consumed the event, which the host then drops.

boolean isForwardingMouseEvent() static

If true, forwardMouseEvent() is running, and Lwjgl2WindowBridge reads the position of the event of Mouse instead of its current position.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page