From 018c7e8660dc0af68bd129be9af5094d04d0b431 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 6 Oct 2010 16:04:06 +0200 Subject: NativeWindow/NativeSurface Refactoring ; Added mouseClick NEWT/AWT unit test NativeWindow/NativeSurface Refactoring - Using NativeSurface interface - NativeWindow extends NativeSurface, adds getLocationOnScreen(Point) - NativeWindow add: getParent() - NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must. - NullWindow -> ProxySurface impl NativeSurface - JOGL: Uses NativeSurface only. - GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface() Added mouseClick NEWT/AWT unit test JOGL: - GLAnimatorControl add: resetCounter() - NEWT: - GLWindow counters: return GLWindow counters always - WindowImpl - requestFocus() wait until done - reparent: readded requestFocusImpl(true), native impl skips java focusAction if reparented - X11Window: Add XRaiseWindow() in requestFocus() --- src/jogl/classes/javax/media/opengl/awt/GLCanvas.java | 4 ++-- src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/awt') diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index 4e63a8048..60ed731f1 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -567,8 +567,8 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable { return (GLCapabilities)awtConfig.getRequestedCapabilities(); } - public NativeWindow getNativeWindow() { - return drawable.getNativeWindow(); + public NativeSurface getNativeSurface() { + return drawable.getNativeSurface(); } public long getHandle() { diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java index 72b782f9a..e4a295ba3 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java @@ -488,7 +488,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { return glProfile; } - public NativeWindow getNativeWindow() { + public NativeSurface getNativeSurface() { throw new GLException("FIXME"); } @@ -1541,7 +1541,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable { } } if (joglContext == null) { - AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); + AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); if (factory.canCreateExternalGLDrawable(device)) { joglDrawable = factory.createExternalGLDrawable(); // FIXME: Need to share with j2d context, due to FBO resource .. -- cgit v1.2.3