diff options
author | Sven Gothel <[email protected]> | 2008-06-01 10:33:15 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-06-01 10:33:15 +0000 |
commit | c71c40fbbd2655097cd8fc50fd64c9e8a6740fa0 (patch) | |
tree | 86c7a3146331db8291160146f52806a1dc73a0d1 /src/classes/com/sun/javafx/newt | |
parent | d1b0143a16af0b44cd0811025c2b8296f063e746 (diff) |
refactoring .. wip ..
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1656 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/javafx/newt')
4 files changed, 15 insertions, 18 deletions
diff --git a/src/classes/com/sun/javafx/newt/NewtFactory.java b/src/classes/com/sun/javafx/newt/NewtFactory.java index e0281eafa..addc867d0 100755 --- a/src/classes/com/sun/javafx/newt/NewtFactory.java +++ b/src/classes/com/sun/javafx/newt/NewtFactory.java @@ -72,7 +72,7 @@ public abstract class NewtFactory { return Screen.create(getWindowType(), display, index); } - public static Window createWindow(Screen screen, long visualID) { + public static Window createWindow(Screen screen, int visualID) { return Window.create(getWindowType(), screen, visualID); } diff --git a/src/classes/com/sun/javafx/newt/Window.java b/src/classes/com/sun/javafx/newt/Window.java index 16984d1f3..71559ede2 100755 --- a/src/classes/com/sun/javafx/newt/Window.java +++ b/src/classes/com/sun/javafx/newt/Window.java @@ -45,7 +45,7 @@ public abstract class Window implements NativeWindow public static final boolean DEBUG_KEY_EVENT = false; public static final boolean DEBUG_IMPLEMENTATION = true; - protected static Window create(String type, Screen screen, long visualID) { + protected static Window create(String type, Screen screen, int visualID) { try { Class windowClass = null; if (NewtFactory.KD.equals(type)) { @@ -89,7 +89,7 @@ public abstract class Window implements NativeWindow } protected Screen screen; - protected long visualID; + protected int visualID; protected long windowHandle; protected boolean locked; @@ -132,7 +132,7 @@ public abstract class Window implements NativeWindow return windowHandle; } - public long getVisualID() { + public int getVisualID() { return visualID; } diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java index c392cb20e..01f763f0f 100755 --- a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java +++ b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java @@ -37,10 +37,7 @@ import com.sun.javafx.newt.*; import com.sun.opengl.impl.*; public class WindowsWindow extends Window { - private Screen screen; - private long visualID; private boolean fullscreen, visible; - private long window; // Default width and height -- will likely be re-set immediately by user private int width = 100; private int height = 100; @@ -72,12 +69,12 @@ public class WindowsWindow extends Window { public void setVisible(boolean visible) { if(this.visible!=visible) { this.visible=visible; - setVisible0(window, visible); + setVisible0(windowHandle, visible); } } public void setSize(int width, int height) { - setSize0(window, width, height); + setSize0(windowHandle, width, height); } public void setPosition(int x, int y) { @@ -106,7 +103,7 @@ public class WindowsWindow extends Window { public boolean setFullscreen(boolean fullscreen) { if(this.fullscreen!=fullscreen) { this.fullscreen=fullscreen; - return setFullScreen0(window, fullscreen); + return setFullScreen0(windowHandle, fullscreen); } return true; } @@ -124,7 +121,7 @@ public class WindowsWindow extends Window { } public void pumpMessages() { - DispatchMessages(window); + DispatchMessages(windowHandle); } //---------------------------------------------------------------------- @@ -156,12 +153,12 @@ public class WindowsWindow extends Window { private static native boolean initIDs(); private static native long LoadLibraryW(String libraryName); private static native long RegisterWindowClass(String windowClassName, long hInstance); - private native long CreateWindow(String windowClassName, long hInstance, long visualID, + private native long CreateWindow(String windowClassName, long hInstance, int visualID, int x, int y, int width, int height); - private native void setVisible0(long window, boolean visible); - private static native void DispatchMessages(long window); - private native void setSize0(long window, int width, int height); - private native boolean setFullScreen0(long window, boolean fullscreen); + private native void setVisible0(long windowHandle, boolean visible); + private static native void DispatchMessages(long windowHandle); + private native void setSize0(long windowHandle, int width, int height); + private native boolean setFullScreen0(long windowHandle, boolean fullscreen); private void sizeChanged(int newWidth, int newHeight) { width = newWidth; diff --git a/src/classes/com/sun/javafx/newt/x11/X11Window.java b/src/classes/com/sun/javafx/newt/x11/X11Window.java index d89cd1169..d9a6e07ba 100755 --- a/src/classes/com/sun/javafx/newt/x11/X11Window.java +++ b/src/classes/com/sun/javafx/newt/x11/X11Window.java @@ -144,7 +144,7 @@ public class X11Window extends Window { private static native boolean initIDs(); private native long CreateWindow(long display, long screen, int screen_index, - long visualID, int x, int y, int width, int height); + int visualID, int x, int y, int width, int height); private native void setVisible0(long display, long windowHandle, boolean visible); private native void DispatchMessages(long display, long windowHandle); private native void setSize0(long display, long windowHandle, int width, int height); @@ -170,7 +170,7 @@ public class X11Window extends Window { } } - private void windowCreated(long visualID, long windowHandle) { + private void windowCreated(int visualID, long windowHandle) { this.visualID = visualID; this.windowHandle = windowHandle; } |