Top Fields Constructors Methods
com.sun.glass.ui.monocle

public Class EGLScreen

extends Object
implements NativeScreen
Class Inheritance
All Implemented Interfaces
com.sun.glass.ui.monocle.NativeScreen
Imports
java.nio.Buffer, .ByteBuffer

Field Summary

Modifier and TypeField and Description
pack-priv final int
pack-priv final int
pack-priv final long
pack-priv final int
pack-priv final int
pack-priv final int
pack-priv final int
pack-priv final float
pack-priv final int

Constructor Summary

AccessConstructor and Description
public
EGLScreen(int idx)

Method Summary

Modifier and TypeMethod and Description
public int
getDepth()

Implements com.sun.glass.ui.monocle.NativeScreen.getDepth.

Returns the bit depth of the screen/

public int
getDPI()

Implements com.sun.glass.ui.monocle.NativeScreen.getDPI.

Returns the number of pixels per inch in the screen.

public int
getHeight()

Implements com.sun.glass.ui.monocle.NativeScreen.getHeight.

Returns the pixel height of the screen.

public int
getNativeFormat()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeFormat.

Returns the native format of the screen, as a constant from the Pixels class.

public long
getNativeHandle()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeHandle.

Returns a native handle for the screen.

public int
getOffsetX()

Overrides default com.sun.glass.ui.monocle.NativeScreen.getOffsetX.

Returns the horizontal start position of this screen relative to the total combined screen size.

public int
getOffsetY()

Overrides default com.sun.glass.ui.monocle.NativeScreen.getOffsetY.

Returns the vertical start position of this screen relative to the total combined screen size.

public float
getScale()

Implements com.sun.glass.ui.monocle.NativeScreen.getScale.

Return the scale factor between the physical pixels and the logical pixels e.g. hdpi = 1.5, xhdpi = 2.0

public ByteBuffer
getScreenCapture()

Implements com.sun.glass.ui.monocle.NativeScreen.getScreenCapture.

Returns a read-only ByteBuffer in the native pixel format containing the screen contents.

public int
getWidth()

Implements com.sun.glass.ui.monocle.NativeScreen.getWidth.

Returns the pixel width of the screen.

private native int
nGetDepth(int idx)

private native int
nGetDpi(int idx)

private native long
nGetHandle(int idx)

private native int
nGetHeight(int idx)

private native int
private native int
nGetOffsetX(int idx)

private native int
nGetOffsetY(int idx)

private native float
nGetScale(int idx)

private native int
nGetWidth(int idx)

public void
shutdown()

Implements com.sun.glass.ui.monocle.NativeScreen.shutdown.

Called during JavaFX shutdown to release the screen.

public void
swapBuffers()

Implements com.sun.glass.ui.monocle.NativeScreen.swapBuffers.

Called on the JavaFX application thread when pixel data for all windows has been uploaded.

public void
uploadPixels(Buffer
Pixel data, in BYTE_BGRA_PRE format. The byte stride of the data is equal to width * 4.
b
,
int
The X offset of the pixel data on the screen
x
,
int
The Y offset of the pixel data on the screen
y
,
int
The pixel width of the data
width
,
int
The pixel height of the data
height
,
float
The alpha level to use to compose the data over existing pixels
alpha
)

Implements com.sun.glass.ui.monocle.NativeScreen.uploadPixels.

Uploads a pixel buffer to the screen.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

depthback to summary
pack-priv final int depth
dpiback to summary
pack-priv final int dpi
handleback to summary
pack-priv final long handle
heightback to summary
pack-priv final int height
nativeFormatback to summary
pack-priv final int nativeFormat
offsetXback to summary
pack-priv final int offsetX
offsetYback to summary
pack-priv final int offsetY
scaleback to summary
pack-priv final float scale
widthback to summary
pack-priv final int width

Constructor Detail

EGLScreenback to summary
public EGLScreen(int idx)

Method Detail

getDepthback to summary
public int getDepth()

Implements com.sun.glass.ui.monocle.NativeScreen.getDepth.

Doc from com.sun.glass.ui.monocle.NativeScreen.getDepth.

Returns the bit depth of the screen/

Annotations
@Override
getDPIback to summary
public int getDPI()

Implements com.sun.glass.ui.monocle.NativeScreen.getDPI.

Doc from com.sun.glass.ui.monocle.NativeScreen.getDPI.

Returns the number of pixels per inch in the screen.

