aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-06-26 04:54:44 +0000
committerKenneth Russel <[email protected]>2008-06-26 04:54:44 +0000
commitf287efc004e6932cbb2efdf777798a381994ca48 (patch)
treece9a159f1e05cd234dddd64dffbb22ccb5e7163e /src/classes/javax/media
parent2a07b5aad1d5dcf9c699e74c7e94d98f827fd4f9 (diff)
Added getSurfaceHandle() to NativeWindow abstraction in support of
Windows platform where there is a distinction between the window handle (HWND) and window surface (HDC). WGL implementation now refers to window surface instead of window handle. JAWT implementation returns same value for both window handle and window surface. Newt creates window surface on demand; unneeded for EGL binding. RedSquare demo now runs on Windows with Newt + GL2. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1695 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media')
-rw-r--r--src/classes/javax/media/opengl/NativeWindow.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/classes/javax/media/opengl/NativeWindow.java b/src/classes/javax/media/opengl/NativeWindow.java
index 688c4c374..b938c4cec 100644
--- a/src/classes/javax/media/opengl/NativeWindow.java
+++ b/src/classes/javax/media/opengl/NativeWindow.java
@@ -67,7 +67,24 @@ public interface NativeWindow {
*/
public long getDisplayHandle();
public long getScreenHandle();
- public long getWindowHandle();
+
+ /**
+ * Returns the window handle for this NativeWindow. On X11 this
+ * returns a Window. On Windows platforms this returns an HWND. This
+ * might not be supported by all NativeWindow implementations, in
+ * particular those designed to work only with window surfaces.
+ */
+ public long getWindowHandle() throws NativeWindowException;
+
+ /**
+ * Returns the handle to the surface for this NativeWindow. This
+ * method is in support of platforms on which there is a distinction
+ * between the window handle and window surface, in particular the
+ * Microsoft Windows platform, on which this method returns an HDC.
+ * This might not be supported on all NativeWindow implementations,
+ * in particular those designed to work only with window handles.
+ */
+ public long getSurfaceHandle() throws NativeWindowException;
/**
* Lifetime: after 1st lock, until invalidation