Top Fields Constructors Methods
jogamp.newt.driver.windows

public Class ScreenDriver

extends ScreenImpl
Class Inheritance
Imports
com.jogamp.nativewindow.DefaultGraphicsScreen, com.jogamp.nativewindow.util.Rectangle, jogamp.newt.MonitorModeProps, .ScreenImpl, com.jogamp.common.util.ArrayHashSet, com.jogamp.newt.MonitorDevice, .MonitorMode, .Screen

Field Summary

Inherited from jogamp.newt.ScreenImpl:
aScreenDEBUG_TEST_SCREENMODE_DISABLEDdefault_sm_bppdefault_sm_heightmmdefault_sm_ratedefault_sm_rotationdefault_sm_widthmmdisplayfqnamehashCoderefCountscreen_idxusrSizeusrSizeQueriedvirtViewportPUvirtViewportWU

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
calcVirtualScreenOriginAndSize(final Rectangle
storage for result in pixel units
viewport
,
final Rectangle
storage for result in window units
viewportInWindowUnits
)

Overrides jogamp.newt.ScreenImpl.calcVirtualScreenOriginAndSize.

Calculates the virtual rotated viewport in pixel- and window units.
protected void
protected void
collectNativeMonitorModesAndDevicesImpl(final MonitorModeProps.Cache
memory pool caching the result
cache
)

Implements abstract jogamp.newt.ScreenImpl.collectNativeMonitorModesAndDevicesImpl.

To be implemented by the native specification.
protected void
private static native void
private static final int
getAdapterIndex(final int monitorId)

private final String
getAdapterName(final int adapter_idx)

private native String
getAdapterName0(int adapter_idx)

private native int[]
getMonitorDevice0(int adapter_idx, int monitor_idx, int monitorId)

private static final int
getMonitorId(final int adapterIdx, final int monitorIdx)

private static final int
getMonitorIndex(final int monitorId)

private native int[]
getMonitorMode0(String adapterName, int mode_idx)

private final MonitorMode
getMonitorModeImpl(final MonitorModeProps.Cache cache, final String adapterName, final int mode_idx)

private final String
getMonitorName(final String adapterName, final int monitor_idx, final boolean onlyActive)

private native String
getMonitorName0(String adapterName, int monitor_idx, boolean onlyActive)

private native int
private native int
private native int
private native int
protected MonitorMode
queryCurrentMonitorModeImpl(final MonitorDevice monitor)

Implements abstract jogamp.newt.ScreenImpl.queryCurrentMonitorModeImpl.

To be implemented by the native specification.
protected boolean
setCurrentMonitorModeImpl(final MonitorDevice monitor, final MonitorMode mode)

Implements abstract jogamp.newt.ScreenImpl.setCurrentMonitorModeImpl.

To be implemented by the native specification.
private native boolean
setMonitorMode0(int adapter_idx, int x, int y, int width, int height, int bits, int freq, int flags, int rot)

protected boolean
updateNativeMonitorDeviceViewportImpl(final MonitorDevice monitor, final float[] pixelScale, final Rectangle viewportPU, final Rectangle viewportWU)

Overrides jogamp.newt.ScreenImpl.updateNativeMonitorDeviceViewportImpl.

protected int
validateScreenIndex(final int idx)

Implements abstract jogamp.newt.ScreenImpl.validateScreenIndex.

Returns the validated screen index, which is either the passed idx value or 0.
Inherited from jogamp.newt.ScreenImpl:
addMonitorModeListeneraddReferencecreatecreateNativedestroyequalsgetDisplaygetFQNamegetGraphicsScreengetHeightgetIndexgetMonitorDevicesgetMonitorModesgetPrimaryMonitorgetReferenceCountgetViewportgetViewportInWindowUnitsgetWidthgetXgetYhashCodeinstantiationFinishedisNativeValidmonitorModeChangedmonitorModeChangeNotifyqueryCurrentMonitorModeInternremoveMonitorModeListenerremoveReferencetoStringupdateVirtualScreenOriginAndSize

Constructor Detail

ScreenDriverback to summary
public ScreenDriver()

Method Detail

calcVirtualScreenOriginAndSizeback to summary
protected void calcVirtualScreenOriginAndSize(final Rectangle viewport, final Rectangle viewportInWindowUnits)

Overrides jogamp.newt.ScreenImpl.calcVirtualScreenOriginAndSize.

Doc from jogamp.newt.ScreenImpl.calcVirtualScreenOriginAndSize.

Calculates the virtual rotated viewport in pixel- and window units.

This method is called after the MonitorMode has been set or changed, hence you may utilize it.

