From 8d38222fc13c1e3f42ee0c0afb193e517749e94e Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 5 Jan 2009 21:45:45 +0000 Subject: Native (non-AWT) port of Newt to Mac OS X using Cocoa. Most functionality (mouse click, mouse motion, mouse dragging, keyboard events) appears to be working. Currently works with the Apple JRE and requires the JVM command-line arguments -XstartOnFirstThread and -Djava.awt.headless=true . Will work with the standalone SoyLatte JRE pending additional launcher changes. Tested with Angeles demo and various JavaFX demos. Added -Dnewt.ws.name=AWT option to force the use of the AWT port of Newt on any supported platform. Known bugs: - While resizing a window or dropping down a menu, the application will hang. This is due to how the event processing is currently done in Newt (via Window.dispatchMessages()) and how Mac OS X deals with resize operations (by pushing a nested event loop into which we have no visibility). There are at least a couple of solutions. One would be to preserve the current API semantics but use a Newt Launcher class to move main() on to a different thread, saving the primordial thread for [NSApplication run]. Another would be to move Newt (and, by association, the JavaFX runtime code) to a callback model like GLUT. - Command-Q and the Quit menu option do not yet properly exit the application. - The coordinates for the WINDOW_MOVED event are wrong. Added the rest of the VK_ constants to the KeyEvent class. Made preliminary changes to support the SoyLatte JRE. Worked around initialization order issues with Fmod. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1838 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/javafx/newt/awt/AWTWindow.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/classes/com/sun/javafx/newt/awt/AWTWindow.java') diff --git a/src/classes/com/sun/javafx/newt/awt/AWTWindow.java b/src/classes/com/sun/javafx/newt/awt/AWTWindow.java index 595e84cb0..2315cb1a4 100644 --- a/src/classes/com/sun/javafx/newt/awt/AWTWindow.java +++ b/src/classes/com/sun/javafx/newt/awt/AWTWindow.java @@ -53,6 +53,11 @@ import javax.media.opengl.GLCapabilities; public class AWTWindow extends Window { + public AWTWindow() { + super(); + title = "AWT NewtWindow"; + } + static void setWindowAlpha(java.awt.Window w, float alpha) { // hack for macosx only Object peer = w.getPeer(); -- cgit v1.2.3