gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz gfx/jni/GzzGL-jni.cxx gfx/libos/Os.hxx gzz/...


From: Benja Fallenstein
Subject: [Gzz-commits] gzz gfx/jni/GzzGL-jni.cxx gfx/libos/Os.hxx gzz/...
Date: Wed, 25 Sep 2002 08:27:59 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/09/25 08:27:59

Modified files:
        gfx/jni        : GzzGL-jni.cxx 
        gfx/libos      : Os.hxx 
        gzz/client     : AbstractBinder.java Binder.java 
        gzz/client/gl  : GLScreen.java 
        gzz/gfx/gl     : GL.java 

Log message:
        Try to put windowClosed() callback into gl code --
        for Tuomas to look at and implement

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libos/Os.hxx.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/AbstractBinder.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/Binder.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/gl/GLScreen.java.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.30 gzz/gfx/jni/GzzGL-jni.cxx:1.31
*** gzz/gfx/jni/GzzGL-jni.cxx:1.30      Mon Sep 23 10:38:31 2002
--- gzz/gfx/jni/GzzGL-jni.cxx   Wed Sep 25 08:27:59 2002
***************
*** 109,114 ****
--- 109,115 ----
      jmethodID mid_keystroke;
      jmethodID mid_mousepress;
      jmethodID mid_timeout;
+     jmethodID mid_windowClosed;
  
      GZZJNIEventHandler(JNIEnv *env, jobject globalRef) : globalRef(globalRef) 
{
        if(globalRef) {
***************
*** 123,128 ****
--- 124,131 ----
              env->GetMethodID(cls, "mouse", "(IIII)V");
            mid_timeout =
              env->GetMethodID(cls, "timeout", "(I)V");
+           mid_windowClosed =
+             env->GetMethodID(cls, "windowClosed", "()V");
        }
      }
      ~GZZJNIEventHandler() {
***************
*** 157,162 ****
--- 160,168 ----
      virtual void timeout(int id) {
          jnienv_eventloop->CallVoidMethod(globalRef, mid_timeout, id);
      }
+     virtual void windowClosed() {
+         jnienv_eventloop->CallVoidMethod(globalRef, mid_windowClosed);
+     }
  };
  
  /*
***************
*** 167,173 ****
      GZZJNIIdler(JNIEnv *env, jobject globalRef) : globalRef(globalRef) {
        jclass cls = env->GetObjectClass(globalRef);
        globalclass = (jclass)env->NewGlobalRef(cls);
!       mid_tick = env->GetMethodID(globalclass, 
                     "tick", "()Z");
      }
      ~GZZJNIIdler() {
--- 173,179 ----
      GZZJNIIdler(JNIEnv *env, jobject globalRef) : globalRef(globalRef) {
        jclass cls = env->GetObjectClass(globalRef);
        globalclass = (jclass)env->NewGlobalRef(cls);
!       mid_tick = env->GetMethodID(globalclass,
                     "tick", "()Z");
      }
      ~GZZJNIIdler() {
Index: gzz/gfx/libos/Os.hxx
diff -c gzz/gfx/libos/Os.hxx:1.10 gzz/gfx/libos/Os.hxx:1.11
*** gzz/gfx/libos/Os.hxx:1.10   Mon Sep 23 14:08:46 2002
--- gzz/gfx/libos/Os.hxx        Wed Sep 25 08:27:59 2002
***************
*** 45,51 ****
        /** Load a region of this image into a region of a texture.
         * WARNING: artifacts near edges!
         */
!       virtual void loadInto(Mosaic::MosaicTile &tile, 
                int x, int y, int w, int h) = 0;
        /** Load this image into the current texture_2D.
         */
--- 45,51 ----
        /** Load a region of this image into a region of a texture.
         * WARNING: artifacts near edges!
         */
!       virtual void loadInto(Mosaic::MosaicTile &tile,
                int x, int y, int w, int h) = 0;
        /** Load this image into the current texture_2D.
         */
***************
*** 68,73 ****
--- 68,74 ----
        virtual void keystroke(const char *str) {}
        virtual void mouse(int x, int y, int button, int type) {}
        virtual void timeout(int id) {}
+       virtual void windowClosed() {}
        virtual void resize(int w, int h) { repaint(); }
        virtual void repaint() { };
      };
