aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-03-13 11:55:23 +0000
committerSven Gothel <[email protected]>2009-03-13 11:55:23 +0000
commita74f1100b11eb3a6944a73eea48bf17d14ede8c1 (patch)
tree48a1d2e9fb9a7beb0c71ce016104022e79d736d3 /src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
parent3f0266e5d20216f68f515a943ad647d01e0ff567 (diff)
New package Native Window Interface 'java.media.nwi',
to loose JOGL dependencies for the moved interfaces, mainly NativeWindow. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1863 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/javafx/newt/windows/WindowsWindow.java')
-rwxr-xr-xsrc/classes/com/sun/javafx/newt/windows/WindowsWindow.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
index de05f0951..8b9d635e8 100755
--- a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
+++ b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java
@@ -33,7 +33,8 @@
package com.sun.javafx.newt.windows;
-import javax.media.opengl.GLCapabilities;
+import javax.media.nwi.NWCapabilities;
+import javax.media.nwi.NativeWindowException;
import com.sun.javafx.newt.*;
import com.sun.opengl.impl.*;
@@ -48,7 +49,7 @@ public class WindowsWindow extends Window {
NativeLibLoader.loadNEWT();
if (!initIDs()) {
- throw new RuntimeException("Failed to initialize jmethodIDs");
+ throw new NativeWindowException("Failed to initialize jmethodIDs");
}
}
@@ -62,13 +63,13 @@ public class WindowsWindow extends Window {
return hdc;
}
- protected void createNative(GLCapabilities caps) {
+ protected void createNative(NWCapabilities caps) {
long wndClass = getWindowClass();
- chosenCaps = (GLCapabilities) caps.clone(); // FIXME: visualID := f1(caps); caps := f2(visualID)
+ chosenCaps = (NWCapabilities) caps.clone(); // FIXME: visualID := f1(caps); caps := f2(visualID)
visualID = 0; // n/a
windowHandle = CreateWindow(WINDOW_CLASS_NAME, getHInstance(), visualID, x, y, width, height);
if (windowHandle == 0) {
- throw new RuntimeException("Error creating window");
+ throw new NativeWindowException("Error creating window");
}
windowHandleClose = windowHandle;
}
@@ -125,7 +126,7 @@ public class WindowsWindow extends Window {
if (windowClass == 0) {
windowClass = RegisterWindowClass(WINDOW_CLASS_NAME, getHInstance());
if (windowClass == 0) {
- throw new RuntimeException("Error while registering window class");
+ throw new NativeWindowException("Error while registering window class");
}
}
return windowClass;
@@ -135,7 +136,7 @@ public class WindowsWindow extends Window {
if (hInstance == 0) {
hInstance = LoadLibraryW("newt");
if (hInstance == 0) {
- throw new RuntimeException("Error finding HINSTANCE for \"newt\"");
+ throw new NativeWindowException("Error finding HINSTANCE for \"newt\"");
}
}
return hInstance;