aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-19 19:19:49 +0100
committerSven Gothel <[email protected]>2011-11-19 19:19:49 +0100
commit76562bc5073909410ccf8a72a01d6998356a9d70 (patch)
tree61d7196b90b651b005ad7d74a167eec08a54e89a /src/newt/classes/com
parent94498289e57deb18d51f267c6c029d6d4f847dfe (diff)
NEWT Window: Promote/Expose 'Window getDelegatedWindow()' for accessing the delegate (ie GLWindow)
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/Window.java5
-rw-r--r--src/newt/classes/com/jogamp/newt/event/NEWTEvent.java1
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java8
3 files changed, 10 insertions, 4 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java
index b0df7a28a..32024a49a 100644
--- a/src/newt/classes/com/jogamp/newt/Window.java
+++ b/src/newt/classes/com/jogamp/newt/Window.java
@@ -134,6 +134,11 @@ public interface Window extends NativeWindow, WindowClosingProtocol {
boolean isVisible();
+ /**
+ * If the implementation uses delegation, return the delegated {@link Window} instance,
+ * otherwise return <code>this</code> instance. */
+ Window getDelegatedWindow();
+
//
// Child Window Management
//
diff --git a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
index 50aed2c8e..3f3817b91 100644
--- a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
+++ b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java
@@ -46,6 +46,7 @@ package com.jogamp.newt.event;
* <li> KeyEvent <code>300..30x</code></li>
* </ul><br>
*/
+@SuppressWarnings("serial")
public class NEWTEvent extends java.util.EventObject {
private final boolean isSystemEvent;
private final int eventType;
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index fd216bfda..166718423 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -55,8 +55,8 @@ import com.jogamp.opengl.JoglVersion;
import com.jogamp.opengl.util.Animator;
/**
- * An implementation of {@link javax.media.opengl.GLAutoDrawable} interface,
- * using an aggregation of a {@link com.jogamp.newt.Window} implementation.
+ * An implementation of {@link GLAutoDrawable} and {@link Window} interface,
+ * using a delegated {@link Window} instance, which may be an aggregation (lifecycle: created and destroyed).
* <P>
* This implementation does not make the OpenGL context current<br>
* before calling the various input EventListener callbacks, ie {@link com.jogamp.newt.event.MouseListener} etc.<br>
@@ -196,8 +196,8 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
return window.getRequestedCapabilities();
}
- public final Window getWindow() {
- return window;
+ public final Window getDelegatedWindow() {
+ return window.getDelegatedWindow();
}
public final NativeWindow getParent() {