Index: gzz/gzz/client/AbstractBinder.java
diff -c gzz/gzz/client/AbstractBinder.java:1.2 
gzz/gzz/client/AbstractBinder.java:1.3
*** gzz/gzz/client/AbstractBinder.java:1.2      Wed Sep 25 06:56:54 2002
--- gzz/gzz/client/AbstractBinder.java  Wed Sep 25 08:27:59 2002
***************
*** 37,40 ****
--- 37,41 ----
        this.screen = s;
      }
      public void mouse(MouseEvent e, Object window) { }
+     public void windowClosed(Object window) { }
  }
Index: gzz/gzz/client/Binder.java
diff -c gzz/gzz/client/Binder.java:1.8 gzz/gzz/client/Binder.java:1.9
*** gzz/gzz/client/Binder.java:1.8      Wed Sep 25 06:56:54 2002
--- gzz/gzz/client/Binder.java  Wed Sep 25 08:27:59 2002
***************
*** 53,57 ****
--- 53,61 ----
       * expired.
       */
      void timeout(Object id);
+     
+     /** A window has been closed by the user.
+      */
+     void windowClosed(Object window);
  }
  
Index: gzz/gzz/client/gl/GLScreen.java
diff -c gzz/gzz/client/gl/GLScreen.java:1.30 
gzz/gzz/client/gl/GLScreen.java:1.31
*** gzz/gzz/client/gl/GLScreen.java:1.30        Wed Sep 25 07:36:23 2002
--- gzz/gzz/client/gl/GLScreen.java     Wed Sep 25 08:27:59 2002
***************
*** 33,39 ****
  import java.util.HashMap;
  
  public class GLScreen extends GraphicsAPI.Window {
! public static final String rcsid = "$Id: GLScreen.java,v 1.30 2002/09/25 
11:36:23 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
--- 33,39 ----
  import java.util.HashMap;
  
  public class GLScreen extends GraphicsAPI.Window {
! public static final String rcsid = "$Id: GLScreen.java,v 1.31 2002/09/25 
12:27:59 benja Exp $";
      public static boolean dbg = false;
      private static void pa(String s) { System.err.println(s); }
  
***************
*** 151,156 ****
--- 151,160 ----
  
            public void timeout(int id) {
                binder.timeout(timeouts.remove(new Integer(id)));
+           }
+           
+           public void windowClosed() {
+               binder.windowClosed(repr);
            }
      }
  
Index: gzz/gzz/gfx/gl/GL.java
diff -c gzz/gzz/gfx/gl/GL.java:1.5 gzz/gzz/gfx/gl/GL.java:1.6
*** gzz/gzz/gfx/gl/GL.java:1.5  Mon Sep 23 10:38:31 2002
--- gzz/gzz/gfx/gl/GL.java      Wed Sep 25 08:27:59 2002
***************
*** 1,6 ****
! /*   
  GL.java
!  *    
   *    Copyright (c) 2001-2002, Tuomas J. Lukka
   *
   *    You may use and distribute under the terms of either the GNU Lesser
--- 1,6 ----
! /*
  GL.java
!  *
   *    Copyright (c) 2001-2002, Tuomas J. Lukka
   *
   *    You may use and distribute under the terms of either the GNU Lesser
***************
*** 8,14 ****
   *    at your choice, any later version. Alternatively, you may use and
   *    distribute under the terms of the XPL.
   *
!  *    See the LICENSE.lgpl and LICENSE.xpl files for the specific terms of 
   *    the licenses.
   *
   *    This software is distributed in the hope that it will be useful,
--- 8,14 ----
   *    at your choice, any later version. Alternatively, you may use and
   *    distribute under the terms of the XPL.
   *
!  *    See the LICENSE.lgpl and LICENSE.xpl files for the specific terms of
   *    the licenses.
   *
   *    This software is distributed in the hope that it will be useful,
***************
*** 71,76 ****
--- 71,77 ----
        void keystroke(String s);
        void mouse(int x, int y, int button, int type);
        void timeout(int id);
+       void windowClosed();
      }
  
      /** Constant for the int array to be passed to
***************
*** 78,87 ****
       * a zero-argument renderable.
       */
      public static final int RENDERABLE0 = 0x0800000;
!     /** See RENDERABLE0. 
       */
      public static final int RENDERABLE1 = 0x1000000;
!     /** See RENDERABLE0. 
       */
      public static final int RENDERABLE2 = 0x2000000;
  
--- 79,88 ----
       * a zero-argument renderable.
       */
      public static final int RENDERABLE0 = 0x0800000;
!     /** See RENDERABLE0.
       */
      public static final int RENDERABLE1 = 0x1000000;
!     /** See RENDERABLE0.
       */
      public static final int RENDERABLE2 = 0x2000000;
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]