From 9517d52c18bfa93d78e03f4c212757eda421afb6 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 14 Mar 2009 05:20:29 +0000 Subject: NEWT window closing: - New WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY and WindowListener.windowDestroyNotify() method. - Removed windowClosed() method for JNI hook - Added windowDestroyNotify() windowDestroyed(), where windowDestroyNotify() shall be called by the native implementation _before_ the window gets shutdown. The Window.java then sends a WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY event, and either Window.java or it's owner GLWindow.java issues the destroy() procedure. - Added GLEventListener.dispose(GLAutoDrawable), to allow user application to release GL ressources. Issued by GLWindow (-> see windowDestroyNotify()) - X11 impl intercepts WM_DELETE_WINDOW, using Atom, MacosX impl already uses the _before_ method (VERIFY), and Windows impl uses the WM_CLOSE event (VERIFY). JOGL2 dispose/destroy .. - Added GLEventListener.dispose() to GLCanvas and GLJpanel - GL* toString() rearrangement, assumes it is issued by GLContext(), which indeed is the core information node. - Added proper destroy() methods and calls, to achieve a proper resource release at destruction. Instrumentizing almost all classes with a destroy() method, so no release function lookup is necessary. - misc changes .. JOGL2 Demos - Fixed in regards to the above changes git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1867 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/javafx/newt/WindowEvent.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/classes/com/sun/javafx/newt/WindowEvent.java') diff --git a/src/classes/com/sun/javafx/newt/WindowEvent.java b/src/classes/com/sun/javafx/newt/WindowEvent.java index 49cdb5497..a502e912c 100644 --- a/src/classes/com/sun/javafx/newt/WindowEvent.java +++ b/src/classes/com/sun/javafx/newt/WindowEvent.java @@ -36,6 +36,7 @@ package com.sun.javafx.newt; public class WindowEvent extends Event { public static final int EVENT_WINDOW_RESIZED = 100; public static final int EVENT_WINDOW_MOVED = 101; + public static final int EVENT_WINDOW_DESTROY_NOTIFY = 102; public WindowEvent(int eventType, Window source, long when) { this(false, eventType, source, when); @@ -49,6 +50,7 @@ public class WindowEvent extends Event { switch(type) { case EVENT_WINDOW_RESIZED: return "WINDOW_RESIZED"; case EVENT_WINDOW_MOVED: return "WINDOW_MOVED"; + case EVENT_WINDOW_DESTROY_NOTIFY: return "EVENT_WINDOW_DESTROY_NOTIFY"; default: return "unknown (" + type + ")"; } } -- cgit v1.2.3