aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media/opengl
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-12-23 05:32:57 +0000
committerKenneth Russel <[email protected]>2008-12-23 05:32:57 +0000
commit00b865b520d91cee6eda142cfcdf1fad4ab5a8c5 (patch)
treec94a5232634726d1a4acdf206c381b12a4ec1299 /src/classes/javax/media/opengl
parent040200121e35aced836985c085699ef6c9df0719 (diff)
Removed notion of wrapped windows from the NativeWindow interface,
leaving such handling up to toolkits such as Newt. Updated NativeWindow documentation. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1827 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media/opengl')
-rw-r--r--src/classes/javax/media/opengl/GLDrawable.java3
-rw-r--r--src/classes/javax/media/opengl/NativeWindow.java45
2 files changed, 14 insertions, 34 deletions
diff --git a/src/classes/javax/media/opengl/GLDrawable.java b/src/classes/javax/media/opengl/GLDrawable.java
index 844e025a0..219af33c4 100644
--- a/src/classes/javax/media/opengl/GLDrawable.java
+++ b/src/classes/javax/media/opengl/GLDrawable.java
@@ -82,7 +82,6 @@ public interface GLDrawable {
public GLContext createContext(GLContext shareWith);
/**
-
* Indicates to on-screen GLDrawable implementations whether the
* underlying window has been created and can be drawn into. This
* method must be called from GLDrawables obtained from the
@@ -99,7 +98,7 @@ public interface GLDrawable {
* by the implementation. It is not necessary to call
* <code>setRealized</code> on a GLCanvas, a GLJPanel, or a
* GLPbuffer, as these perform the appropriate calls on their
- * underlying GLDrawables internally..
+ * underlying GLDrawables internally.
*/
public void setRealized(boolean realized);
diff --git a/src/classes/javax/media/opengl/NativeWindow.java b/src/classes/javax/media/opengl/NativeWindow.java
index a2a892d52..f7e09520e 100644
--- a/src/classes/javax/media/opengl/NativeWindow.java
+++ b/src/classes/javax/media/opengl/NativeWindow.java
@@ -39,25 +39,20 @@
package javax.media.opengl;
-/** Interface for a native window object.
- This can be a representation of a fully functional
- native window, i.e. a terminal object, where
- {@link NativeWindow#isTerminalObject()} returns true.
- Otherwise it is a a proxy for a wrapped
- Java-level window toolkit window object (e.g. java.awt.Component),
- which can be retrieved with
- {@link NativeWindow#getWrappedWindow()}.
-
- In case the NativeWindow is a terminal object,
- where the NativeWindow implementation took care of exposing
- all necessary native windowing information,
- the utilizing toolkit (e.g. JOGL) will use a generic implementation
- and use the native information directly.
+/** Provides the mechanism by which the Java / OpenGL binding
+ interacts with windows. A window toolkit such as the AWT may
+ either implement this interface directly with one of its
+ components, or provide and register an implementation of {@link
+ NativeWindowFactory NativeWindowFactory} which can create
+ NativeWindow objects for its components. <P>
- In case the NativeWindow is a proxy object,
- where no native windowing information is available yet,
- the utilizing toolkit (e.g. JOGL) is expected to have a specific implementation
- path to handle the wrapped Java-level window toolkit window object. */
+ A NativeWindow created for a particular on-screen component is
+ expected to have the same lifetime as that component. As long as
+ the component is alive, the NativeWindow must be able to control
+ it, and any time it is visible and locked, provide information
+ such as the window handle to the Java / OpenGL binding so that
+ GLDrawables and GLContexts may be created for the window.
+*/
public interface NativeWindow {
public static final int LOCK_NOT_SUPPORTED = 0;
@@ -117,20 +112,6 @@ public interface NativeWindow {
public long getVisualID();
public int getScreenIndex();
- /**
- * If this NativeWindow actually wraps a window from a Java-level
- * window toolkit, return the underlying window object.
- */
- public Object getWrappedWindow();
-
- /**
- * @return True, if this NativeWindow is a terminal object,
- * i.e. all native windowing information is available.
- * False otherwise, ie. it holds a wrapped window object,
- * from which native handles must be derived by the utilizing tookit.
- */
- public boolean isTerminalObject();
-
/** Returns the current width of this window. */
public int getWidth();