class FBDevScreen extends java.lang.Object implements NativeScreen
| Modifier and Type | Field and Description |
|---|---|
private int |
consoleCursorBlink |
private Framebuffer |
fb |
private java.nio.channels.FileChannel |
fbdev |
private java.lang.String |
fbDevPath |
private boolean |
isShutdown |
private LinuxFrameBuffer |
linuxFB |
private java.nio.ByteBuffer |
mappedFB |
private int |
nativeFormat |
private long |
nativeHandle |
framebufferSwapLock| Constructor and Description |
|---|
FBDevScreen() |
| Modifier and Type | Method and Description |
|---|---|
private void |
closeFBDev() |
private void |
forEachPixelOffset(java.util.function.IntConsumer c) |
int |
getDepth()
Returns the bit depth of the screen/
|
int |
getDPI()
Returns the number of pixels per inch in the screen.
|
private Framebuffer |
getFramebuffer() |
int |
getHeight()
Returns the pixel height of the screen.
|
int |
getNativeFormat()
Returns the native format of the screen, as a constant from the Pixels
class.
|
long |
getNativeHandle()
Returns a native handle for the screen.
|
float |
getScale()
Return the scale factor between the physical pixels and the logical pixels
e.g.
|
java.nio.ByteBuffer |
getScreenCapture()
Returns a read-only ByteBuffer in the native pixel format containing the screen contents.
|
int |
getWidth()
Returns the pixel width of the screen.
|
private boolean |
isFBDevOpen() |
private void |
openFBDev() |
void |
shutdown()
Called during JavaFX shutdown to release the screen.
|
void |
swapBuffers()
Called on the JavaFX application thread when pixel data for all windows
has been uploaded.
|
void |
uploadPixels(java.nio.Buffer b,
int pX,
int pY,
int pWidth,
int pHeight,
float alpha)
Uploads a pixel buffer to the screen.
|
private void |
writeBuffer() |
private int nativeFormat
private long nativeHandle
private java.nio.channels.FileChannel fbdev
private java.nio.ByteBuffer mappedFB
private boolean isShutdown
private int consoleCursorBlink
private Framebuffer fb
private LinuxFrameBuffer linuxFB
private final java.lang.String fbDevPath
public int getDepth()
NativeScreengetDepth in interface NativeScreenpublic int getNativeFormat()
NativeScreengetNativeFormat in interface NativeScreenpublic int getWidth()
NativeScreengetWidth in interface NativeScreenpublic int getHeight()
NativeScreengetHeight in interface NativeScreenpublic long getNativeHandle()
NativeScreengetNativeHandle in interface NativeScreenpublic float getScale()
NativeScreengetScale in interface NativeScreenpublic int getDPI()
NativeScreengetDPI in interface NativeScreenprivate boolean isFBDevOpen()
private void openFBDev()
throws java.io.IOException
java.io.IOExceptionprivate void closeFBDev()
private Framebuffer getFramebuffer()
private void forEachPixelOffset(java.util.function.IntConsumer c)
public void shutdown()
NativeScreenshutdown in interface NativeScreenpublic void uploadPixels(java.nio.Buffer b,
int pX,
int pY,
int pWidth,
int pHeight,
float alpha)
NativeScreenuploadPixels in interface NativeScreenb - Pixel data, in BYTE_BGRA_PRE format. The byte stride of the
data is equal to width * 4.pX - The X offset of the pixel data on the screenpY - The Y offset of the pixel data on the screenpWidth - The pixel width of the datapHeight - The pixel height of the dataalpha - The alpha level to use to compose the data over existing
pixelspublic void swapBuffers()
NativeScreenswapBuffers in interface NativeScreenprivate void writeBuffer()
throws java.io.IOException
java.io.IOExceptionpublic java.nio.ByteBuffer getScreenCapture()
NativeScreengetScreenCapture in interface NativeScreen