From 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 9 Nov 2011 00:31:34 +0100 Subject: NativeWindow: Add accessor interfaces NativeSurfaceHolder and NativeWindowHolder - NativeSurfaceHolder interface allows access to it's implementation's NativeSurface reference. - NativeWindowHolder interface allows access to it's implementation's NativeWindow reference. Implement or extend interface w/ these accessors whereever it seems fit: - NEWT Window - GLDrawable These accessors allow lower layers to retrieve the NativeSurface/Window instance w/o knowledge of the 'upper' frameworks, ie. NativeWindow/JOGL or JOGL/NEWT. Commited in followups (due to mixed semantical changes in those files): - JAWTWindow - NewtCanvasAWT - Some NEWT impl. --- src/jogl/classes/javax/media/opengl/GLDrawable.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/javax') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawable.java b/src/jogl/classes/javax/media/opengl/GLDrawable.java index f4cd77059..e2048b288 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawable.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawable.java @@ -42,6 +42,7 @@ package javax.media.opengl; import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.NativeSurface; +import javax.media.nativewindow.NativeSurfaceHolder; /** An abstraction for an OpenGL rendering target. A GLDrawable's @@ -50,7 +51,7 @@ import javax.media.nativewindow.NativeSurface; create an OpenGL context, but all implementations of {@link GLAutoDrawable} do so upon creation. */ -public interface GLDrawable { +public interface GLDrawable extends NativeSurfaceHolder { /** * Creates a new context for drawing to this drawable that will * optionally share display lists and other server-side OpenGL @@ -158,8 +159,6 @@ public interface GLDrawable { */ public GLProfile getGLProfile(); - public NativeSurface getNativeSurface(); - /** * This is the GL/Windowing drawable handle.
* It is usually the {@link javax.media.nativewindow.NativeSurface#getSurfaceHandle()}, -- cgit v1.2.3