Skip to content

Lwjgl2WindowBridge

final class Lwjgl2WindowBridge
Implements: IWindowBridge
Package: dev.joid.base.lwjgl2.window · Module: base-lwjgl2 · Source: Lwjgl2WindowBridge.java
Backends: LWJGL 2

The window bridge of the Display of LWJGL 2, in screen pixels, with the clipboard of AWT and native cursors.

ReturnsSignatureSummary
Lwjgl2WindowBridge()Creates the window bridge of the current LWJGL 2 display, without changing anything in Display nor in Mouse.

ReturnsSignatureSummary
intgetWidth()Returns the width of the Display times its pixel scale factor.
intgetHeight()Returns the height of the Display times its pixel scale factor.
doublegetMouseX()Returns the horizontal position of the mouse, in screen pixels from the left edge; while Lwjgl2InputForwarder forwards a mouse event, the position of that event.
doublegetMouseY()Returns the vertical position of the mouse, in screen pixels from the top edge; while Lwjgl2InputForwarder forwards a mouse event, the position of that event.
booleanisMouseGrabbed()If true, LWJGL 2 grabs the mouse.
booleanisKeyDown(Key physicalKey)If true, LWJGL 2 reports the key at that physical position as pressed.
StringgetClipboard()Returns the text of the system clipboard through AWT, or an empty string; with the dev jar, prints once when the clipboard cannot be read.
voidsetClipboard(String text)Puts the text in the system clipboard through AWT; with the dev jar, prints once when the clipboard cannot be written.

Lwjgl2WindowBridge()

Creates the window bridge of the current LWJGL 2 display, without changing anything in Display nor in Mouse.

int getWidth()

Returns the width of the Display times its pixel scale factor.

int getHeight()

Returns the height of the Display times its pixel scale factor.

double getMouseX()

Returns the horizontal position of the mouse, in screen pixels from the left edge; while Lwjgl2InputForwarder forwards a mouse event, the position of that event.

double getMouseY()

Returns the vertical position of the mouse, in screen pixels from the top edge; while Lwjgl2InputForwarder forwards a mouse event, the position of that event.

boolean isMouseGrabbed()

If true, LWJGL 2 grabs the mouse.

boolean isKeyDown(Key physicalKey)

If true, LWJGL 2 reports the key at that physical position as pressed.

String getClipboard()

Returns the text of the system clipboard through AWT, or an empty string; with the dev jar, prints once when the clipboard cannot be read.

void setClipboard(String text)

Puts the text in the system clipboard through AWT; with the dev jar, prints once when the clipboard cannot be written.


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