aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-11-17 11:56:48 +0100
committerSven Gothel <[email protected]>2010-11-17 11:56:48 +0100
commit4447e29dfb304a6547295a363cf9de3572c768ea (patch)
tree8584c6fcd5efcc63347025ef8d6c4d637774f46c /src/newt/classes/com
parent911a42f8025e36be459769e09f8b37d934f2badc (diff)
parente491306690f5c1e281bb4f673481dc890fef5217 (diff)
Merge branch 'pulled'
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/Window.java15
-rw-r--r--src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java3
-rw-r--r--src/newt/classes/com/jogamp/newt/impl/WindowImpl.java7
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java4
4 files changed, 19 insertions, 10 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index 28395b357..13cc0e098 100644
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -33,7 +33,7 @@ import com.jogamp.newt.event.KeyListener;
import com.jogamp.newt.event.MouseListener;
import com.jogamp.newt.event.ScreenModeListener;
import com.jogamp.newt.impl.Debug;
-import javax.media.nativewindow.Capabilities;
+import javax.media.nativewindow.CapabilitiesImmutable;
import javax.media.nativewindow.NativeWindow;
import javax.media.nativewindow.SurfaceUpdatedListener;
import javax.media.nativewindow.util.Insets;
@@ -79,11 +79,18 @@ public interface Window extends NativeWindow, ScreenModeListener {
Screen getScreen();
/**
- * @return The requested capabilities
+ * Gets an immutable set of requested capabilities.
+ *
+ * @return the requested capabilities
*/
- Capabilities getRequestedCapabilities();
+ CapabilitiesImmutable getRequestedCapabilities();
- Capabilities getChosenCapabilities();
+ /**
+ * Gets an immutable set of chosen capabilities.
+ *
+ * @return the chosen capabilities
+ */
+ CapabilitiesImmutable getChosenCapabilities();
/**
* Destroy the Window and it's children, incl. native destruction.<br>
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
index a0ab5f9f6..29e8c91b4 100644
--- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
+++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java
@@ -168,7 +168,8 @@ public class NewtCanvasAWT extends java.awt.Canvas {
newtChild.setFocusAction(null); // no AWT focus traversal ..
if(add) {
- nativeWindow = NewtFactoryAWT.getNativeWindow(this, newtChild.getRequestedCapabilities());
+ nativeWindow = NewtFactoryAWT.getNativeWindow(this,
+ newtChild.getRequestedCapabilities().cloneCapabilites());
if(null!=nativeWindow) {
if(DEBUG) {
System.err.println("NewtCanvasAWT.reparentWindow: "+newtChild);
diff --git a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
index 9f744be82..572ed5bb7 100644
--- a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
+++ b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
@@ -57,6 +57,7 @@ import java.lang.reflect.Method;
import javax.media.nativewindow.AbstractGraphicsConfiguration;
import javax.media.nativewindow.AbstractGraphicsDevice;
import javax.media.nativewindow.Capabilities;
+import javax.media.nativewindow.CapabilitiesImmutable;
import javax.media.nativewindow.NativeSurface;
import javax.media.nativewindow.NativeWindow;
import javax.media.nativewindow.NativeWindowException;
@@ -1145,12 +1146,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer, ScreenMod
return reparentActionStrategy;
}
- public final Capabilities getChosenCapabilities() {
+ public final CapabilitiesImmutable getChosenCapabilities() {
return config.getNativeGraphicsConfiguration().getChosenCapabilities();
}
- public final Capabilities getRequestedCapabilities() {
- return (Capabilities)caps.clone();
+ public final CapabilitiesImmutable getRequestedCapabilities() {
+ return caps;
}
public String getTitle() {
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index 53b704d1c..967836cf6 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -141,7 +141,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
// Window Access
//
- public final Capabilities getChosenCapabilities() {
+ public final CapabilitiesImmutable getChosenCapabilities() {
if (drawable == null) {
return window.getChosenCapabilities();
}
@@ -149,7 +149,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
return drawable.getChosenGLCapabilities();
}
- public final Capabilities getRequestedCapabilities() {
+ public final CapabilitiesImmutable getRequestedCapabilities() {
return window.getRequestedCapabilities();
}