class X11Screen extends java.lang.Object implements NativeScreen
Modifier and Type | Field and Description |
---|---|
private int |
depth |
private long |
display |
private int |
height |
private int |
nativeFormat |
private long |
nativeHandle |
private int |
width |
private static X |
xLib |
framebufferSwapLock
Constructor and Description |
---|
X11Screen(boolean showCursor)
Create the screen.
|
Modifier and Type | Method and Description |
---|---|
int |
getDepth()
Returns the bit depth of the screen/
|
(package private) long |
getDisplay() |
int |
getDPI()
Returns the number of pixels per inch in the screen.
|
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.
|
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 x,
int y,
int width,
int height,
float alpha)
Uploads a pixel buffer to the screen.
|
private int depth
private int nativeFormat
private int width
private int height
private long nativeHandle
private long display
private static X xLib
X11Screen(boolean showCursor)
showCursor
- public int getDepth()
NativeScreen
getDepth
in interface NativeScreen
public int getNativeFormat()
NativeScreen
getNativeFormat
in interface NativeScreen
public int getWidth()
NativeScreen
getWidth
in interface NativeScreen
public int getHeight()
NativeScreen
getHeight
in interface NativeScreen
public float getScale()
NativeScreen
getScale
in interface NativeScreen
public long getNativeHandle()
NativeScreen
getNativeHandle
in interface NativeScreen
public int getDPI()
NativeScreen
getDPI
in interface NativeScreen
public void shutdown()
NativeScreen
shutdown
in interface NativeScreen
long getDisplay()
public void uploadPixels(java.nio.Buffer b, int x, int y, int width, int height, float alpha)
NativeScreen
uploadPixels
in interface NativeScreen
b
- Pixel data, in BYTE_BGRA_PRE format. The byte stride of the
data is equal to width * 4.x
- The X offset of the pixel data on the screeny
- The Y offset of the pixel data on the screenwidth
- The pixel width of the dataheight
- The pixel height of the dataalpha
- The alpha level to use to compose the data over existing
pixelspublic void swapBuffers()
NativeScreen
swapBuffers
in interface NativeScreen
public java.nio.ByteBuffer getScreenCapture()
NativeScreen
getScreenCapture
in interface NativeScreen