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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| Lwjgl2WindowBridge() | Creates the window bridge of the current LWJGL 2 display, without changing anything in Display nor in Mouse. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Creation details
Section titled “Creation details”Lwjgl2WindowBridge
Section titled “Lwjgl2WindowBridge”Lwjgl2WindowBridge()
Creates the window bridge of the current LWJGL 2 display, without changing anything in Display nor in Mouse.
Method details
Section titled “Method details”getWidth
Section titled “getWidth”int getWidth()
Returns the width of the Display times its pixel scale factor.
getHeight
Section titled “getHeight”int getHeight()
Returns the height of the Display times its pixel scale factor.
getMouseX
Section titled “getMouseX”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.
getMouseY
Section titled “getMouseY”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.
isMouseGrabbed
Section titled “isMouseGrabbed”boolean isMouseGrabbed()
If true, LWJGL 2 grabs the mouse.
isKeyDown
Section titled “isKeyDown”boolean isKeyDown(Key physicalKey)
If true, LWJGL 2 reports the key at that physical position as pressed.
getClipboard
Section titled “getClipboard”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.
setClipboard
Section titled “setClipboard”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
