[393] in java-interest

home help back first fref pref prev next nref lref last post

XOR Graphics and Mouse Capture implemented !

daemon@ATHENA.MIT.EDU (Randy Gordon - Sun Victoria SE)
Mon Jun 19 16:27:46 1995

Date: Mon, 19 Jun 1995 13:05:26 -0700
From: randyg@Canada.Sun.COM (Randy Gordon - Sun Victoria SE)
To: java-interest@java.Eng.Sun.COM


Hello all,

If anyone is interested, I have implemented some temporary extensions 
to the libawt.so library and awt class libraries for Java on Solaris.

These extensions are necessary to implement "rubber banding" operations, 
and any other type of operation requiring pointer event capture.

Now I can proceed with my drawing project in Java!

The extensions are:

Graphics.xorMode();         // Foreground will XOR with background pixels
Graphics.paintMode();       // Foreground will replace background pixels

Window.setCapture();        // Implements a server-side X toolkit grab of 
Window.releaseCapture();    //   pointer movement, press, and release events

Note: THESE ARE NOT OFFICIALLY SANCTIONED EXTENSIONS!!!
      Although I am a Sun employee, I am not involved in the Java project.
      I have no idea how these types of operations will be implemented in 
      the production version of AWT. At least these extensions should allow 
      you to proceed if you "really need" these functions to prototype 
      applications.  The names of the functions may be different when/if 
      they are officially implemented in AWT. Use at your own risk!

      I have done minimal testing on these extensions and they appear to 
      work as I expect.  If you call setCapture make sure you eventually call 
      releaseCapture or you will have to restart your X server! The semantics 
      of these functions is similar to those encountered in "Windows 3.x" 
      programming.

Let me know if you will find these useful and I will send instructions on 
how to tweak your Java source code.

Cheers, Randy

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post