gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] libvob/doc/pegboard/gl_mouse_modifiers--mudyc p...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob/doc/pegboard/gl_mouse_modifiers--mudyc p...
Date: Fri, 01 Aug 2003 10:37:34 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Tuomas J. Lukka <address@hidden>        03/08/01 10:37:34

Modified files:
        doc/pegboard/gl_mouse_modifiers--mudyc: peg.rst 

Log message:
        Mousemodifiers proposal

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/doc/pegboard/gl_mouse_modifiers--mudyc/peg.rst.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: libvob/doc/pegboard/gl_mouse_modifiers--mudyc/peg.rst
diff -u libvob/doc/pegboard/gl_mouse_modifiers--mudyc/peg.rst:1.3 
libvob/doc/pegboard/gl_mouse_modifiers--mudyc/peg.rst:1.4
--- libvob/doc/pegboard/gl_mouse_modifiers--mudyc/peg.rst:1.3   Fri Aug  1 
08:32:23 2003
+++ libvob/doc/pegboard/gl_mouse_modifiers--mudyc/peg.rst       Fri Aug  1 
10:37:34 2003
@@ -3,10 +3,10 @@
 PEG gl_mouse_modifiers--mudyc: Fixing native mouse event binder
 ========================================================================
 
-:Authors:  Matti Katila
+:Authors:  Matti Katila, Tuomas J. Lukka
 :Date-Created: 2003-08-01
-:Last-Modified: $Date: 2003/08/01 12:32:23 $
-:Revision: $Revision: 1.3 $
+:Last-Modified: $Date: 2003/08/01 14:37:34 $
+:Revision: $Revision: 1.4 $
 :Status:   Current
 :Stakeholders: tjl
 :Scope:    Trivial
@@ -28,8 +28,8 @@
 doesn't look for modifier keys('Control', 'Alt', 'Shift' or 'Meta').
 
 
-Changes
-=======
+Background
+==========
 
 The current OpenGL event code sends modifier keys on mouse button 
 events in a really strange way:
@@ -48,4 +48,42 @@
 fixed to correspond the correct mature of awt client 
 where 'Control', 'Shift', 'Alt' and 'Meta' are 
 noticed only when the modifier is pressed.
+
+Changes
+=======
+
+The problem is, it appears, in JDK: the constants
+InputEvent.BUTTON2_MASK and InputEvent.BUTTON3_MASK
+are aliased to Event.ALT_MASK and META_MASK, respectively!!!
+
+JDK 1.4 has some sort of workarounds but they make things
+even more difficult - the workings of the MouseEvent
+constructor are complicated, to say the least..
+
+In view of this and the fact that we shouldn't have to pull
+in any AWT code for GL-using vob code, we propose that 
+``org.nongnu.libvob.Binder`` should stop using the MouseEvent class.
+
+The Libvob AWT code should translate the AWT mouse events 
+to the protocol we decide on.
+
+I suggest an event structure of our own::
+
+    public class VobMouseEvent {
+       public final static int MOUSE_PRESSED;
+       public final static int MOUSE_RELEASED;
+       public final static int MOUSE_WHEEL;
+
+       public final static int SHIFT_MASK;
+       public final static int CONTROL_MASK;
+       public final static int ALT_MASK;
+
+       public int getType();
+       public int getX();
+       public int getY();
+       public int getWheelDelta();
+       public int getModifiers();
+       public int getButton();
+    }
+
 




reply via email to

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