Default implementation uses the union of all monitor's viewport, calculated via unionOfMonitorViewportSize(), however driver impl. may chose a different methodology.

Parameters
viewport:Rectangle

storage for result in pixel units

viewportInWindowUnits:Rectangle

storage for result in window units

Annotations
@Override
closeNativeImplback to summary
protected void closeNativeImpl()

Implements abstract jogamp.newt.ScreenImpl.closeNativeImpl.

Annotations
@Override
collectNativeMonitorModesAndDevicesImplback to summary
protected void collectNativeMonitorModesAndDevicesImpl(final MonitorModeProps.Cache cache)

Implements abstract jogamp.newt.ScreenImpl.collectNativeMonitorModesAndDevicesImpl.

Doc from jogamp.newt.ScreenImpl.collectNativeMonitorModesAndDevicesImpl.

To be implemented by the native specification.
Is called within a thread safe environment.
Is called only to collect the MonitorModes and MonitorDevices, usually at startup setting up modes.

WARNING: must be synchronized with

, i.e.
Parameters
cache:MonitorModeProps.Cache

memory pool caching the result

Annotations
@Override
createNativeImplback to summary
protected void createNativeImpl()

Implements abstract jogamp.newt.ScreenImpl.createNativeImpl.

Annotations
@Override
dumpMonitorInfo0back to summary
private static native void dumpMonitorInfo0()
getAdapterIndexback to summary
private static final int getAdapterIndex(final int monitorId)
getAdapterNameback to summary
private final String getAdapterName(final int adapter_idx)
getAdapterName0back to summary
private native String getAdapterName0(int adapter_idx)
getMonitorDevice0back to summary
private native int[] getMonitorDevice0(int adapter_idx, int monitor_idx, int monitorId)
getMonitorIdback to summary
private static final int getMonitorId(final int adapterIdx, final int monitorIdx)
getMonitorIndexback to summary
private static final int getMonitorIndex(final int monitorId)
getMonitorMode0back to summary
private native int[] getMonitorMode0(String adapterName, int mode_idx)
getMonitorModeImplback to summary
private final MonitorMode getMonitorModeImpl(final MonitorModeProps.Cache cache, final String adapterName, final int mode_idx)
getMonitorNameback to summary
private final String getMonitorName(final String adapterName, final int monitor_idx, final boolean onlyActive)
getMonitorName0back to summary
private native String getMonitorName0(String adapterName, int monitor_idx, boolean onlyActive)
getVirtualHeightImpl0back to summary
private native int getVirtualHeightImpl0()
getVirtualOriginX0back to summary
private native int getVirtualOriginX0()
getVirtualOriginY0back to summary
private native int getVirtualOriginY0()
getVirtualWidthImpl0back to summary
private native int getVirtualWidthImpl0()
queryCurrentMonitorModeImplback to summary
protected MonitorMode queryCurrentMonitorModeImpl(final MonitorDevice monitor)

Implements abstract jogamp.newt.ScreenImpl.queryCurrentMonitorModeImpl.

Doc from jogamp.newt.ScreenImpl.queryCurrentMonitorModeImpl.

To be implemented by the native specification.
Is called within a thread safe environment.

Implementation shall not unify the result w/ monitor's supported modes or a locally saved MonitorModeProps.Cache, since caller will perform such tasks.

Annotations
@Override
setCurrentMonitorModeImplback to summary
protected boolean setCurrentMonitorModeImpl(final MonitorDevice monitor, final MonitorMode mode)

Implements abstract jogamp.newt.ScreenImpl.setCurrentMonitorModeImpl.

Doc from jogamp.newt.ScreenImpl.setCurrentMonitorModeImpl.

To be implemented by the native specification.
Is called within a thread safe environment.

Annotations
@Override
setMonitorMode0back to summary
private native boolean setMonitorMode0(int adapter_idx, int x, int y, int width, int height, int bits, int freq, int flags, int rot)
updateNativeMonitorDeviceViewportImplback to summary
protected boolean updateNativeMonitorDeviceViewportImpl(final MonitorDevice monitor, final float[] pixelScale, final Rectangle viewportPU, final Rectangle viewportWU)

Overrides jogamp.newt.ScreenImpl.updateNativeMonitorDeviceViewportImpl.

Annotations
@Override
validateScreenIndexback to summary
protected int validateScreenIndex(final int idx)

Implements abstract jogamp.newt.ScreenImpl.validateScreenIndex.

Doc from jogamp.newt.ScreenImpl.validateScreenIndex.

Returns the validated screen index, which is either the passed idx value or 0.

On big-desktops this shall return always 0.

Annotations
@Override