Annotations
@Override
getHeightback to summary
public int getHeight()

Implements com.sun.glass.ui.monocle.NativeScreen.getHeight.

Doc from com.sun.glass.ui.monocle.NativeScreen.getHeight.

Returns the pixel height of the screen.

Annotations
@Override
getNativeFormatback to summary
public int getNativeFormat()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeFormat.

Doc from com.sun.glass.ui.monocle.NativeScreen.getNativeFormat.

Returns the native format of the screen, as a constant from the Pixels class.

Annotations
@Override
getNativeHandleback to summary
public long getNativeHandle()

Implements com.sun.glass.ui.monocle.NativeScreen.getNativeHandle.

Doc from com.sun.glass.ui.monocle.NativeScreen.getNativeHandle.

Returns a native handle for the screen. The handle is platform-specific.

Annotations
@Override
getOffsetXback to summary
public int getOffsetX()

Overrides default com.sun.glass.ui.monocle.NativeScreen.getOffsetX.

Doc from com.sun.glass.ui.monocle.NativeScreen.getOffsetX.

Returns the horizontal start position of this screen relative to the total combined screen size.

Annotations
@Override
getOffsetYback to summary
public int getOffsetY()

Overrides default com.sun.glass.ui.monocle.NativeScreen.getOffsetY.

Doc from com.sun.glass.ui.monocle.NativeScreen.getOffsetY.

Returns the vertical start position of this screen relative to the total combined screen size.

Annotations
@Override
getScaleback to summary
public float getScale()

Implements com.sun.glass.ui.monocle.NativeScreen.getScale.

Doc from com.sun.glass.ui.monocle.NativeScreen.getScale.

Return the scale factor between the physical pixels and the logical pixels e.g. hdpi = 1.5, xhdpi = 2.0

Annotations
@Override
getScreenCaptureback to summary
public ByteBuffer getScreenCapture()

Implements com.sun.glass.ui.monocle.NativeScreen.getScreenCapture.

Doc from com.sun.glass.ui.monocle.NativeScreen.getScreenCapture.

Returns a read-only ByteBuffer in the native pixel format containing the screen contents.

Returns:ByteBuffer

ByteBuffer a read-only ByteBuffer containing the screen contents

Annotations
@Override
getWidthback to summary
public int getWidth()

Implements com.sun.glass.ui.monocle.NativeScreen.getWidth.

Doc from com.sun.glass.ui.monocle.NativeScreen.getWidth.

Returns the pixel width of the screen.

Annotations
@Override
nGetDepthback to summary
private native int nGetDepth(int idx)
nGetDpiback to summary
private native int nGetDpi(int idx)
nGetHandleback to summary
private native long nGetHandle(int idx)
nGetHeightback to summary
private native int nGetHeight(int idx)
nGetNativeFormatback to summary
private native int nGetNativeFormat(int idx)
nGetOffsetXback to summary
private native int nGetOffsetX(int idx)
nGetOffsetYback to summary
private native int nGetOffsetY(int idx)
nGetScaleback to summary
private native float nGetScale(int idx)
nGetWidthback to summary
private native int nGetWidth(int idx)
shutdownback to summary
public void shutdown()

Implements com.sun.glass.ui.monocle.NativeScreen.shutdown.

Doc from com.sun.glass.ui.monocle.NativeScreen.shutdown.

Called during JavaFX shutdown to release the screen. Called only once.

Annotations
@Override
swapBuffersback to summary
public void swapBuffers()

Implements com.sun.glass.ui.monocle.NativeScreen.swapBuffers.

Doc from com.sun.glass.ui.monocle.NativeScreen.swapBuffers.

Called on the JavaFX application thread when pixel data for all windows has been uploaded.

Annotations
@Override
uploadPixelsback to summary
public void uploadPixels(Buffer b, int x, int y, int width, int height, float alpha)

Implements com.sun.glass.ui.monocle.NativeScreen.uploadPixels.

Doc from com.sun.glass.ui.monocle.NativeScreen.uploadPixels.

Uploads a pixel buffer to the screen. Called on the JavaFX application thread.

Parameters
b:Buffer

Pixel data, in BYTE_BGRA_PRE format. The byte stride of the data is equal to width * 4.

x:int

The X offset of the pixel data on the screen

y:int

The Y offset of the pixel data on the screen

width:int

The pixel width of the data

height:int

The pixel height of the data

alpha:float

The alpha level to use to compose the data over existing pixels

Annotations
@Override