diff options
author | Sven Gothel <[email protected]> | 2010-11-14 08:52:10 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-14 08:52:10 +0100 |
commit | 9cf55aa8dbf486c489d4fa7d1d0ef01e9a101388 (patch) | |
tree | 05593f6222d750b96374108b76b1656e0c1e995e /src/nativewindow/classes/javax/media | |
parent | f2de12dd8d20ba7a08d9c97f5ac9f51c94b693cc (diff) |
NativeWindow: Add constructor to AbstractGraphicsDevice derivations,
allowing to spec the connection without an actual native peer.
Diffstat (limited to 'src/nativewindow/classes/javax/media')
4 files changed, 44 insertions, 2 deletions
diff --git a/src/nativewindow/classes/javax/media/nativewindow/egl/EGLGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/egl/EGLGraphicsDevice.java index 609003290..2fca915a0 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/egl/EGLGraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/egl/EGLGraphicsDevice.java @@ -38,6 +38,17 @@ import javax.media.nativewindow.*; */ public class EGLGraphicsDevice extends DefaultGraphicsDevice implements Cloneable { + /** + * Note that this is not an open connection, ie no native display handle exist. + * This constructor exist to setup a default device connection.<br> + * FIXME:<br> + * find out the EGL semantics of a device connection {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection()} + * to actually use multiple devices. + */ + public EGLGraphicsDevice(String connection) { + super(NativeWindowFactory.TYPE_EGL, connection); + } + /** Constructs a new EGLGraphicsDevice corresponding to the given EGL display handle. */ public EGLGraphicsDevice(long eglDisplay) { super(NativeWindowFactory.TYPE_EGL, AbstractGraphicsDevice.DEFAULT_CONNECTION, eglDisplay); diff --git a/src/nativewindow/classes/javax/media/nativewindow/macosx/MacOSXGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/macosx/MacOSXGraphicsDevice.java index 82b87eb29..b7dbf0d6a 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/macosx/MacOSXGraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/macosx/MacOSXGraphicsDevice.java @@ -38,6 +38,17 @@ import javax.media.nativewindow.*; */ public class MacOSXGraphicsDevice extends DefaultGraphicsDevice implements Cloneable { + /** + * Note that this is not an open connection, ie no native display handle exist. + * This constructor exist to setup a default device connection.<br> + * FIXME:<br> + * find out the EGL semantics of a device connection {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection()} + * to actually use multiple devices. + */ + public MacOSXGraphicsDevice(String connection) { + super(NativeWindowFactory.TYPE_MACOSX, connection); + } + /** Constructs a new MacOSXGraphicsDevice */ public MacOSXGraphicsDevice() { super(NativeWindowFactory.TYPE_MACOSX, AbstractGraphicsDevice.DEFAULT_CONNECTION); diff --git a/src/nativewindow/classes/javax/media/nativewindow/windows/WindowsGraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/windows/WindowsGraphicsDevice.java index 666fc6196..fe11ba937 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/windows/WindowsGraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/windows/WindowsGraphicsDevice.java @@ -34,10 +34,21 @@ package javax.media.nativewindow.windows; import javax.media.nativewindow.*; -/** Encapsulates a graphics device on Windows platforms. +/** + * Encapsulates a graphics device on Windows platforms.<br> */ - public class WindowsGraphicsDevice extends DefaultGraphicsDevice implements Cloneable { + /** + * Note that this is not an open connection, ie no native display handle exist. + * This constructor exist to setup a default device connection.<br> + * FIXME:<br> + * find out the Windows semantics of a device connection {@link javax.media.nativewindow.AbstractGraphicsDevice#getConnection()} + * to actually use multiple devices. + */ + public WindowsGraphicsDevice(String connection) { + super(NativeWindowFactory.TYPE_WINDOWS, connection); + } + /** Constructs a new WindowsGraphicsDevice */ public WindowsGraphicsDevice() { super(NativeWindowFactory.TYPE_WINDOWS, AbstractGraphicsDevice.DEFAULT_CONNECTION); diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java index a8e11efba..dfbe8c6dd 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java @@ -41,6 +41,15 @@ import javax.media.nativewindow.*; public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneable { boolean closeDisplay = false; + /** Constructs a new X11GraphicsDevice corresponding to the given connection and default + * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#createDefaultToolkitLock(java.lang.String, long)}.<br> + * Note that this is not an open connection, ie no native display handle exist. + * This constructor exist to setup a default device connection. + */ + public X11GraphicsDevice(String connection) { + super(NativeWindowFactory.TYPE_X11, connection); + } + /** Constructs a new X11GraphicsDevice corresponding to the given native display handle and default * {@link javax.media.nativewindow.ToolkitLock} via {@link NativeWindowFactory#createDefaultToolkitLock(java.lang.String, long)}. */ |