public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneable
DEBUG, DEFAULT_CONNECTION, DEFAULT_UNIT, EXTERNAL_CONNECTION
Constructor and Description |
---|
X11GraphicsDevice(long display,
int unitID,
boolean owner)
Constructs a new X11GraphicsDevice corresponding to the given native display handle and default
ToolkitLock via NativeWindowFactory.getDefaultToolkitLock(String, long) . |
X11GraphicsDevice(long display,
int unitID,
ToolkitLock locker,
boolean owner) |
X11GraphicsDevice(String connection,
int unitID)
Constructs a new X11GraphicsDevice corresponding to the given connection and default
ToolkitLock via NativeWindowFactory.getDefaultToolkitLock(String) .Note that this is not an open connection, ie no native display handle exist. |
X11GraphicsDevice(String displayConnection,
int unitID,
ToolkitLock locker)
Constructs a new X11GraphicsDevice corresponding to the given display connection.
|
Modifier and Type | Method and Description |
---|---|
void |
clearHandleOwner() |
Object |
clone() |
boolean |
close()
Optionally closing the device if handle is not
null . |
int |
getDefaultScreen()
Returns the default screen number as referenced by the display connection, i.e.
|
int |
getDefaultVisualID() |
boolean |
isHandleOwner() |
boolean |
isXineramaEnabled() |
boolean |
open()
Optionally [re]opening the device if handle is
null . |
getConnection, getHandle, getToolkitLock, getType, getUniqueID, getUnitID, lock, swapDeviceHandleAndOwnership, toString, unlock, validateLocked
public X11GraphicsDevice(String connection, int unitID)
ToolkitLock
via NativeWindowFactory.getDefaultToolkitLock(String)
.public X11GraphicsDevice(long display, int unitID, boolean owner)
ToolkitLock
via NativeWindowFactory.getDefaultToolkitLock(String, long)
.public X11GraphicsDevice(long display, int unitID, ToolkitLock locker, boolean owner)
display
- the Display connectionlocker
- custom ToolkitLock
, eg to force null locking w/ private connectionDefaultGraphicsDevice.DefaultGraphicsDevice(String, String, int, long, ToolkitLock)
public X11GraphicsDevice(String displayConnection, int unitID, ToolkitLock locker)
The constructor opens the native connection and takes ownership.
displayConnection
- the semantic display connection namelocker
- custom ToolkitLock
, eg to force null locking w/ private connectionDefaultGraphicsDevice.DefaultGraphicsDevice(String, String, int, long, ToolkitLock)
public int getDefaultScreen()
Implementation uses the XLib macro DefaultScreen(display)
.
public int getDefaultVisualID()
public final boolean isXineramaEnabled()
public Object clone()
clone
in interface AbstractGraphicsDevice
clone
in class DefaultGraphicsDevice
public boolean open()
AbstractGraphicsDevice
null
.
The default implementation is a NOP
.
Example implementations like X11GraphicsDevice
or EGLGraphicsDevice
issue the native open operation in case handle is null
.
open
in interface AbstractGraphicsDevice
open
in class DefaultGraphicsDevice
null
and opening was successful, otherwise false.public boolean close()
AbstractGraphicsDevice
null
.
The default implementation dispose
it's ToolkitLock
and sets the handle to null
.
Example implementations like X11GraphicsDevice
or EGLGraphicsDevice
issue the native close operation or skip it depending on the handles's ownership
.
close
in interface AbstractGraphicsDevice
close
in class DefaultGraphicsDevice
null
and closing was successful, otherwise false.public boolean isHandleOwner()
isHandleOwner
in interface AbstractGraphicsDevice
isHandleOwner
in class DefaultGraphicsDevice
true
if instance owns the handle to issue AbstractGraphicsDevice.close()
, otherwise false
.public void clearHandleOwner()
clearHandleOwner
in interface AbstractGraphicsDevice
clearHandleOwner
in class DefaultGraphicsDevice
Copyright 2010 JogAmp Community.