Top Fields Constructors Methods
jogamp.newt.driver.x11

public Class ScreenDriver

extends ScreenImpl
Class Inheritance
Imports
java.util.ArrayList, .List, com.jogamp.nativewindow.AbstractGraphicsDevice, com.jogamp.nativewindow.util.Rectangle, .RectangleImmutable, jogamp.nativewindow.x11.X11Util, jogamp.newt.Debug, .DisplayImpl, .MonitorModeProps, .DisplayImpl.DisplayRunnable, .ScreenImpl, com.jogamp.common.util.ArrayHashSet, .PropertyAccess, .VersionNumber, com.jogamp.nativewindow.x11.X11GraphicsDevice, .X11GraphicsScreen, com.jogamp.newt.MonitorDevice, .MonitorMode

Field Summary

Modifier and TypeField and Description
protected static final boolean
private RandR
private VersionNumber
private final DisplayImpl.DisplayRunnable<Boolean>
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 final 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 int
getHeight0(long display, int scrn_idx)

private static native int[]
getRandRVersion0(long display)

private static native long
GetScreen0(long dpy, int scrn_idx)

private static native int
getWidth0(long display, int scrn_idx)

pack-priv static void
initSingleton()

Hides jogamp.newt.ScreenImpl.initSingleton.

Ensure static init has been run.
protected MonitorMode
queryCurrentMonitorModeImpl(final MonitorDevice monitor)

Implements abstract jogamp.newt.ScreenImpl.queryCurrentMonitorModeImpl.

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

Implements abstract jogamp.newt.ScreenImpl.setCurrentMonitorModeImpl.

To be implemented by the native specification.
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

Field Detail

DEBUG_TEST_RANDR13_DISABLEDback to summary
protected static final boolean DEBUG_TEST_RANDR13_DISABLED
rAndRback to summary
private RandR rAndR
randrVersionback to summary
private VersionNumber randrVersion
xineramaEnabledQueryWithTempback to summary
private final DisplayImpl.DisplayRunnable<Boolean> xineramaEnabledQueryWithTemp

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 final 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
getHeight0back to summary
private static native int getHeight0(long display, int scrn_idx)
getRandRVersion0back to summary
private static native int[] getRandRVersion0(long display)
GetScreen0back to summary
private static native long GetScreen0(long dpy, int scrn_idx)
getWidth0back to summary
private static native int getWidth0(long display, int scrn_idx)
initSingletonback to summary
pack-priv static void initSingleton()

Hides jogamp.newt.ScreenImpl.initSingleton.

Ensure static init has been run.

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
runWithLockedDisplayDeviceback to summary
private final <T> T runWithLockedDisplayDevice(final DisplayImpl.DisplayRunnable<T> action)
runWithTempDisplayHandleback to summary
private final <T> T runWithTempDisplayHandle(final DisplayImpl.DisplayRunnable<T> action)
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
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