weirdx-1.0.32/0000755000175000017500000000000010751060551011547 5ustar mjj29mjj29weirdx-1.0.32/README0000644000175000017500000000525710037066654012447 0ustar mjj29mjj29 WeirdX a pure JavaTM X Window System server by JCraft Inc. http://www.jcraft.com/weirdx/ Last modified: Thu Apr 15 08:28:56 UTC 2004 Description =========== WeirdX is a pure Java X Window System server under GNU GPL. It is implemented with JDK 1.1 & Swing 1.1 APIs, so it will run on several platforms. WeirdX handles X window protocol directly, so any proxy programs are not needed on X client side. WeirdX is derived from WiredX/JXPie, which are also pure Java X Window System server. WiredX is a pure Java X server for Java2 and JXPie is for PersonalJavaTM. Features ======== - WeirdX handles x protocols directly. - WeirdX supports core protocols of X11R6.3 partially. - WeirdX is implemented with JDK 1.1. - WeirdX runs as an application/applet. - WeirdX supports multi-window mode. - WeirdX supports secure X accesses by using JSch. - WeirdX runs as a TrueType font X Server if your JVM supports TrueType - WeirdX supports the three mouse button emulation. - WeirdX supports copy/paste operations between the native window syste - WeirdX supports 1bpp, 8bpp and 16bpp mode. - WeirdX supports multibyte characters; Japanese, Korean and Chinese ch - JRexec(http:/www.jcraft.com/jrexec/) is included. - XDMCP is supported. - WeirdX supports the dxpc(http://www.vigor.nu/dxpc/index.html). - WeirdX includes hacks for the alpha transparency. - WeirdX supports EsounD(http://www.tux.org/~ricdude/EsounD.html) - WeirdX includes the XJS Extension, written by Christian Werne(http://home.t-online.de/home/Christian.Werner/) - WeirdX is distributed under GNU GPL. Documentation ============= Read before asking. * README files all over the source tree have info related to the stuff in the directories. * INSTALL has instructions for using. * FAQ: Frequently Asked Questions. * NEWS lists user visible changes from the previous version. Read it if you are upgrading. * MIRRORS: some alternative places where you can get WeirdX. * ChangeLog: what changed from the previous version? Directories & Files in the Source Tree ====================================== * misc/ has various utility programs. * misc/xjs has the XJS Extension for WeirdX by Christian Werner. * config/ has a file 'props', in which properties for WeirdX are described. * com/ has source trees of WeirdX and JRexec. Copyrights & Disclaimers ======================== WeirdX is copyrighted by JCraft Inc. and is licensed through the GNU General Public License. Read the COPYING file for the complete license. If you have any comments, suggestions and questions, write us at weirdx@jcraft.com weirdx-1.0.32/INSTALL0000644000175000017500000003500610037521277012610 0ustar mjj29mjj29 How to use WeirdX ==================================================================== Last modified: Thu Apr 15 07:13:21 UTC 2004 * SUPPORTED PLATFORMS * REQUIREMENTS * OPTIONAL * USAGE * USAGE AS AN APPLET * WeirdX runs without Swing! * XDMCP * Copy/Paste * Multibyte Characters * Keyboard * SSH2 X11 Forwarding in Java * Hacks for the Alpha Transparency * EsounD Support * DXPC Support * XJS Extension for WeirdX * PROPERTIES SUPPORTED PLATFORMS =================== WeirdX is implemented with JDK 1.1.*. So, WeirdX will be available on any platform, which support JDK 1.1. Here, we list supported platforms, which we have confirmed already. If you succeed to run WeirdX on other platform, please add it to this list. - Windows 95 - Windows 98 - Windows NT - Windows 2000 Professional using JDK 1.3.0rc1 (feedback from Schult, John) - OS/2, J2SE 1.3 (feeback from Dan Nimick) - Sparc Solaris, Netscape4.72&Java2 Plug-in (feedback from Chris Debenham) - Intel Solaris 2.6.0 - Intel GNU/Linux, J2SE v.1.2.2 (feedback from David Golden) - FreeBSD (feedback from Brian Gilman) - Alpha OSF1, J2SDK.v.1.2.1 (feedback from Keith Schincke) - MacOS X Beta, Java HotSpot Client 1.3 (feedback from Ryan Calder) - MacOS 9 with MRJ 2.1.4, MacOS 8.6 with MRJ 2.1.x (feedback from Tarun Reddy, Eric Albert) REQUIREMENTS ============ The following softwares are required to use WeirdX. - JDK 1.1.*(in some case, Swing 1.1.*) or Java2 WeirdX runs without the Swing API and, in a optional mode, it runs with the Swing API. For the difference between them, please refer to the section 'WeirdX runs without Swing!'. OPTIONAL ======== WeirdX is also usable as an Java applet; WeirdX will run in a web browser, Internet Explorer, Netscape Navigator. If you try WeirdX on Windows 95/98, we recommend to run WeirdX in a web browser. If you run WeirdX as an application on DOS prompt, it will run very slowly. - web browser. Internet Explorer or Netscape Navigator. Don't use Java2 plug-in on Opera. Opera will crash. USAGE ===== Before using WeirdX, check CLASSPATH includes swingall.jar in Swing 1.1.* and current directory. Then type, javac -O com/jcraft/weirdx/*.java com/jcraft/util/*.java # In this distribution, *.class files has been included, # so you can skip this step. java com.jcraft.weirdx.WeirdX or cd misc java -jar weirdx.jar If 'config/props' exists, property settings in that file will be loaded. If you want to over write those propety settings, just edit that file or give options to java command. For example, java -Dweirdx.displaynum=3 -Dweirdx.jesd=yes -jar weirdx.jar If everything goes well automagically, one window will be opened on your desktop. This is an X Window System server. In default setting, WeirdX will use display-name ':2.0' . To run x clients on WeirdX, just specify '-display' option. Suppose that WeirdX are running on some machine, named "foo", and you have Un*x machine, named "bar". Try next command on machine "bar" xlogo -display foo:2.0 "misc" directory has some scripts for executing WeirdX easily. At present, scripts for Unix, Windows and OS/2 are located. USAGE AS AN APPLET ================== Copy "misc/weirdx.jar" and "misc/weirdx.html" to some directory, which is accessible through a http server, then open weirdx.html with a web browser via a http server. If everything goes well, WeirdX will start in your web browser. In default setting, WeirdX use display-name ':2.0' . If you have Java Plug-in, try 'weirdx-JRE12.html'. In some situations, JVM may throw the Security Exception. WeirdX must gain access to TCP port(6002) and JVM may reject to do so. WeirdX runs without Swing! ========================== Since 1.0.16, WeirdX runs without the Swing API. # This improvement has been done by Marcus Schiesser. This new version has advantages over previous versions, which had used Swing API, in that, needless to say, it can run on web browser without Java Plug-in and it is free from the snail Swing's painting system. The disadvantage is that you will observe unnecessary re-paintings on the Swing free version. In other words, WeirdX had used the Swing API to prevent those re-paintings. If you want to use Swing version, set a property 'weirdx.ddxwindow' as 'com.jcraft.weirdx.DDXWindowImpSwing' . XDMCP ===== WeirdX supports XDMCP. If you want to use this functionality, specify properties, 'weirdx.xdmcp.mode' and 'weirdx.xdmcp.address' appropriately. In current implementation, 'indirect query' has not been supported. And this functionality can be used as a stand alone program, so it will be useful for X Window System users, whose X server does not support XDMCP. Try, java com.jcraft.weirdx.XDMCP -query somewhere -display display-name or java com.jcraft.weirdx.XDMCP -broadcast somewhere -display display-name If everything goes well, xdm will open a login-window on your X server. After you get a login-window, please kill the above java process as soon as possible. Caution: At present, any authorization mechanism has not been implemented. So please use this functionality with your own risk. Copy/Paste ========== Copy/paste operations between the native window system and WeirdX(CUT_BUFFER0) has been supported. For example, you can copy/paste strings on 'xterm', which runs on WeirdX, to 'notepad' on Windows98. At present, 'selection' has not been supported. So you can't copy strings on TextField widgets of GTK,Motif to apps on Windows98. However, 'xcutsel' will help you. Multibyte Characters ==================== WeirdX supports to display multibyte characters on the internationalized JRE. If you need to display Japanese, Korean and Chinese characters on Weirdx, try weirdx.display.charset=JISX,KSC5601,GB2312 At present, WeirdX supports Japanese, Korean and Chinese characters, but only Japanese characters have been confirmed to be handled correctly. If you succeeded or failed to display others, please write us. Keyboard ======== In default settings, WeirdX supposes that key events are from US layout keyboard. If your keyboard is other layout one, you can change internal keymap definitions by setting a property 'weirdx.display.keymap'. If your keyboard is for U.K., try weirdx.display.keymap=gb At present, WeirdX supports gb(U.K. layout keyboard), de. If you are using other keyborad, for example, jp106. Please try 'misc/keymap/genkeymap.pl'. It is a perl script and generates java files for supporting your keyboard. Please refer to 'misc/keymap/HOWTO'for its usage. SSH2 X11 Forwarding in Java =========================== WeirdX allows you to get secure X accesses by X11 forwarding of SSH2 in pure Java. This functionality is based on JSch, which is a pure Java implementation of SSH2 and developed by JCraft under revised BSD license. It is available at http://www.jcraft.com/jsch/ . To enjoy this functionality, try following steps, 1. Download JSch from http://www.jcraft.com/jsch/ . You can get the source code of JSch and also jar file from there. 2. Specify property 'weirdx.sshrexec' as 'yes'. 3. Run WeirdX For example, if you have two jar files, jsch-0.1.14.jar and weirdx-1.0.32.jar, java -Dweirdx.sshrexec=yes \ -cp jsch-0.1.14.jar\;weirdx-1.0.32.jar \ com.jcraft.weirdx.WeirdX 4. A dialog window for rexec on ssh will be appeared. Please note that your JVM must be J2SE v1.4 or higher to use this functionality to enable this functionality. And also the souce code for this functionaly is named as 'com/jcraft/weirdx/SSHRexec.jav', so you have to rename it as 'com/jcraft/weirdx/SSHRexec.java' to compile it. Hacks for the Alpha Transparency ================================ Two hacks for the alpha transparency have been added. * First hack renders backgrounds of every windows, which have pixel background value, with alpha compositions. For example, if you set a property 'weirdx.ddxwindow' as 'com.jcraft.weirdx.DDXWindowImpSwingAlphaBackground', a property 'weirdx.display.background.alpha' as '0xff0000:0x20' and run 'xterm -bg red', the background of xterm will be rendered as '0x20ff0000'. * Second hack renders contents of windows with alpha compositions. This hack is based on Java2D, so J2SE 1.2.* or higher are required. To enable this hack, set a property 'weirdx.ddxwindow' as 'com.jcraft.weirdx.DDXWindowImpSwingAlphaBackground2D' . Please note those hacks are just for the fun, not for the practical use and they will be useful for surprising your friends. EsounD Support ============== You can run EsounD compatible applications on WeirdX with JEsd. JEsd is a re-implementation of EsounD in pure Java and has been developed by JCraft. Please note that your JVM must be J2SE v1.3 or higher to use this functionality. To enable this functionality, try following steps, 1. Download a jesd archive from http://www.jcraft.com/jesd/ , extract class files from it and then make these class files to be accessible through the CLASSPATH by WeirdX. 2. Specify property 'weirdx.jesd' as 'yes'. 3. Run WeirdX. 4. On the remote host, try next command, $ esdcat -s 'hostname where WeirdX is running' 'filename of WAV file' Try other EsounD compatible apps, mpg123, gqmpeg and xmms. DXPC Support ============ The dxpc(Differential X Protocol Compressor) is an X protocol compressor designed to improve the speed of X applications run over low-bandwidth links (such as dialup PPP connections). WeirdX can accept connections via dxpc from X clients with the assistance of JDxpc. JDxpc is a re-implementation of dxpc in pure Java and it has been developed by JCraft under LGPL. It is available at http://www.jcraft.com/weirdx/ . To enable this functionality, try following steps, 1. Download a JDxpc archive from http://www.jcraft.com/jdxpc/ , extract class files from it and then make these class files to be accessible through the CLASSPATH by WeirdX. 2. Specify property 'weirdx.jdxpc' as 'yes'. 3. Run WeirdX. 4. On the remote host, try next command, $ dxpc -w 'hostname where WeirdX is running' $ export DISPLAY=localhost:8.0 $ xlogo Please note that dxpc must be version 3.7.0 and it is downloadable from http://www.vigor.nu/dxpc/dxpc-3.7.0.html . Of course, you can use JDxpc instead of using dxpc on remote host. If you need to change the communication port number(by default, 4000) between dxpc client and server proxies, specify the appropriate number to the property 'weirdx.jdxpcport'. (To use this property, JDxpc 0.0.6 or higher is required). XJS Extension for WeirdX ======================== Now, XJS Extension for WeirdX has been included. It is contributed by Christian Werner and enable you to use the JavaScriptTM engine from X clients. For further descriptions, please check 'misc/xjs/README'. PROPERTIES ========== WeirdX has some properties as below, * weirdx.display.width: numeral Width of root window. If you don't specify this property, the property "WIDTH" will be used. * weirdx.display.height: numeral Height of root window. If you don't specify this property, the property "HEIGHT" will be used. * weirdx.displaynum: numeral default: 2 If you specify "3", display-name, "hostname:3.0" will be used. * weirdx.ddxwindow: class name default: com.jcraft.weirdx.DDXWindowImp Give a class name, which implements com.jcraft.weirdx.DDXWindow interface. If you have the Swing, specify 'com.jcraft.weirdx.DDXWindowImpSwing' . At present, 'com.jcraft.weirdx.DDXWindowImp', 'com.jcraft.weirdx.DDXWindowImpSwing', 'com.jcraft.weirdx.DDXWindowImpSwingAlphaBackground' and 'com.jcraft.weirdx.DDXWindowImpSwingAlphaBackground2D' are acceptable. * weirdx.windowmode: InBrowser | Rootless | RootlessWM default: InBrowser If you specify 'Rootless' or 'RootlessWM', each toplevel window, whose parent is root window, will have its own window frame. In the 'RootlessWM' mode, you don't have to run X window manager and title bars will be attached to X apps by the native window system. * weirdx.display.visual: TrueColor16 | PseudoColor8 | StaticGray8 default: PseudoColor8 If 'PseudoColor8' is specified, 256 colors are used. On the other hand, in specifying 'StaticGray8', 256 gray scaled colors will be used. * weirdx.display.acl: [+hostname[,+hostname[,...]]] default: - WeirdX only supports ACL based on hostnames. * weirdx.display.threebutton: yes | no default: no Three button mouse emulation is enabled. * weirdx.display.charset: [charset[,charset[,...]]] Specified charsets will be handled. For Japanese characters, specify 'JISX'. For Korean characters, specify 'KSC5601', and for Chinese characters, specify 'GB2312'. * weirdx.display.keymap: a name of keymap. default: 101 Specified keymap definitions is used. At present, '101', 'gb' and 'de' are acceptable. * weirdx.xdmcp.mode: query | broadcast | no default: no If you require the XDMCP service, specify 'query' or 'broadcast'. * weirdx.xdmcp.address: ip-address Specify a query address or a broadcast address. * weirdx.xrexec: yes | no default: no If you require the rexec service, specify 'yes'. * weirdx.extension: names of extensions. default: DummySHAPE In current implementation, dummy of SHAPE extension is included. If you hate such a hack, leave this property in blank. * weirdx.display.background.alpha: pixel value:alpha value[,pixel:alpha[,...]] default: blank Specify pairs of a background pixel value and an alpha channel value. If you specify '0xff0000:0x20, 0x00ff00:0x80', The background color 'red' will be '0x20ff0000' and the background color 'green' will be '0x8000ff00'. * weirdx.sshrexec: yes | no default: no Specify 'yes' for getting secure X accesses by X11 forwarding of SSH2. For using this functionality, your JVM must be J2SE v1.4 or higher. * weirdx.jesd: yes | no default: no If you need to run EsounD compatible applications, specify 'yes'. For using this functionality, your JVM must be J2SE v1.3 or higher. * weirdx.jdxpc: yes | no default: no If you need to use dxpc, specify 'yes'. * weirdx.jdxpcport: numeral default: 4000 a number of TCP port for communication between dxpc server and client proxies. * weirdx.jdxpc.socket: class-name default: null * weirdx.jdxpc.serverproxy: class-name default: com.jcraft.jdxpc.ServerProxy * weirdx.displaysocket: class name default com.jcraft.weirdx.DisplaySocket6k * weirdx.display.autosize: boolean default: false The size of root window will be assigned according to the size of desktop. This functionality will be useful in Rootless/RootlessWM mode. In running as an application, "config/props" will be referred. weirdx-1.0.32/FAQ0000644000175000017500000001417107404740673012120 0ustar mjj29mjj29 WeirdX FAQ ==================================================================== Last modified: Wed Mar 14 14:22:14 UTC 2001 the latest info can be found at http://www.jcraft.com/weirdx/ -------------------------- Summary of Contents: 1 - Introduction 1.1 What is WeirdX? 1.2 Where can I get WeirdX? 1.3 Why is it named "WeirdX"? 1.4 What X protocols are supported? 1.5 How about the relation between WeirdX and WiredX? 2 - Installation 2.1 What are required to use WeirdX? 3 - Usage 4 - Configuration 4.1 What Java properties are accepted? 5 - Miscellaneous Questions 5.1 How about SSH? ======================================================================== -=-=-=-=-=-=- Introduction: -=-=-=-=-=-=- 1.1 What is WeirdX? ---------------------------------- WeirdX is a pure JavaTM X Window System server. WeirdX handles X window protocol directly, so any proxy programs are not needed on X client side. WeirdX had originated from an early version of WiredX-Lite. 1.2 Where can I get WeirdX? ---------------------------------- The official site to get new developmental versions is http://www.jcraft.com/weirdx/ . 1.3 Why it is named "WeirdX"? ---------------------------------- That name has come from the development cycle of authors. First of all, X clients had be executed on WeirdX at random. Then, if 'weird' behaviors had been observed, they had started dull bug hunting procedures, dumping X protocol sequences, interpreting them by eye balls, checking spec-docs of X protocols, etc,. If bugs had been identified and they had been fixed, fixed code had been feed-backed to the source tree. These cycles has been repeated tons of times. You may find weird behaviors in current version. Some of them are forgiven to be fixed, because of poor functionalities of Java 1.1.* APIs. 1.4 What X protocols are supported? ---------------------------------- At present, only X Core protocol is supported partially. In the core protocol, some requests are given up to be implemented. For example, the request "WarpPointer" is not supported. Do you know how to move a mouse pointer by Java APIs? 1.5 How about the relation between WeirdX and WiredX? ----------------------------------------------------- WiredX is a pure Java X server and it is a flagship of JCraft,Inc. JCraft has developed WiredX since April/1998 and continued to make best efforts for improving it day by day. WeirdX is also a pure Java X server and it was ramified from the snapshot(March/1999) of WiredX. Since that ramification, WeirdX has been improved by ymnk in his spare time and he will continue to improve it, because we believe GPL'ed pure Java X server is useful for open source community. As you know, WeirdX is under GPL and on the other hand WiredX is not free software, to our regret. Of course, contributions from contributers to WeirdX must never be merged to WiredX. -=-=-=-=-=-=- Installation: -=-=-=-=-=-=- 2.1 What are required to use WeirdX? You need JDK 1.1.*(in some case, Swing 1.1.*) or Java2. And of course, you must have a unix box, on which X clients run. If you want to run WeirdX as an applet, you need Java plug-in, JRE 1.1.2 or Java2 and web browsers: Internet Explorer or Netscape Navigator. Don't use Java2 plug-in on Opera. Opera will crash. 2.2 What platforms are supported? Ideally, WeirdX will be available on any platform, which supports JDK 1.1.* and Swing 1.1.*. Confirmed platforms are listed below. If you succeed to run WeirdX on other platforms, please write to weirdx@jcraft.com. Your info will be added here. - Windows 95 - Windows 98 - Windows Me - Windows NT - Windows 2000 Professional using JDK 1.3.0rc1 (feedback from Schult, John) - OS/2 - Sparc Solaris, Netscape4.72&Java2 Plug-in (feedback from Chris Debenham) - Intel Solaris 2.6.0 - Intel GNU/Linux, J2SE v.1.2.2 (feedback from David Golden) - Intel GNU/Linux, IBM JDK 1.3.0 (feedback from Henner Zeller) - PPC GNU/Linux, jdk1.2.2 RC4 (feedback from Brian Gilman) - Alpha GNU/Linux, Compaq J2SDK for Linux AE Alpha Version 1.3.1-beta (feedback from Wouter Rademaker) - Sun Ultra 10 GNU/Linux, Backdown's port of JDK 1.2.2 (feedback from Kwok Lau) - FreeBSD (feedback from Brian Gilman) - Alpha OSF1, J2SDK.v.1.2.1 (feedback from Keith Schincke) - MacOS X Beta, Java HotSpot Client 1.3 (feedback from Ryan Calder) - MacOS 9 with MRJ 2.1.4, MacOS 8.6 with MRJ 2.1.x (feedback from Tarun Reddy, Eric Albert) - NetWare 5.1 with JVM 1.1.7B (jvm03012000) (feedback from Patrick Medhurst) - SGI Irix 6.5.9m with JVM "3.2 (Sun 1.1.8)" (feedback from Marcus Herbert) -=-=-=- Usage: -=-=-=- -=-=-=-=-=-=-=- Configuration: -=-=-=-=-=-=-=- 4.1 What Java properties are accepted? Supported properties are listed below, - weirdx.display.width: numeral - weirdx.display.height: numeral - weirdx.displaynum: numeral - weirdx.ddxwindow: a class name - weirdx.windowmode: InBrowser | Rootless | RootlessWM - weirdx.display.visual: TrueColor16 | PseudoColor8 | StaticGray8 - weirdx.display.acl: [+hostname[,+hostname[,...]]] - weirdx.display.threebutton: yes | no - weirdx.display.keymap: a name of keymap. - weirdx.display.charset: [charset[,charset[,...]]] - weirdx.xrexec: yes | no - weirdx.xdmcp.mode: query | broadcast - weirdx.xdmcp.address: ip-address - weirdx.extension: names of extensions. - weirdx.display.background.alpha: pixelvalue:alphavalue[,pixel:alpha[,...]] - weirdx.jesd: yes | no - weirdx.jdxpc: yes | no - weirdx.jdxpcport: numeral - weirdx.jdxpc.socket: class-name - weirdx.jdxpc.serverproxy: class-name - weirdx.display.autosize: true | false - weirdx.display.autosize.widthreduce: int - weirdx.display.autosize.heightreduce: int A sample file, "config/props" is included in a distribution. -=-=-=-=-=-=-=-=-=-=-=-=- Miscellaneous Questions: -=-=-=-=-=-=-=-=-=-=-=-=- 5.1 How about SSH? Of course, WeirdX will work with SSH. Here, the feedback from James B. Davis(james.davis@pobox.com) is quated. "I've got FSecure ssh on my WinNT laptop with weirdX 1.0.7. When I set displaynum to 0, a remote client via a ssh session comes right up." Joseph S. Berrios(jberrios@cise.ufl.edu) has reported us that a free ssh client for Windows is available at http://www.zip.com.au/~roca/ttssh.html weirdx-1.0.32/misc/0000751000175000017500000000000010037130226012470 5ustar mjj29mjj29weirdx-1.0.32/misc/weirdx0000755000175000017500000000124307152710306013733 0ustar mjj29mjj29#!/bin/sh if [ -z "${JAVA_HOME}" ] ; then echo "JAVA_HOME environment variable not set." 1>&2 exit 1 fi #if [ -z "${SWING_HOME}" ] ; then # echo "SWING_HOME environment variable not set." 1>&2 # exit 1 #fi if [ -z "$WEIRDX_HOME" ] ; then WEIRDX_HOME=`pwd` fi cd $WEIRDX_HOME SWING_JARS=${SWING_HOME}/swingall.jar SWING_CLASSES=.:${SWING_JARS} if [ -z "$CLASSPATH" ] ; then CLASSPATH="${SWING_CLASSES}":${JAVA_HOME}/lib/classes.zip else CLASSPATH="${SWING_CLASSES}:$CLASSPATH" fi CLASSPATH="${WEIRDX_HOME}":"${WEIRDX_HOME}"/weirdx.jar:${SWING_CLASSES}:$CLASSPATH CMD="${JAVA_HOME}/bin/java -classpath ${CLASSPATH} com.jcraft.weirdx.WeirdX" ${CMD} weirdx-1.0.32/misc/weirdx.bat0000644000175000017500000000124407152710244014477 0ustar mjj29mjj29@echo off rem set SWING_HOME=\swing-1.1 rem set JAVA_HOME=\jdk1.1.6 rem if "%SWING_HOME%" == "" goto nohome_swing if "%JAVA_HOME%" == "" goto nohome_java if "%CLASSPATH%" == "" set CLASSPATH=%JAVA_HOME%\lib\classes.zip rem set WEIRDX_HOME=\tmp\weirdx\misc if "%WEIRDX_HOME%" == "" set WEIRDX_HOME=. rem cd $WEIRDX_HOME @echo on %JAVA_HOME%\bin\java -classpath ".;%WEIRDX_HOME%\weirdx.jar;%SWING_HOME%;%SWING_HOME%\swingall.jar;%CLASSPATH%" com.jcraft.weirdx.WeirdX @echo off rem cd .. goto done :nohome_swing echo No SWING_HOME environment variable set. goto done :nohome_java echo No JAVA_HOME environment variable set. goto done :done weirdx-1.0.32/misc/weirdx.cmd0000644000175000017500000000133707152710236014500 0ustar mjj29mjj29@echo off rem set SWING_HOME=\swing-1.1 rem set JAVA_HOME=\jdk1.1.6 rem if "%SWING_HOME%" == "" goto nohome_swing if "%JAVA_HOME%" == "" goto nohome_java if "%CLASSPATH%" == "" set CLASSPATH=%JAVA_HOME%\lib\classes.zip rem set WEIRDX_HOME=\tmp\weirdx\misc if "%WEIRDX_HOME%" == "" set WEIRDX_HOME=. rem cd $WEIRDX_HOME @echo on %JAVA_HOME%\bin\java -classpath ".;%WEIRDX_HOME%\weirdx.jar;%SWING_HOME%;%SWING_HOME%\swing.jar;%CLASSPATH%" com.jcraft.weirdx.WeirdX @echo off rem cd .. goto done :nohome_swing echo No SWING_HOME environment variable set. goto done :nohome_java echo No JAVA_HOME environment variable set. goto done :nohome_jxpie echo No WEIRDX_HOME environment variable set. :done weirdx-1.0.32/misc/weirdx-JRE112.html0000644000175000017500000000333707152751133015546 0ustar mjj29mjj29 WeirdX 1.0

WeirdX 1.0


</COMMENT> No JDK 1.1.2 support for APPLET!!
weirdx-1.0.32/misc/README0000644000175000017500000000154307063403712013367 0ustar mjj29mjj29 README of misc directory ==================================================================== Last modified: Mon Nov 1 04:25:04 UTC 1999 This directory contains some scripts to exec WeirdX easily. - weirdx.jar: Byte codes of WeirdX are included in this file. - weirdx: This file is a shell script for running WeirdX on U*nx. - weirdx-Java2: This file is a shell script for running WeirdX on U*nx with Java2. - weirdx.bat: This file is for Windows 9X/NT platform users. - weirdx-Java2.bat: This file is for Windows 9X/NT platform users, who have Java2. - weirdx.cmd: This file is for OS/2 users. - weirdx-JRE12.html: This is a html file, which kicks off WeirdX with Java Plug-in 1.2. - weirdx-JRE112.html This is a html file, which kicks off WeirdX with Java Plug-in 1.1.2. - config/props: Some property settings are written here. weirdx-1.0.32/misc/weirdx.jar0000644000175000017500000063054310037130207014506 0ustar mjj29mjj29PK0 META-INF/PKPK0META-INF/MANIFEST.MFMLK-. K-*ϳR03r.JM,IMu )h)f&W+x%ir&f:$[)$e%%蕧fT腃^.^.PKAcgjPK0com/jcraft/weirdx/Acl.classVs}]YGٲd.چdžMkB6ڵD: -Pk팘B;Qϝo"ٕm%C_:w|_y V Ohh G4b\ńA<)԰!-f樆 4?bXL q 3 fdY% <ɒ<9V-0e3gpJP* QQT si OHd[h&a47Ů=u"3n+ ]Ù@ 9/ofFYqP 4XpRBbG)بL7"p|urAV $Xi-2Y+sR R*Xn_i:E~Z`c͒;_CglRSSLsVBi-dy7gZ$d]pI:+U'P%T&5Bs:[mG`ʸ)=jJc;:<̠_`筹n%#@K:^Y?-u `P=WuCR:~0xo3?gsL݇i4??$mpH۬6~Wo >Zo+k8~ʸDMw2uvƍ9Z7mrĴƺo4-1?ohW{bjھD`k:Îc,wORѴVG\O׿&~e8ͫXt9由)~OuD^λQ4p [*̺Y&;\%ZONt,YwzT# G/SunzxOz_jWSW=k[4/C ҇Tͷ^d}x>fI%T}4 _ PKjQ PK0com/jcraft/weirdx/Alias.class}OPmQ(8R}(qJTD|X&3}=udQ* U4L,w>Aq7ID&'?دb2YNy'ACB:. 6'k߀4y_( `(E$㭘B0j@g >[q'"*sžݽB|xPKQ[w PK0'com/jcraft/weirdx/AlphaBackground.classTmSW~.lfY $5ٴ- bXZulM7'O3$ttƏ:x ] 䜻>>p2M̱gq*ԠbQ%Y\ce 5C*n +[~Y0[lokWTWj Y2RYR5 l߮v2\ ^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Pӈ!Ϗq]I2þ,JlaPsYMXg﷣ֿ}mdDԼ/UTP^oֿ% PK\hPK0 META-INF/PK0Acgj=META-INF/MANIFEST.MFPK0jQ com/jcraft/weirdx/Acl.classPK0Q[w com/jcraft/weirdx/Alias.classPK0ĝ:'com/jcraft/weirdx/AlphaBackground.classPK0F1a[# com/jcraft/weirdx/AlphaFilter.classPK0qF^ com/jcraft/weirdx/Atom.classPK0I吤9Vcom/jcraft/weirdx/Client.classPK0wC&F4com/jcraft/weirdx/ClientColormap.classPK0-x&5com/jcraft/weirdx/ClientListener.classPK06K;/&6com/jcraft/weirdx/ClientResource.classPK0sxN67com/jcraft/weirdx/Clients.classPK04@csy9com/jcraft/weirdx/Clip.classPK0EPJ"&:com/jcraft/weirdx/ClipPixmap.classPK0K9 S&P;com/jcraft/weirdx/ClipRectangles.classPK0@ =com/jcraft/weirdx/Colormap.classPK0pd^"\com/jcraft/weirdx/Colormap16.classPK0?~!-_com/jcraft/weirdx/CopyPaste.classPK0'J Wbcom/jcraft/weirdx/Cursor.classPK04(@gcom/jcraft/weirdx/DDXFont$RefCount.classPK0} R=~ bhcom/jcraft/weirdx/DDXFont.classPK0JbT0!sscom/jcraft/weirdx/DDXWindow.classPK0Ps[^0vcom/jcraft/weirdx/DDXWindowAlphaBackground.classPK0^"J$vcom/jcraft/weirdx/DDXWindowImp.classPK0.~mV_"I)com/jcraft/weirdx/DDXWindowImpSwing.classPK0p+ k85com/jcraft/weirdx/DDXWindowImpSwingAlphaBackground.classPK0Ncom/jcraft/weirdx/Depth.classPK0=P com/jcraft/weirdx/Font.classPK0^V^I$h%com/jcraft/weirdx/Font_CharSet.classPK07cfs 1&com/jcraft/weirdx/Font_CharSet_FONTSPECIFIC.classPK0FN/+j.com/jcraft/weirdx/Font_CharSet_GB2312.classPK0+ )1com/jcraft/weirdx/Font_CharSet_JISX.classPK0w1, 7com/jcraft/weirdx/Font_CharSet_KSC5601.classPK0j3:com/jcraft/weirdx/Format.classPK0,6 $L<com/jcraft/weirdx/GC.classPK0h DMcom/jcraft/weirdx/Grab.classPK0GY"Tcom/jcraft/weirdx/HotSpot.classPK0YSגP Ucom/jcraft/weirdx/IO.classPK0+k&Ycom/jcraft/weirdx/IOLSB.classPK0Ȟs00R\com/jcraft/weirdx/IOMSB.classPK0 61$^com/jcraft/weirdx/ImageFactory.classPK0S׬$P`com/jcraft/weirdx/InputClients.classPK0!_ j=acom/jcraft/weirdx/Key.classPK0P bcom/jcraft/weirdx/Keyboard.classPK0xdxgcom/jcraft/weirdx/Keycode.classPK0Pi[64 icom/jcraft/weirdx/Keymap.classPK0.x; h"ncom/jcraft/weirdx/Keymap_101.classPK0Rxp"!ucom/jcraft/weirdx/Keymap_de.classPK0qB+c!!com/jcraft/weirdx/Keymap_gb.classPK0[ 1 $com/jcraft/weirdx/Keymap_jp106.classPK0#gcom/jcraft/weirdx/Keymodifier.classPK0H[N&ǡcom/jcraft/weirdx/Keymodifier_de.classPK0VdM&com/jcraft/weirdx/Keymodifier_gb.classPK08/O'_com/jcraft/weirdx/Keymodifier_gen.classPK0VeQ)com/jcraft/weirdx/Keymodifier_jp106.classPK0齓i>"com/jcraft/weirdx/LocalEntry.classPK0z8k!<com/jcraft/weirdx/LogoImage.classPK01*ֱ$lcom/jcraft/weirdx/OtherClients.classPK0_ޏW'ocom/jcraft/weirdx/OtherInputMasks.classPK0slcom/jcraft/weirdx/Pix.classPK0 3com/jcraft/weirdx/Pixmap.classPK0.J4Scom/jcraft/weirdx/Pixmap1.classPK07:Ҋ  com/jcraft/weirdx/Pixmap16.classPK0C ) com/jcraft/weirdx/Property.classPK0)^*P]com/jcraft/weirdx/RGBTXT.classPK0p{é!Fcom/jcraft/weirdx/Resizable.classPK0[+'>com/jcraft/weirdx/ResizablePixmap.classPK0[՘j`(com/jcraft/weirdx/ResizablePixmap1.classPK0 +fV)[com/jcraft/weirdx/ResizablePixmap16.classPK0 >w com/jcraft/weirdx/Resource.classPK0@_,{V "C'com/jcraft/weirdx/RootWindow.classPK0>2+.com/jcraft/weirdx/SSHRexec$MyUserInfo.classPK0.#] 1com/jcraft/weirdx/SSHRexec.classPK0=u.|:com/jcraft/weirdx/SaveSet.classPK01D>?com/jcraft/weirdx/Screen.classPK0_6 !%Fcom/jcraft/weirdx/Selection.classPK0gz#:Lcom/jcraft/weirdx/SharedColor.classPK0>zY#Mcom/jcraft/weirdx/SharedEntry.classPK0}Ncom/jcraft/weirdx/Sprite.classPK0hp#)Ocom/jcraft/weirdx/TransparentFilter.classPK0Scom/jcraft/weirdx/Visual.classPK0 9 \Wcom/jcraft/weirdx/WeirdX$1.classPK0_;F$Xcom/jcraft/weirdx/WeirdX$Spawn.classPK0grS ){Zcom/jcraft/weirdx/WeirdX$SpawnJDxpc.classPK0am,^com/jcraft/weirdx/WeirdX$SpawnSSHRexec.classPK0y^f!=Nbcom/jcraft/weirdx/WeirdX.classPK0!&com/jcraft/weirdx/WeirdXBeanInfo.classPK0B ڀcom/jcraft/weirdx/Window$1.classPK062 com/jcraft/weirdx/Window$2.classPK0'iS5com/jcraft/weirdx/Window.classPK0@cr!com/jcraft/weirdx/WindowOpt.classPK07xlD '{com/jcraft/weirdx/XDMCP$UDPIOByte.classPK0Z Gcom/jcraft/weirdx/XDMCP.classPK0܏K $com/jcraft/weirdx/XJSExtension.classPK0>t5com/jcraft/weirdx/XRexec.classPK0h,C com/jcraft/util/JRexec.classPK0м%com/jcraft/util/JRexecException.classPK]YR(\h>com/jcraft/weirdx/weirdx.jpgPKqq]# weirdx-1.0.32/misc/config/0000751000175000017500000000000010037127677013755 5ustar mjj29mjj29weirdx-1.0.32/misc/config/props0000644000175000017500000000331610037124671015041 0ustar mjj29mjj29weirdx.display.width=800 weirdx.display.height=600 weirdx.displaynum=2 weirdx.ddxwindow=com.jcraft.weirdx.DDXWindowImp #weirdx.ddxwindow=com.jcraft.weirdx.DDXWindowImpSwing weirdx.windowmode=InBrowser #weirdx.windowmode=Rootless #weirdx.windowmode=RootlessWM # 16bpp, 8bpp colors #weirdx.display.visual=StaticGray8 #weirdx.display.visual=PseudoColor8 weirdx.display.visual=TrueColor16 # xhost + weirdx.display.acl=+ # three button mouse emulation weirdx.display.threebutton=yes # the copy/paste functionality between WeirdX and the native window system weirdx.display.copypaste=no #weirdx.display.keymap=gb #weirdx.display.keymap=de #weirdx.display.charset=JISX # xdmcp #weirdx.xdmcp.mode=query #weirdx.xdmcp.mode=boradcast #weirdx.xdmcp.mode=indirect #weirdx.xdmcp.address=XXX.XXX.XXX.XXX # rexec weirdx.xrexec=no #weirdx.xrexec=yes weirdx.extension=DummySHAPE # Gtk default theme: 0xc0c0c0, 0xd0d4d0 # Qt default theme: 0xe8e8e8 # WINGs: 0xa8a8a8 # fvwm: 0xc8b498, 0x686868, 0x908090 #weirdx.ddxwindow=com.jcraft.weirdx.DDXWindowImpSwingAlphaBackground #weirdx.display.background.alpha=0x00ff00:0x30, \ # 0x0000ff:0x20, \ # 0xc0c0c0:0x80, \ # 0xd0d4d0:0x80, \ # 0xe8e8e8:0x80, \ # 0xa8a8a8:0x80, \ # 0xc8b498:0x40, \ # 0x686868:0x40, \ # 0x908090:0x40, \ # 0:0 #weirdx.ddxwindow=com.jcraft.weirdx.DDXWindowImpSwingAlphaBackground2D #weirdx.display.background.alpha=32 #weirdx.sshrexec=yes #weirdx.jesd=yes #weirdx.jdxpc=yes #weirdx.jdxpcport=4000 weirdx-1.0.32/misc/weirdx-JRE12.html0000644000175000017500000000332407152751127015464 0ustar mjj29mjj29 WeirdX 1.0

WeirdX 1.0


</COMMENT> No JDK 1.2 support for APPLET!!
weirdx-1.0.32/misc/weirdx-Java2.bat0000644000175000017500000000036307063403044015437 0ustar mjj29mjj29@echo off rem set WEIRDX_HOME=\tmp\weirdx\misc if "%WEIRDX_HOME%" == "" set WEIRDX_HOME=. rem cd $WEIRDX_HOME @echo on java -classpath ".;%WEIRDX_HOME%\weirdx.jar" com.jcraft.weirdx.WeirdX @echo off rem cd .. goto done :done weirdx-1.0.32/misc/weirdx-Java20000755000175000017500000000032207063403221014665 0ustar mjj29mjj29#!/bin/sh if [ -z "$WEIRDX_HOME" ] ; then WEIRDX_HOME=`pwd` fi cd $WEIRDX_HOME CLASSPATH="${WEIRDX_HOME}":"${WEIRDX_HOME}"/weirdx.jar CMD="java -classpath ${CLASSPATH} com.jcraft.weirdx.WeirdX" ${CMD} weirdx-1.0.32/misc/xjs/0000755000175000017500000000000007221331166013307 5ustar mjj29mjj29weirdx-1.0.32/misc/xjs/weirdx-JRE12.html0000644000175000017500000000335107141774335016274 0ustar mjj29mjj29 WeirdX 1.0

WeirdX 1.0


</COMMENT> No JDK 1.2 support for APPLET!!
weirdx-1.0.32/misc/xjs/README0000644000175000017500000000402407142034333014165 0ustar mjj29mjj29 XJS Extension for WeirdX by Christian Werner http://home.t-online.de/home/Christian.Werner/xjs.htm Last modified: Wed Aug 2 23:44:42 JST 2000 # This document is written by ymnk, but # contents of this documents is just a quote from Christian Werner's web page # http://home.t-online.de/home/Christian.Werner/xjs.htm # Problems(typo, ambiguous descriptions,etc.) in this document belong with me. # Please don't make complaints to him. What about giving X client programs access to the JavaScript(tm) engine if they are executing in a Java(tm) applet in your Navigator or MSIE ??? Netscape invented the LiveConnect API for that purpose. By adding the XJS extension to WeirdX specialized X clients can evaluate JavaScript expressions or call JavaScript functions, eg to open another browser window or to popup a browser alert box. How to set it up ================ 1. Add the XJS extension to the applet parameters, eg 2. Give the applet the right to execute JavaScript code by adding MAYSCRIPT="true" to the applet/embed/object tags, eg ... #An example is available at 'misc/xjs/weirdx-JRE12.html' 3. Get the sources for the X extension and sample clients, compile it and try out the jeval sample program, eg you@yourbox $ jeval 'window.open("http://java.sun.com", "sun")' Notes: So far, I tested it on Windows with Navigator 4.7 and MSIE 5.0 and the X extension and clients on Linux 2.2.x (GLIBC). Unfortunately, the JDK 1.2 plugin executed in MSIE 5.0 does not support the LiveConnect. Sources for the X extension =========================== They are included at misc/xjs/xjs.tar.gz Licensing ========= GPL for the WeirdX parts, X Consortium license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.?<xweirdx-1.0.32/misc/weirdx.html0000644000175000017500000000125407162425026014700 0ustar mjj29mjj29 WeirdX 1.0

WeirdX 1.0



weirdx-1.0.32/misc/META-INF/0000755000175000017500000000000007221331166013643 5ustar mjj29mjj29weirdx-1.0.32/misc/META-INF/MANIFEST.MF0000644000175000017500000000015207162317262015300 0ustar mjj29mjj29Manifest-Version: 1.0 Main-Class: com.jcraft.weirdx.WeirdX Created-By: 1.2.2 (Sun Microsystems Inc.) weirdx-1.0.32/misc/twmrc0000644000175000017500000001474707162332253013601 0ustar mjj29mjj29############################################################################### # Author: Valentin Pavlov # Date: Thu, 14 Sep 2000 19:19:01 +0300 # # # This file controls behavior of twm window manager. Although twm is pretty old # it is stull usefull on slow remote display. Basicaly it is verry stupid one # but it has a powerful configuration options and can look pretty well # # Note: I created this rc for use with weirdx xserver which is a little buggy.. # so i put f.refresh in "move-to-raise" function which is save to remove # when twm is used with another xserver ############################################################################### # These parameters defines twm look # These control various workspace colors. Color { BorderColor "black" # BorderTileBackground "bisque" # BorderTileForeground "bisque" DefaultBackground "rgb:2/a/9" DefaultForeground "gray85" IconBackground "rgb:2/a/9" IconForeground "black" IconBorderColor "black" IconManagerBackground "rgb:2/a/9" IconManagerForeground "black" IconManagerHighlight "black" MenuBackground "rgb:2/a/9" MenuForeground "black" MenuShadowColor "black" MenuTitleBackground "black" MenuTitleForeground "white" TitleBackground "gray75" TitleForeground "black" } # Controls shape of cursor under various conditions. Cursors { Frame "top_left_arrow" Title "top_left_arrow" Icon "top_left_arrow" IconMgr "top_left_arrow" Move "fleur" Resize "sizing" Menu "sb_right_arrow" Button "hand1" Wait "watch" Select "dot" Destroy "pirate" } # Various font definitions #ResizeFont "-adobe-helvetica-bold-r-normal--*-120-*-*-*-*-*-*" IconFont "variable" IconManagerFont "variable" MenuFont "variable" TitleFont "variable" # Pixel width of border around windows. BorderWidth 1 # Sets space between title bar and application window. #FramePadding 2 # Size of border around desktop icons. #IconBorderWidth 0 # Desktop-style icons will be put in the following screen region. (we use IconManger instead) #IconRegion "72x600-0+0" NORTH EAST 72 72 # Initial location of Icon Manager, colums of icons. IconManagerGeometry "70-0+25" 1 # This makes sure child windows have a border and title bar. ##DecorateTransients # This makes title bars as wide as the window. (is this working?) ##DontSqueezeTitle # Don't create Icon Manager (stupid!) ##NoIconManagers # Keeps menus from having shadows behind them. (stupid!;) ##NoMenuShadows # This makes title bars short, like a tab on a file folder. (ugly!) ##SqueezeTitle ############################################################################### # These parameters controls twm and windows behaviour # Length of time to achieve a "double-click" for constained move. ConstrainedMoveTime 400 # Windows resize without having to drag pointer over their borders. AutoRelativeResize # This disallows moving windows off the visible screen. DontMoveOff # Set Named Windows Titles # Named Windows will have no title bar. NoTitle { "TWM Icon Manager" "xclock" } # Force named windows to have title bars. #MakeTitle {} # Windows are automatically placed; no need to drag out outline. RandomPlacement # Windows are not automatically brought to top when deinconified. ##NoRaiseonDeiconify # Windows are not automatically brought to top when moved. ##NoRaiseOnMove # Windows are not automatically brought to top when resized. ##NoRaiseOnResize # Windows are not automatically brought to top when cursor warps to them. ##NoRaiseOnWarp # Show windows contents while draggin' #OpaqueMove # Move cursor into windows when they're deiconified. WarpCursor ############################################################################## # Set IconManager behaviour # Display Icon Manager on startup. ShowIconManager # Sort icons in Icon Manager in alphabetical order. SortIconManager # Named windows will not be shown in Icon Manager IconManagerDontShow { "xclock" "Virtual Desktop" } # Named windows will _not_ go to icon manager, but will have desktop icons. #DontIconifyByUnmapping { "xclock" "Virtual Desktop" } # Makes applications use icons in Icons directive, instead of their own. #ForceIcons # Iconifying a window sends it to the Icon Manager IconifyByUnmapping # Named windows will be shown in Icon Manager #IconManagerShow # You can specify that certain apps have icons other than the default. #Icons {} # Named windows will start iconized. #StartIconified {} # Disable default titles and buttons .. so we should provide bindings - too pitty NoDefaults # Dont loose focus when mouse moves away from it (this is annoying) #NoTitleFocus # Makes an extra button on each title bar, that calls up menu below. LeftTitleButton "menu12" = f.menu "WindowOpsMenu" RightTitleButton "gray" = f.iconify RightTitleButton "dropbar8" = f.fullzoom RightTitleButton "dot" = f.delete # Clicking on the desktop brings up the system-wide menu. Function "move-or-raise" { f.move f.deltastop f.raise f.refresh } Button1 = : root : f.menu "DesktopMenuApps" Button2 = : root : f.exec "xrefresh" Button3 = : root : f.menu "DesktopMenuTools" Button1 = : title : f.function "move-or-raise" Button3 = : title : f.menu "WindowOpsMenu" Button1 = : iconmgr : f.iconify Button3 = : iconmgr : f.menu "WindowOpsMenu" ############################################################################## # Declare some usefull menus Menu "WindowOpsMenu" { "Iconify" f.iconify "Move .." f.move "Resize..." f.resize "Zoom" f.fullzoom "Refresh" f.winrefresh "" f.nop "Close" f.delete "Kill" f.destroy } Menu "DesktopMenuApps" { "Applications" f.title "SetBg" f.exec "xsetroot -solid 'rgb:2/a/9'" "Clock" f.exec "xclock -bg 'rgb:2/a/9' -fg black -digital -geometry '-0-0' -padding 0 &" "" f.nop "Xterm" f.exec "xterm -ls -bg black -fg gray85 &" "vi" f.exec "xterm -ls -bg black -fg gray85 -e vi &" "" f.nop "Restart" f.restart "Exit" f.quit } Menu "DesktopMenuTools" { "Tools" f.title "Iconify" f.iconify "Maximize" f.fullzoom "Move ..." f.move "Resize ..." f.resize "Refresh" f.winrefresh "" f.nop "Kill" f.destroy "Close" f.delete } # Sisnce twm cannot autostart applications I created this script. # It will set desktop foreground to default twm menu background color and # will start xcloc on bottom down corner of the screen. # --- cut here --- # !/bin/sh # echo Starting twm window manager ... # twm & # xsetroot -solid 'rgb:2/a/9' # xclock -bg 'rgb:2/a/9' -fg black -digital -geometry '-0-0' -padding 0 & # exec xterm # --- cut here --- weirdx-1.0.32/misc/keymap/0000700000175000017500000000000007221331166013757 5ustar mjj29mjj29weirdx-1.0.32/misc/keymap/genkeymap.pl0000755000175000017500000002466207165657607016345 0ustar mjj29mjj29#!/usr/bin/perl #/* genkeymap.pl -- Guess # * # * Copyright (C) 2000 Marcus Schiesser, ymnk # * # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License as published by # * the Free Software Foundation; either version 2 of the License, or # * (at your option) any later version. # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the implied warranty of # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # * GNU General Public License for more details. # * # * You should have received a copy of the GNU General Public License # * along with this program; if not, write to the Free Software # * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # */ #/* # * Authors: Marcus Schiesser, # * ymnk # * # * 01-Aug-2000: This file is written by Marcus Schiesser. # * 02-Aug-2000: ymnk modifies for supporting variable width keymap tables. # * 21-Sep-2000: ymnk modifies for generating java classes. # */ # # usage: xmodmap -pk -pm | ./genkeymap.pl -n name # use Getopt::Std; getopts("n:"); $name=$opt_n; if($#ARGV>-1){ open(STDIN, "<$ARGV[0]") or die "can't open: $!"; } if($name eq ""){ $name=$ARGV[0]; } if($name eq ""){ $name="tmp"; } while(<>){ if(/^There are (\d+) KeySyms per KeyCode; KeyCodes range from (\d+) to (\d+)/){ open(STDOUT, ">Keymap_$name.java") or die "can't open output: $!"; &printkeymap($name, $1, $2, $3); close(STDOUT); next; } if(/^xmodmap: up to (\d+) keys per modifier/){ open(STDOUT, ">Keymodifier_$name.java") or die "can't open output: $!"; &printkeymod($name, $1); close(STDOUT); next; } } #close(STDIN); #close(STDOUT); sub printkeymap{ local($name, $keysyms, $from, $to)=@_; &printheader; local($result)=&keymap($keysyms, $from, $to); print <){ last if(/Value/); } <>; while(<>){ chop; s/\t/ /g; @array=split(' '); $result .= " "; for($i=1; $i<$#array; $i+=2){ $result .= $array[$i]; if($array[0]!=$to || ($i+1)/2!=$keysyms){ $result .= ", "; } else{ $result .= " "; } } $i/=2; if($i<$keysyms){ for($j=0; $j<$keysyms-$i; $j++){ $result .= "0x0000"; if($array[0]!=$to || ($j+1)<$keysyms-$i){ $result .= ", "; } else{ $result .= " "; } } } $result .= " // ".$array[0]; for($i=2; $i<=$#array; $i+=2){ $result .= " ". $array[$i]; } $result .= "\n"; } return $result; } sub printkeymod{ local($name, $kpm)=@_; &printheader; local($result)=&keymod($kpm); print <; while(<>){ last if(/^$/); chop; s/\t/ /g; @array=split(' '); $result .= " "; for($i=2; $i<=$#array; $i+=2){ if($array[$i]=~/\((.+)\)/){ $result .= "$1"; if($array[0] ne "mod5" || ($i/2)<$kpm){ $result .= ", "; } else{ $result .= " "; } } } $i/=2; if($i<=$kpm){ for($j=0; $j<=$kpm-$i; $j++){ $result .= "0x00"; if($array[0] ne "mod5" || ($j+1)<=$kpm-$i){ $result .= ", "; } else{ $result .= " "; } } } $result .= (" // [".$array[0]."] "); for($i=1; $i<=$#array; $i+=2){ $result .= (" ". $array[$i]); } $result .= "\n"; } return $result; } sub printheader{ print < * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; import java.net.*; import java.io.*; public class MemorySocket extends Socket { private boolean server; private Connection connection; public MemorySocket(String address, int port) throws IOException{ // this constructor is called on client side server = false; // retrieve Connector Connector c = Connector.getport(port); // add Connection connection = c.addConnection(); // inform ServerSocket c.getServerThread().interrupt(); } public MemorySocket(Connection c){ server = true; connection = c; } public void close()throws IOException{ connection.close(); } public InputStream getInputStream(){ if(server) return connection.getServerInputStream(); else return connection.getClientInputStream(); } public OutputStream getOutputStream(){ if(server) return connection.getServerOutputStream(); else return connection.getClientOutputStream(); } } weirdx-1.0.32/misc/msockets/de/linuxtest/msockets/PipeBuffer.java0000644000175000017500000000346507213627701023520 0ustar mjj29mjj29/* MemorySockets * A library for thread communication behaving like ordinary Java sockets * * Copyright (C) 2000 by Marcus Schiesser * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; public class PipeBuffer { private int buffersize; private byte buffer[]; private int bytesinbuffer; private int writePos, readPos; public PipeBuffer(int size){ buffersize = size; buffer = new byte[size]; clear(); } /* precondition: not full */ public synchronized void write(byte b){ buffer[writePos++] = b; if (writePos >= buffersize) { writePos = 0; } bytesinbuffer++; } /* precondition: not empty */ public synchronized byte read(){ byte ret = buffer[readPos++]; if (readPos >= buffersize) { readPos = 0; } bytesinbuffer--; return ret; } public synchronized void clear(){ writePos = 0; readPos = 0; bytesinbuffer = 0; } public synchronized int available(){ return bytesinbuffer; } public synchronized boolean isFull(){ return bytesinbuffer==buffersize; } public synchronized boolean isEmpty(){ return bytesinbuffer==0; } } weirdx-1.0.32/misc/msockets/de/linuxtest/msockets/MemoryServerSocket.java0000644000175000017500000000275707213634664025312 0ustar mjj29mjj29/* MemorySockets * A library for thread communication behaving like ordinary Java sockets * * Copyright (C) 2000 by Marcus Schiesser * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; import java.net.*; public class MemoryServerSocket { // sorry not extended from ServerSocket as ServerSocket() is private private Connector connector; private int port; public MemoryServerSocket(int port){ this.port=port; connector = new Connector(Thread.currentThread(), port); } public Socket accept(){ connector.setThread(Thread.currentThread()); try{ while(true){ Thread.sleep(1000); } }catch(InterruptedException e){ } Connection c = connector.getLastConnection(); return (new MemorySocket(c)); } public void close(){ connector.delport(port); } } weirdx-1.0.32/misc/msockets/de/linuxtest/msockets/Connector.java0000644000175000017500000000373507213635013023416 0ustar mjj29mjj29/* MemorySockets * A library for thread communication behaving like ordinary Java sockets * * Copyright (C) 2000 by Marcus Schiesser * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; import java.io.*; class Connector { private Thread t; private Connection lastConnection; private int port; //private final static int PORTCOUNT = 10000; //static private Connector lookup[] = new Connector[PORTCOUNT]; static private java.util.Hashtable lookup = new java.util.Hashtable(); Connector(Thread t, int port){ this.t = t; this.port = port; //lookup[port] = this; Integer i=new Integer(port); synchronized(Connector.class){ if(lookup.get(i)==null){ lookup.put(i, this); } else{ } } } synchronized Connection addConnection() throws IOException { lastConnection = new Connection(); return lastConnection; } Connection getLastConnection(){ return lastConnection; } Thread getServerThread(){ return t; } static synchronized Connector getport(int port){ //return lookup[port]; return (Connector)(lookup.get(new Integer(port))); } static synchronized void delport(int port){ lookup.remove(new Integer(port)); } void setThread(Thread t){ this.t = t; } } weirdx-1.0.32/misc/msockets/de/linuxtest/msockets/Connection.java0000644000175000017500000000423607213572712023566 0ustar mjj29mjj29/* MemorySockets * A library for thread communication behaving like ordinary Java sockets * * Copyright (C) 2000 by Marcus Schiesser * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; import java.io.*; class Connection { private InputStream client_input; private OutputStream server_output; private InputStream server_input; private OutputStream client_output; Connection() throws IOException { /* FastPipedInputStream ci = new FastPipedInputStream(); FastPipedInputStream si = new FastPipedInputStream(); FastPipedOutputStream co = new FastPipedOutputStream(); FastPipedOutputStream so = new FastPipedOutputStream(); */ PipedInputStream ci = new PipedInputStream(); PipedInputStream si = new PipedInputStream(); PipedOutputStream co = new PipedOutputStream(); PipedOutputStream so = new PipedOutputStream(); ci.connect(so); si.connect(co); client_input = ci; client_output = co; server_input = si; server_output = so; } InputStream getClientInputStream(){ return client_input; } OutputStream getClientOutputStream(){ return client_output; } InputStream getServerInputStream(){ return server_input; } OutputStream getServerOutputStream(){ return server_output; } void close() throws IOException{ if(server_output!=null)server_output.close(); if(server_input!=null)server_input.close(); if(client_input!=null)client_input.close(); if(client_output!=null)client_output.close(); } } weirdx-1.0.32/misc/msockets/de/linuxtest/msockets/FastPipedInputStream.java0000644000175000017500000000466507213627666025561 0ustar mjj29mjj29/* MemorySockets * A library for thread communication behaving like ordinary Java sockets * * Copyright (C) 2000 by Marcus Schiesser * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; import java.io.*; public class FastPipedInputStream extends InputStream { private boolean closed; private boolean connected; private FastPipedOutputStream output; private static final int SIZE = 1024; private PipeBuffer buffer; public FastPipedInputStream() { buffer = new PipeBuffer(SIZE); connected = false; closed = true; } public void connect(FastPipedOutputStream out) throws IOException { out.connect(this); output = out; closed = false; connected = true; } public boolean isClosed(){ return closed; } public PipeBuffer getBuffer(){ return buffer; } public int read() throws IOException { if (!connected) { throw new IOException(); } else if (closed) { throw new IOException(); } while (buffer.isEmpty()) { if (output.isClosed()) { return -1; } try{ Thread.sleep(1); } catch( InterruptedException e){ } } return (buffer.read()&0xff); } public int read(byte b[], int off, int len) throws IOException { int offset = 1, c; if (len == 0) { return 0; } c = read(); if(c==-1) return -1; b[off] = (byte)c; while ((!buffer.isEmpty()) && (offset * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.linuxtest.msockets; import java.io.*; public class FastPipedOutputStream extends OutputStream { private boolean connected; private boolean closed; private FastPipedInputStream input; private PipeBuffer buffer; public FastPipedOutputStream() { connected = false; closed = true; } public void connect(FastPipedInputStream in) throws IOException { if(connected){ throw new IOException(); } input = in; buffer = input.getBuffer(); connected = true; closed = false; } public boolean isClosed(){ return closed; } public void write(int b) throws IOException { if (!connected){ throw new IOException(); } else if (closed || input.isClosed()) { throw new IOException(); } while(buffer.isFull()){ try{ Thread.sleep(1); } catch( InterruptedException e){ } } buffer.write((byte)(b&0xff)); } public void write(byte b[], int off, int len) throws IOException { while (len > 0) { write(b[off++]); len--; } } public void close() throws IOException { closed = true; } } weirdx-1.0.32/misc/msockets/jdxpc-0.0.6-msockets.patch0000644000175000017500000001337707221405473020767 0ustar mjj29mjj29diff -Naur jdxpc-0.0.6/com/jcraft/jdxpc/ClientChannel.java jdxpc-0.0.6-msockets/com/jcraft/jdxpc/ClientChannel.java --- jdxpc-0.0.6/com/jcraft/jdxpc/ClientChannel.java Tue Nov 14 09:01:39 2000 +++ jdxpc-0.0.6-msockets/com/jcraft/jdxpc/ClientChannel.java Sun Dec 24 14:35:46 2000 @@ -1307,7 +1307,10 @@ } void putByte(byte[] array, int begin, int length) { - try { clientOutput.write(array, begin, length); } + try { + clientOutput.write(array, begin, length); + clientOutput.flush(); + } catch (IOException e) { } } diff -Naur jdxpc-0.0.6/com/jcraft/jdxpc/MemorySocketServerProxy.java jdxpc-0.0.6-msockets/com/jcraft/jdxpc/MemorySocketServerProxy.java --- jdxpc-0.0.6/com/jcraft/jdxpc/MemorySocketServerProxy.java Thu Jan 1 00:00:00 1970 +++ jdxpc-0.0.6-msockets/com/jcraft/jdxpc/MemorySocketServerProxy.java Wed Dec 6 08:56:10 2000 @@ -0,0 +1,85 @@ +/* JDxpc -- DXPC in pure Java + * + * Copyright (C) 2000 ymnk, JCraft, Inc. + * + * Many thanks to + * Brian Pane and + * Zachary Vonler. + * JDxpc has been based on their awesome works, dxpc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +package com.jcraft.jdxpc; + +import java.io.*; +import java.net.*; +import java.lang.*; + +public class MemorySocketServerProxy extends Proxy{ + int serverPort=6000; + String serverHost="127.0.0.1"; + public MemorySocketServerProxy()throws IOException{ + super(); + } + public MemorySocketServerProxy(String host)throws IOException{ + super(host); + } + public MemorySocketServerProxy(int dxpcport)throws IOException{ + super(dxpcport); + } + public MemorySocketServerProxy (int xport, int dxpcport) throws IOException{ + super (dxpcport); + setServerPort (xport); + setServerHost ("localhost"); + } + MemorySocketServerProxy (Socket socket) throws IOException{ + super(socket); + } + Channel createChannel(){ + Class c=java.net.Socket.class; + try{ + c=Class.forName("de.linuxtest.memorysocket.Socket"); + } + catch(Exception e){}; + Channel foo=new ServerChannel(serverHost, serverPort, c); + foo.setProxy(this); + return foo; + } + public void setServerPort(int port){serverPort=port;} + public void setServerHost(String host){serverHost=host;} + public static void main(String[] arg){ + MemorySocketServerProxy sp; + try{ + if (arg.length == 2){ + //format: xport dxpcport + int xport = Integer.parseInt (arg[0]); + int dxpcport = Integer.parseInt (arg[1]); + sp = new MemorySocketServerProxy (xport, dxpcport); + } + else if (arg.length > 0){ + sp = new MemorySocketServerProxy (arg[0]); + } + else{ + sp = new MemorySocketServerProxy (); + } + } + catch (IOException e){ + System.err.println ("cannot connect"); + return; + } + sp.start (); + } +} diff -Naur jdxpc-0.0.6/com/jcraft/jdxpc/Proxy.java jdxpc-0.0.6-msockets/com/jcraft/jdxpc/Proxy.java --- jdxpc-0.0.6/com/jcraft/jdxpc/Proxy.java Tue Apr 4 10:09:36 2000 +++ jdxpc-0.0.6-msockets/com/jcraft/jdxpc/Proxy.java Sun Dec 24 14:37:08 2000 @@ -87,6 +87,7 @@ proxyIn=socket.getInputStream(); proxyOut=socket.getOutputStream(); proxyOut.write(incantation, 0, incantation.length); + proxyOut.flush(); } catch(Exception e){ } @@ -206,6 +207,7 @@ try { proxyOut.write(data, messageStart, messageLength); + proxyOut.flush(); } catch (IOException e) { //System.out.println("proxyputByte: "+e); } @@ -229,6 +231,7 @@ try { proxyOut.write(data, messageStart, messageLength); + proxyOut.flush(); } catch (IOException e) { //System.out.println("proxyputByte: "+e); } @@ -253,6 +256,7 @@ try { proxyOut.write(data, messageStart, messageLength); + proxyOut.flush(); } catch (IOException e) { //System.out.println("proxyputByte: "+e); } diff -Naur jdxpc-0.0.6/com/jcraft/jdxpc/ServerChannel.java jdxpc-0.0.6-msockets/com/jcraft/jdxpc/ServerChannel.java --- jdxpc-0.0.6/com/jcraft/jdxpc/ServerChannel.java Fri Jul 21 07:56:43 2000 +++ jdxpc-0.0.6-msockets/com/jcraft/jdxpc/ServerChannel.java Wed Dec 6 10:33:48 2000 @@ -85,6 +85,34 @@ requestData[2]=new int[1]; } + ServerChannel(String host, int port, Class c){ + try{ + java.lang.reflect.Constructor constructor; + Class[] params=new Class[2]; + params[0]=String.class; + params[1]=int.class; + constructor = c.getConstructor(params); + Object[] args=new Object[2]; + args[0]=host; + args[1]=new Integer(port); + Socket s=(Socket)(constructor.newInstance(args)); + setSocket(s); + } + catch(Exception e) { + System.out.println("Error : " + e ); + try{ + Socket s=new Socket(host, port); + setSocket(s); + } + catch(IOException ee) { + System.out.println("IOError : " + e ); + } + } + requestData[0]=new int[1]; + requestData[1]=new int[1]; + requestData[2]=new int[1]; + } + void setSocket(Socket s) { serverSocket=s; try { weirdx-1.0.32/misc/msockets/README0000644000175000017500000000214007404770202015211 0ustar mjj29mjj29 README of misc/msockets directory ==================================================================== Last modified: Wed Dec 12 06:51:09 UTC 2001 This directory contains 'de.linuxtest.msockets' package and a patch file for JDxpc. The 'de.linuxtest.msockets' package is a library for thread communication behaving like ordinary Java sockets. This package was written by Marcus Schiesser(info@linuxtest.de) and his motivation for hacking this work was to solve the problem that WeirdX and JDxpc applets could not work without digital signing. Thanks to this package, WeirdX and JDxpc can communicate without local TCP sockets, which are forbidden by JVM security system. ymnk wrote a patch 'jdxpc-0.0.6-msockets.patch' for JDxpc, but first patch is little bit ugly and ymnk has hesitated to apply it to formal tree. If you have comments/suggestions, please write ymnk@jcraft.com If you are interested in this hack, try apply above patche to jdxpc-0.0.6 and add following lines, weirdx.jdxpc=yes weirdx.jdxpc.socket=de.linuxtest.msockets.MemorySocket weirdx.displaysocket=de.linuxtest.msockets.MemoryServerSocket . weirdx-1.0.32/misc/weirdx-IE.html0000644000175000017500000000312707303216103015163 0ustar mjj29mjj29 WeirdX 1.0.26

WeirdX 1.0.26



WeirdX has been developed by JCraft,Inc. under GNU GPL.
weirdx-1.0.32/COPYING0000644000175000017500000004307107053224301012603 0ustar mjj29mjj29 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. weirdx-1.0.32/NEWS0000644000175000017500000000156707166644020012264 0ustar mjj29mjj29 NEWS for WeirdX ----------------------------------- --- 1.0.18 The 'indirect' mode in XDMCP has been supported. --- 1.0.13 A macintosh executable for WeirdX has been added. --- 1.0.12 Yet another hack for the alpha transparency has been added. --- 1.0.11 A hack for the alpha transparency has been added. --- 1.0.9 The 16bpp mode has been supported. --- 1.0.8 Multibyte characters have been supported. --- 1.0.7 U.K. keyboard has been supported. --- 1.0.6 Copy/paste operations between the native window system and WeirdX(CUT_BUFFER0) are enabled. --- 1.0.5 XDMCP is supported. --- 1.0.4 Three mouse button emulation is added. --- 1.0.3 From this release, we can use propotinal and scalable fonts on WeirdX. Try xclock -digital -fn -adobe-times-medium-i-normal--123-*-*-*-p-*-iso8859-1 --- 1.0.1 From this release, *.class files are included. weirdx-1.0.32/MIRRORS0000644000175000017500000000006707053224301012626 0ustar mjj29mjj29 WeirdX FTP Mirror Sites =======-===================== weirdx-1.0.32/ChangeLog0000644000175000017500000003044210037522041013316 0ustar mjj29mjj29 ChangeLog of WeirdX ==================================================================== Last modified: Thu Apr 15 08:27:09 UTC 2004 Changes since version 1.0.31: ............................ - added the secure X access support by using JSch. - fixed a crash bug in setting the title of window frame in RootlessWM mode. - fixed crash bugs in handling window properties. - fixed bugs in displaying Japanese characters on recent J2SE's VM. Changes since version 1.0.30: ............................ - modified to be free from 'misc/msocket/weirdx-*.*.*-msockets.patch' and deleted 'misc/msocket/weirdx-1.0.26-msockets.patch'. - fixed a problem in using CapsLock key pointed out by Hans Wolff. - fixed a crash bug in RootlessWM window mode pointed out by Roland Mainz(Roland.Mainz at informatik dot med dot uni-giessen dot de). Changes since version 1.0.29: ............................ - modified to merge patches from Steve Holland, who has developed WeirdMind. - added the interface com.jcraft.weirdx.DisplaySocket. Many thanks to Steve Holland. Above changes have not been done without him. - added ad-hock hacks for displaying box characters, which are assigned code from 0x0b to 0x19 in iso8859-1 character sets. - fixed a bug in changing window properties. - fixed incompleteness in copying GC(graphics context). - fixed bugs in getting/adding Selection. - fixed a bug in switching the input focus for key events, which were pointed out by Matt Ittigson. Changes since version 1.0.28: ............................ - improved to support the resize operations in 'RootlessWM' mode. - improved to support the close button on the title bar in 'RootlessWM' mode. In the previous version, the close button did not work for some X clients, which did not support 'WM_DELETE_WINDOW' protocol. - fixed a bug in typing '_' on MacOSX. This fixing was not done in the previous version crelessly. Changes since version 1.0.27: ............................ - renamed the window mode 'MultiWindow' as 'Rootless'. In this mode, you have to run an X window manager. - added the window mode 'RootlessWM'. In this mode, WeirdX will work as in the 'MultiWindow' mode of WeirdX 1.0.26; title bars will be attached to window frames. - improved to support the 'RootlessWM' mode. * The close button on the title bar will work correctly. * The name of window will be displayed on the title bar. * The tile bar will not be attached to pop-up menu and pop-up window. * The input focus will be handled. - modified the root window to be invisible in the 'Rootless' and 'RootlessWM' mode. - fixed a bug in typing '_' on MacOSX. Changes since version 1.0.26: ............................ - fixed a bug in processing the 'ImageText8' request, which was reported by Shin-ichi MORITA(s-morita at beingcorp dot co dot jp). - added README.XDMCP written by Valentin Pavlov(v_valchev at prosyst dot bg). - improved the multi-window mode support. If a window manager is running in multi-window mode, title bars will not be attached to window frames by the native window system. By this improvement, some weird behaviors of previous versions in multi-window mode will be worked around. Anyway, for enjoying this hack, exec WeirdX in multi-window mode and run a x window manager;twm, wmaker, sawfish, etc. then x clients. Changes since version 1.0.25: ............................ - fixed bugs in processing the 'CopyArea' request. For example, this fixing will fix weird behaviors on 'gnome-help-browser', 'kdehelp'. - added the support for the 'jp106' keyborad. - added a WindowAdapter to shutdown WeirdX by pressing a close button, which is attached to WeirdX's root-window by the native window system. - added the experimental close button support in the multi-window mode. Changes since version 1.0.24: ............................ - fixed bugs in searching scalable fonts. Now, by this fixing, 'kpanel' will work on WeirdX. Try 'startkde'! - modified some code related to the XDMCP support for running WeirdX on the built-in JVM of IE Changes since version 1.0.23: ............................ - fixed bugs in communications between WeirdX and X clients. WeirdX is a multi-threaded X server and, in the current implementation, each one of X clients accepts events and replies from several threads. Until this fixing, any exclusive lock had not been cared in the communications. By this bug fix, the frequency of random freezes has been decreased. - fixed a bug in precessing the ListProperties request. The error recovery code had been missing. Changes since version 1.0.22: ............................ - fixed a bug, which was sneaked into GetImage request handling code since version 1.0.15. For example, 'gimp' has not been able to handle font glyph correctly. - added some XLFDs for proportional fonts, which make you happy in using 'gimp'. - added 'MemorySocket' hack, which solves the problem in using WeirdX and JDxpc applets. This hack is contributed from Marcus Schiesser. Check 'misc/msockets' directory Changes since version 1.0.21: ............................ - reviced the drawing operations, drawing of thick lines (linewidth > 1) and thick rectangles. This hack was done by Christian Werner - added the friendly interface for invoking JDxpc. JDxpc 0.0.6 or higher is requried. This hack was done by Marcus Schiesser. - fixed bugs in invoking EnterNotifcation/LeaveNotication events. They had caused weird behaviors on Tk widgets. Changes since version 1.0.20: ............................ - added the support for the dxpc(Differential X Protocol Compressor), which is an X protocol compressor designed to improve the speed of X applications run over low-bandwidth links. This functionality depends on JDxpc, which is a re-implementation of dxpc in pure Java. - fixed a bug in replying to the GetAtomName request. This bug had prevented WeirdX working with dxpc. Many thanks to Marcus Schiesser, who reported this glitch. - fixed bugs in processing the 'ClearArea' request. Some X apps depend on this request in rendering pixmaps. For example, WindowMaker uses this request in rendering backgrounds of title-bars and menus. Changes since version 1.0.19: ............................ - added the support for 'fontspecific' fonts. Try, xfd -fn -adobe-symbol-medium-r-normal--16-0-0-0-p-0-adobe-fontspecific Some X apps(for example, Lyx) rely on those fonts. - fixed a bug in putting the bitmap(depth-1 pixmap) on the depth-16 pixmap. Changes since version 1.0.18: ............................ - modified to use the 'java.awt.FontMetric.charsWidth' method instead of the 'java.awt.FontMetric.bytesWidth' method for running WeirdX on MacOS X. - added the property 'weirdx.display.copypaste' for enabling/disabling the copy/paste functionality. At present, Java2 on MacOS X does not support the clipboard mechanism and the copy/paste functionality does not work. Many thanks to Kevin Hendricks(khendricks at ivey dot uwo dot ca). Above hacks have been based on his reports. - added the 'indirect' mode in XDMCP. By this hack, the 'chooser' will be available on WeirdX. Changes since version 1.0.17: ............................ - fixed a glitch, 'top most part of the window is covered by the titlebar'. - fixed a bug in displaying Korean and Chinese characters. - fixed a critical bug in the multi-window mode. This bug had crashed X clients in processing the 'ReparentWindow' request. Changes since version 1.0.16: ............................ - added an authorization support defined in XDMCP. By this hack, 'gdm' will run on WeirdX. - fixed a bug in keymap setting reported by . - added 'misc/twmrc' from Valentin Pavlov. He says, 'I created this rc for use with weirdx xserver which is a little buggy.. so i put f.refresh in "move-to-raise" function which is save to remove when twm is used with another xserver.' - changed starting up procedures according to Valentin Pavlov's advice. You can start up weirdx very simply; 'java -jar weirdx.jar' - added a perl script 'misc/keymap/genkeymap.pl', which generates java files for supporting unsupported keyboards. This script is based on Marcus Schiesser's script. Changes since version 1.0.15: ............................ - improved to be free from the Swing API. - fixed a bug in displaying Latin characters. Try 'xfd -fn fixed'. - improved to detect the ALT_GRAPH key typing. - added classes for German keyboard keymaping. Try to set a property 'weirdx.display.keymap' as 'de'. The above works were mostly done by Marcus Schiesser and the rest were not done without his cooperations. Changes since version 1.0.14: ............................ - added the XJS extension for WeirdX. This extension is written by Christian Werner and enable you to use the JavaScriptTM engine from X clients. - fixed a bug in handling a GetImage request. - fixed a glitch in copy&paste operations from native window system to WeirdX. The buffer size had been too small. Changes since version 1.0.13: ............................ - added the EsounD support. - fixed memory leaks in handling AWT Font objects. - fixed some minor bugs. Changes since version 1.0.12: ............................ - added a macintosh executable for WeirdX. Many thanks to Ben Mesander(bam at dimensional dot com). - fixed a slight hack for the alpha transparency, in which alpha channel values are variable according to the background pixel value. Changes since version 1.0.11: ............................ - added a script for NetWare users. Many thanks to Patrick Medhurst(patrickm at digitalme dot com). - fixed a memory leak in the previous hack for the alpha transparency. - added yet another hack for the alpha transparency. Changes since version 1.0.10: ............................ - fixed a bug, which had caused NPE. Many thanks to Jeremy Manson. - fixed bugs in the 16bpp visual support. - added a hack for the alpha transparency. Changes since version 1.0.9: ............................ - fixed bugs which sneaked into the previous release in adding the 16bpp support. Changes since version 1.0.8: ............................ - added a support for 16bpp mode. Changes since version 1.0.7: ............................ - fixed a glitch in a keymap table for the U.K. keyboard(the IBM 166 layout). - added a support for displaying multibyte characters; Japanese(JISX0208), Korean(KSC5601) and Chinese(GB2312) characters. Changes since version 1.0.6: ............................ - fixed a glitch in handling ModifierKeys(Ctrl,Alt, etc.) for x clients on big endian machines(for example, Solaris/Sparc). - added a support for the U.K. keyboard(the IBM 166 layout). Many thanks to Darren Howe(dhowe at armature dot com). Above improvements depend on his valuable feedbacks. Changes since version 1.0.5: ............................ - added copy/paste functionality between the native window system and WeirdX(CUT_BUFFER0). For example, you can copy/paste strings on 'xterm' to 'notepad' on Windows98. Changes since version 1.0.4: ............................ - added the XDMCP support. This functionality can be used as a stand alone program. - fixed an inconsistency between source codes and docs about property settings(weirdx.xrexec). Changes since version 1.0.3: ............................ - added the three button mouse emulation. Try 'xev' or copy&paste on xterms. - changed configuration files to enable the three button mouse emulation in default setting. Changes since version 1.0.2: ............................ - added the proportional/scalable font support. TrueType fonts will be used if your JVM supports them. For example, try 'xfontsel' or 'xclock -digital -fn -adobe-times-medium-i-normal--123-*-*-*-p-*-iso8859-1' Changes since version 1.0.1: ............................ - fixed a glitch in switching keyboard input focus. For example, xterm had not received any keyboard event if a window manager had not been running. - 'misc/weirdx.jar' has not been updated in previous release. Changes since version 1.0.0: ............................ - fixed a glitch in handling the 'CopyArea' request. For example, this glitch had arisen in using full screen editors on xterm. - *.class files are included. weirdx-1.0.32/com/0000751000175000017500000000000007053224301012315 5ustar mjj29mjj29weirdx-1.0.32/com/jcraft/0000751000175000017500000000000007204205152013567 5ustar mjj29mjj29weirdx-1.0.32/com/jcraft/weirdx/0000751000175000017500000000000010751060545015077 5ustar mjj29mjj29weirdx-1.0.32/com/jcraft/weirdx/Acl.java0000644000175000017500000001216410037060016016437 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Access Control based on hostnames/ip-addresses. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.net.*; final class Acl { private static int mode=0; private static int count=0; private static int[] hosts; static{ hosts=new int[3]; for(int i=0; i>24)&0xff); io.writeByte((byte)((foo&0xff0000)>>16)&0xff); io.writeByte((byte)((foo&0xff00)>>8)&0xff); io.writeByte((byte)(foo&0xff)); } io.flush(); } } } } weirdx-1.0.32/com/jcraft/weirdx/Atom.java0000644000175000017500000001265110035636026016651 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - managing atoms. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.util.*; final class Atom { private static int lastAtom=0; private static String[] idTable={ null, "PRIMARY", "SECONDARY", "ARC", "ATOM", "BITMAP", "CARDINAL", "COLORMAP", "CURSOR", "CUT_BUFFER0", "CUT_BUFFER1", "CUT_BUFFER2", "CUT_BUFFER3", "CUT_BUFFER4", "CUT_BUFFER5", "CUT_BUFFER6", "CUT_BUFFER7", "DRAWABLE", "FONT", "INTEGER", "PIXMAP", "POINT", "RECTANGLE", "RESOURCE_MANAGER", "RGB_COLOR_MAP", "RGB_BEST_MAP", "RGB_BLUE_MAP", "RGB_DEFAULT_MAP", "RGB_GRAY_MAP", "RGB_GREEN_MAP", "RGB_RED_MAP", "STRING", "VISUALID", "WINDOW", "WM_COMMAND", "WM_HINTS", "WM_CLIENT_MACHINE", "WM_ICON_NAME", "WM_ICON_SIZE", "WM_NAME", "WM_NORMAL_HINTS", "WM_SIZE_HINTS", "WM_ZOOM_HINTS", "MIN_SPACE", "NORM_SPACE", "MAX_SPACE", "END_SPACE", "SUPERSC.LPT_X", "SUPERSC.LPT_Y", "SUBSC.LPT_X", "SUBSC.LPT_Y", "UNDERLINE_POSITION", "UNDERLINE_THICKNESS", "STRIKEOUT_ASCENT", "STRIKEOUT_DESCENT", "ITALIC_ANGLE", "X_HEIGHT", "QUAD_WIDTH", "WEIGHT", "POINT_SIZE", "RESOLUTION", "COPYRIGHT", "NOTICE", "FONT_NAME", "FAMILY_NAME", "FULL_NAME", "CAP_HEIGHT", "WM_CLASS", "WM_TRANSIENT_FOR" }; private static final int lastPredefined=idTable.length-1; static{ String[] foo=new String[100]; System.arraycopy(idTable, 0, foo, 0, idTable.length); lastAtom=idTable.length-1; idTable=foo; } private static final Hashtable nameTable=nameTablePredefined(); private static Hashtable nameTablePredefined(){ Hashtable hash=new Hashtable(); for (int i=1;; i++){ if(idTable[i]!=null) hash.put(idTable[i], new Integer(i)); else break; } return hash; } static int make(byte[] name, int start, int length, boolean makeit){ return make(new String(name, start, length), makeit); } static int make(byte[] name, boolean makeit){ return make(new String(name), makeit); } static synchronized int make(String name, boolean makeit){ int id; if((id=find(name))!=0) return id; if(!makeit) return 0; lastAtom++; //System.out.println("length="+idTable.length+", lastAtom="+lastAtom); if(idTable.length<=lastAtom){ String foo[]; foo=new String[idTable.length*2]; System.arraycopy(idTable, 0, foo, 0, idTable.length); idTable=foo; } idTable[lastAtom]=name; nameTable.put(name, new Integer(lastAtom)); return lastAtom; } static boolean valid(int id){ return id!=0 && id <=lastAtom; } static String find(int id) { if (id==0) return null; if (id<=lastAtom) return idTable[id]; return null; } static int find(String name) { if (name==null) return 0; try{ Integer i=(Integer)nameTable.get(name); return i.intValue(); } catch(Exception e){ } return 0; } static int find(byte[] name) { if (name==null) return 0; try{ Integer i=(Integer)nameTable.get(new String(name)); return i.intValue(); } catch(Exception e){ } return 0; } static void reqInternAtom(Client c) throws IOException{ int foo; int atom; int exp; int n=0; IO io=c.client; exp=c.data; n=io.readShort(); io.readPad(2); c.length-=2; if(n<=0){ c.errorReason=11; // BadAlloc return; } byte[] bb=c.bbuffer; io.readByte(bb, 0, n); io.readPad((-n) & 3); c.length=0; int atm=Atom.make(bb, 0, n, exp==0); synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(0); io.writeInt(atm); io.writePad(20); io.flush(); } } static void reqGetAtomName(Client c) throws IOException{ int foo; int atom; int n; IO io=c.client; atom=io.readInt(); if(atom<0){ atom&=0x7fffffff;} if(!valid(atom)){ // Error synchronized(io){ io.writeByte(0); io.writeByte(5); io.writeShort(c.seq); io.writeInt(atom); io.writeShort(0); io.writeByte(17); io.writePad(21); io.flush(); } } else{ String s=find(atom); synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(((s.length()+3)/4)); io.writeShort(s.length()); io.writePad(22); io.writeByte(s.getBytes()); if(s.length()>0) io.writePad((-s.length())&3); io.flush(); } } } } weirdx-1.0.32/com/jcraft/weirdx/Client.java0000644000175000017500000005301510035636034017165 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - dispatching requests * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.net.*; import java.io.*; import java.util.*; import java.awt.*; final class Client extends Thread { static Object LOCK=Client.class; private static final Object GrabServerLOCK=new Object(); // BITSFORRESOURCES+BITSFORCLIENTS must be 29.... static final int BITSFORRESOURCES=22; static final int BITSFORCLIENTS=7; static final int MAXCLIENTS=(1<0){ client.readByte(bbuffer, 0, name); client.readPad((-name)&3); } if(data>0){ client.readByte(bbuffer, 0, data); client.readPad((-data)&3); } } private final void init() throws java.io.IOException{ prolog(); writeByte(client); seq=0; } private static final void reqGrabServer(Client c) throws IOException{ synchronized(LOCK){ for(int i=1; i> Client.CLIENTOFFSET)]; } } weirdx-1.0.32/com/jcraft/weirdx/Clip.java0000644000175000017500000000163510035636061016637 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - the interface for ClipPixmap and ClipRectangles classes. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; interface Clip{ Object getMask(); } weirdx-1.0.32/com/jcraft/weirdx/ClipPixmap.java0000644000175000017500000000175110035636067020023 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; final class ClipPixmap implements Clip{ Pixmap pixmap; ClipPixmap(Pixmap p){ super(); pixmap=p; } public Object getMask(){ return pixmap; } } weirdx-1.0.32/com/jcraft/weirdx/ClipRectangles.java0000644000175000017500000000365710035636075020662 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; final class ClipRectangles implements Clip{ private static final int Unsorted=0; private static final int YSorted=1; private static final int YXSorted=2; private static final int YXBanded=3; int ordering; java.awt.Rectangle[] masks=null; java.awt.Rectangle mask=null; ClipRectangles(int ordering, int size){ this.ordering=ordering; if(size>0){ masks=new java.awt.Rectangle[size]; } } void add(int x, int y, int w, int h){ int i=0; while(i0){ masks=new java.awt.Rectangle[size]; } // else masks=null; // } boolean validate(){ return true; } public Object getMask(){ return mask; } } weirdx-1.0.32/com/jcraft/weirdx/Colormap.java0000644000175000017500000016405010035636104017523 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.util.*; import java.awt.*; import java.awt.image.*; class Colormap extends Resource{ static private final int REDMAP=0; static private final int GREENMAP=1; static private final int BLUEMAP=2; static private final int PSEUDOMAP=3; static private final int AllocPrivate=-1; static private final int AllocTemporary=-2; static private final int DynamicClass=1; static private final int AllocNone=0; static private final int AllocAll=1; static private final int IsDefault=1; static private final int AllAllocated=2; static private final int BeingCreated=4; static private final int StaticGray=0; static private final int GrayScale=1; static private final int StaticColor=2; static private final int PseudoColor=3; static private final int TrueColor=4; static private final int DirectColor=5; static private final int DoRed=(1<<0); static private final int DoGreen=(1<<1); static private final int DoBlue=(1<<2); static IndexColorModel bwicm=null; static{ byte[] foo={(byte)0, (byte)0xff}; bwicm=new IndexColorModel(1, 2, foo, foo, foo); } Color[] colors; byte[] r, g, b; ColorModel cm; long icmtime; Visual visual; Screen screen; int[][] pixels; int freeRed; Entry[] entries; int flags; static Colormap[] installed=null; static Colormap defaultColormap=null; Colormap(int id, Screen s, Visual v, int alloc, Client client) { super(id, RT_COLORMAP); add(this); this.screen=s; this.visual=v; if(v.depth.depth==16) return; int n=v.getColormapEntries(); r=new byte[n]; g=new byte[n]; b=new byte[n]; for(int i=0; i< n; i++){ r[i]=(byte)255; g[i]=(byte)255; b[i]=(byte)255; } colors=new Color[n]; pixels=new int[Client.MAXCLIENTS][]; entries=new Entry[n]; for(int i=0; i < entries.length; i++){ entries[i]=new LocalEntry(); } freeRed=n; flags=0; if(id==screen.defaultColormapId){ flags|=IsDefault; } if(alloc==AllocAll){ if ((visual.clss & DynamicClass)!=0){ flags |=AllAllocated; } for (int i=0; i> 16) & 0xff); byte green=(byte)((rgb >> 8) & 0xff); byte blue =(byte)((rgb ) & 0xff); for(int i=0; i>8)&0xff)!=0 || ((green>>8)&0xff)!=0 || ((blue>>8)&0xff)!=0){ red=(red>>8)&0xff; green=(green>>8)&0xff; blue=(blue>>8)&0xff; } else{ red=red&0xff; green=green&0xff; blue=blue&0xff; } int pixel=cmap.allocColor(c, red, green, blue); if(c.errorReason!=0){ return; } if(cmap.visual.depth.depth!=16){ LocalEntry ent=(LocalEntry)cmap.entries[pixel]; red=ent.r; green=ent.g; blue=ent.b; if(ent.refcnt==1){ cmap.mkIcm(); } } synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(0); io.writeShort(red|(red<<8)); io.writeShort(green|(green<<8)); io.writeShort(blue|(blue<<8)); io.writePad(2); io.writeInt(pixel); io.writePad(12); io.flush(); } } static void reqQueryColors(Client c) throws IOException{ int n; int foo; int len; IO io=c.client; n=c.length; foo=io.readInt(); Colormap cmap=(Colormap)Resource.lookupIDByType(foo, Resource.RT_COLORMAP); c.length-=2; if(cmap==null){ c.errorValue=foo; c.errorReason=12; // Colormap return; } n=n-2; int[] nn=new int[n]; for(int i=0;i dplanes){ client.errorReason=11; // BadAlloc return false; } for(mask=(1 << planes) - 1, base=1, dplanes -=(planes - 1); --dplanes >=0; mask +=mask, base +=base){ int ppixi=0; ppix=pixels; found=0; pixel=0; int entcount=visual.colormapEntries - mask; while (pixel < entcount) { save=pixel; maxp=pixel + mask + base; while (pixel !=maxp && entries[pixel].refcnt==0){ pixel +=base; } if (pixel==maxp) { ppix[ppixi]=save; ppixi++; found++; if (found==count) { while (--count >=0) { pixel=pixels[count]; maxp=pixel + mask; while (true) { chkLocalEntry(pixel); entries[pixel].refcnt=AllocPrivate; entries[pixel].shared=false; if (pixel==maxp){ break; } pixel +=base; ppix[ppixi]=pixel; ppixi++; } } pmask[0]=mask; return true; } } pixel=save + 1; if ((pixel & mask)!=0) pixel +=mask; } } dplanes=visual.nplanes; if (contig || planes==1 || dplanes < 3){ return false; } finalmask= (((1<<(planes-1)) - 1) << (dplanes-planes+1)) + (1<<(dplanes-planes-1)); for (mask=(3 << (planes -1)) - 1; mask <=finalmask; mask++) { pixel=(mask >> 1) & 033333333333; pixel=mask - pixel - ((pixel >> 1) & 033333333333); if ((((pixel + (pixel >> 3)) & 030707070707) % 077) !=planes) continue; ppix=pixels; int ppixi=0; found=0; int entcount=visual.colormapEntries - mask; base=lowbit (mask); for (pixel=0; pixel < entcount; pixel++) { if ((pixel & mask)!=0) continue; maxp=0; while (entries[pixel + maxp].refcnt==0) { if(maxp==mask){ break; } maxp +=base; while((maxp & ~mask)!=0){ maxp +=(maxp & ~mask); } } if ((maxp < mask) || (entries[pixel + mask].refcnt !=0)){ continue; } ppix[ppixi]=pixel; ppixi++; found++; if (found < count){ continue; } while (--count >=0) { pixel=(pixels)[count]; maxp=0; while (true) { chkLocalEntry(pixel+maxp); entries[pixel + maxp].refcnt=AllocPrivate; entries[pixel + maxp].shared=false; if(maxp==mask){ break; } maxp +=base; while((maxp & ~mask)!=0){ maxp +=(maxp & ~mask); } ppix[ppixi]=pixel + maxp; ppixi++; } } pmask[0]=mask; return true; } } return false; } private void freeColors (Client c, int rest, int mask) throws IOException{ IO io=c.client; if ((flags & AllAllocated)!=0){ c.errorReason=10; // BadAccess return; } if(rest==0){ return; } int[] foo=new int[rest]; for(int i=0; i> offset; if ((pixTest >=numents) || (pixIn[i] & rgbbad)!=0) { client.errorValue=pixIn[i] | bits; errVal=2; //BadValue; continue; } if(pixClient==null){ errVal=10; //BadAccess } else{ int j=0; for (;j>8)&0xff)!=0 || ((green>>8)&0xff)!=0 || ((blue>>8)&0xff)!=0){ red=(red>>8)&0xff; green=(green>>8)&0xff; blue=(blue>>8)&0xff; } else{ red=red&0xff; green=green&0xff; blue=blue&0xff; } errVal=storeColor(c, pixel, red, green, blue, doc); } c.errorReason=errVal; return; } private int storeColor(Client c, int pixel, int red, int green, int blue, int doc) throws IOException{ int errVal=0; if((visual.clss | DynamicClass)==DirectColor) { } else { boolean ok=true; if (pixel >=visual.colormapEntries) { c.errorValue=pixel; errVal=2; //BadValue; ok=false; } else if (entries[pixel].refcnt !=AllocPrivate) { errVal=11; //BadAccess; ok=false; } if(ok) { } else{ return errVal; } Entry pent=entries[pixel]; if((doc & DoRed)!=0) { if(pent.shared){ } else{ ((LocalEntry)pent).r=red; } } else { if(pent.shared){ } else{ red=((LocalEntry)pent).r; } } if((doc & DoGreen)!=0){ if(pent.shared){ } else{ ((LocalEntry)pent).g=green; } } else { if(pent.shared){ } else{ green=((LocalEntry)pent).g; } } if((doc & DoBlue)!=0){ if(pent.shared){ } else{ ((LocalEntry)pent).b=blue; } } else { if(pent.shared){ } else{ blue=((LocalEntry)pent).b; } } alloc(pixel, new Color(red, green, blue)); } return errVal; } private void queryColors (Client c, int[] ppixel) throws IOException{ IO io=c.client; if ((visual.clss & DynamicClass) == 0 && visual.depth.depth==16){ int n=ppixel.length; synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(n*2); io.writeShort(n); io.writePad(22); int ii, foo; for(int i=0;i>11)&0x1f)*8; io.writeShort(foo|(foo<<8)); foo=((ii>>5)&0x3f)*4; io.writeShort(foo|(foo<<8)); foo=(ii&0x1f)*8; io.writeShort(foo|(foo<<8)); io.writePad(2); } io.flush(); return; } } if ((visual.clss | DynamicClass)==DirectColor) { } else { for(int i=0; i=visual.colormapEntries){ c.errorValue=ppixel[i]; c.errorReason=2; //BadValue; return; } } synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(ppixel.length*2); io.writeShort(ppixel.length); io.writePad(22); for(int i=0; i>=1; } return result; } private int[] expand(int[] foo, int i){ int[] bar=new int[i+((foo==null) ? 0 : foo.length)]; if(foo!=null){ System.arraycopy(foo, 0, bar, 0, foo.length); } return bar; } void mkIcm(){ if ((visual.clss & DynamicClass)!=0 || (flags & BeingCreated)!=0){ if(visual.depth.depth==16) return; cm=new IndexColorModel((r.length==256 ? 8 : 1), r.length, r, g, b); } icmtime=System.currentTimeMillis(); } } class Entry{ boolean shared; int refcnt; Entry(){ refcnt=0; } boolean eq(int r, int g, int b){ return true; } void copy(Entry ent){ shared=ent.shared; refcnt=ent.refcnt; if((this instanceof LocalEntry) && (ent instanceof LocalEntry)){ ((LocalEntry)this).r=((LocalEntry)ent).r; ((LocalEntry)this).g=((LocalEntry)ent).g; ((LocalEntry)this).b=((LocalEntry)ent).b; } } public String toString(){ return "Entry: refcnt="+refcnt+", shared="+shared ; } } class LocalEntry extends Entry{ int r; int g; int b; LocalEntry(){ shared=false; } boolean eq(int r, int g, int b){ return this.r==r && this.g==g && this.b==b; } } class SharedEntry extends Entry{ SharedColor r, g, b; SharedEntry(){ shared=true; } boolean eq(int r, int g, int b){ return this.r.color==r && this.g.color==g && this.b.color==b; } } class SharedColor { int color; } class ClientColormap extends Resource{ int mapid; int client; ClientColormap(int id, int client, int mapid){ super(id, Resource.RT_CMAPENTRY); this.client=client; this.mapid=mapid; } void delete() throws IOException{ Colormap cmap=(Colormap)Resource.lookupIDByType(mapid, Resource.RT_COLORMAP); if(cmap!=null){cmap.freePixels(client);} } } class RGBTXT{ static String rgbtxt=null; private static String []_rgbtxt={ "255 250 250 snow\n", "248 248 255 GhostWhite\n", "245 245 245 WhiteSmoke\n", "220 220 220 gainsboro\n", "255 250 240 FloralWhite\n", "253 245 230 OldLace\n", "250 240 230 linen\n", "250 235 215 AntiqueWhite\n", "255 239 213 PapayaWhip\n", "255 235 205 BlanchedAlmond\n", "255 228 196 bisque\n", "255 218 185 PeachPuff\n", "255 222 173 NavajoWhite\n", "255 228 181 moccasin\n", "255 248 220 cornsilk\n", "255 255 240 ivory\n", "255 250 205 LemonChiffon\n", "255 245 238 seashell\n", "240 255 240 honeydew\n", "245 255 250 MintCream\n", "240 255 255 azure\n", "240 248 255 AliceBlue\n", "230 230 250 lavender\n", "255 240 245 LavenderBlush\n", "255 228 225 MistyRose\n", "255 255 255 white\n", " 0 0 0 black\n", " 47 79 79 DarkSlateGray\n", " 47 79 79 DarkSlateGrey\n", "105 105 105 DimGray\n", "105 105 105 DimGrey\n", "112 128 144 SlateGray\n", "112 128 144 SlateGrey\n", "119 136 153 LightSlateGray\n", "119 136 153 LightSlateGrey\n", "190 190 190 gray\n", "190 190 190 grey\n", "211 211 211 LightGrey\n", "211 211 211 LightGray\n", " 25 25 112 MidnightBlue\n", " 0 0 128 navy\n", " 0 0 128 NavyBlue\n", "100 149 237 CornflowerBlue\n", " 72 61 139 DarkSlateBlue\n", "106 90 205 SlateBlue\n", "123 104 238 MediumSlateBlue\n", "132 112 255 LightSlateBlue\n", " 0 0 205 MediumBlue\n", " 65 105 225 RoyalBlue\n", " 0 0 255 blue\n", " 30 144 255 DodgerBlue\n", " 0 191 255 DeepSkyBlue\n", "135 206 235 SkyBlue\n", "135 206 250 LightSkyBlue\n", " 70 130 180 SteelBlue\n", "176 196 222 LightSteelBlue\n", "173 216 230 LightBlue\n", "176 224 230 PowderBlue\n", "175 238 238 PaleTurquoise\n", " 0 206 209 DarkTurquoise\n", " 72 209 204 MediumTurquoise\n", " 64 224 208 turquoise\n", " 0 255 255 cyan\n", "224 255 255 LightCyan\n", " 95 158 160 CadetBlue\n", "102 205 170 MediumAquamarine\n", "127 255 212 aquamarine\n", " 0 100 0 DarkGreen\n", " 85 107 47 DarkOliveGreen\n", "143 188 143 DarkSeaGreen\n", " 46 139 87 SeaGreen\n", " 60 179 113 MediumSeaGreen\n", " 32 178 170 LightSeaGreen\n", "152 251 152 PaleGreen\n", " 0 255 127 SpringGreen\n", "124 252 0 LawnGreen\n", " 0 255 0 green\n", "127 255 0 chartreuse\n", " 0 250 154 MediumSpringGreen\n", "173 255 47 GreenYellow\n", " 50 205 50 LimeGreen\n", "154 205 50 YellowGreen\n", " 34 139 34 ForestGreen\n", "107 142 35 OliveDrab\n", "189 183 107 DarkKhaki\n", "240 230 140 khaki\n", "238 232 170 PaleGoldenrod\n", "250 250 210 LightGoldenrodYellow\n", "255 255 224 LightYellow\n", "255 255 0 yellow\n", "255 215 0 gold\n", "238 221 130 LightGoldenrod\n", "218 165 32 goldenrod\n", "184 134 11 DarkGoldenrod\n", "188 143 143 RosyBrown\n", "205 92 92 IndianRed\n", "139 69 19 SaddleBrown\n", "160 82 45 sienna\n", "205 133 63 peru\n", "222 184 135 burlywood\n", "245 245 220 beige\n", "245 222 179 wheat\n", "244 164 96 SandyBrown\n", "210 180 140 tan\n", "210 105 30 chocolate\n", "178 34 34 firebrick\n", "165 42 42 brown\n", "233 150 122 DarkSalmon\n", "250 128 114 salmon\n", "255 160 122 LightSalmon\n", "255 165 0 orange\n", "255 140 0 DarkOrange\n", "255 127 80 coral\n", "240 128 128 LightCoral\n", "255 99 71 tomato\n", "255 69 0 OrangeRed\n", "255 0 0 red\n", "255 105 180 HotPink\n", "255 20 147 DeepPink\n", "255 192 203 pink\n", "255 182 193 LightPink\n", "219 112 147 PaleVioletRed\n", "176 48 96 maroon\n", "199 21 133 MediumVioletRed\n", "208 32 144 VioletRed\n", "255 0 255 magenta\n", "238 130 238 violet\n", "221 160 221 plum\n", "218 112 214 orchid\n", "186 85 211 MediumOrchid\n", "153 50 204 DarkOrchid\n", "148 0 211 DarkViolet\n", "138 43 226 BlueViolet\n", "160 32 240 purple\n", "147 112 219 MediumPurple\n", "216 191 216 thistle\n", "255 250 250 snow1\n", "238 233 233 snow2\n", "205 201 201 snow3\n", "139 137 137 snow4\n", "255 245 238 seashell1\n", "238 229 222 seashell2\n", "205 197 191 seashell3\n", "139 134 130 seashell4\n", "255 239 219 AntiqueWhite1\n", "238 223 204 AntiqueWhite2\n", "205 192 176 AntiqueWhite3\n", "139 131 120 AntiqueWhite4\n", "255 228 196 bisque1\n", "238 213 183 bisque2\n", "205 183 158 bisque3\n", "139 125 107 bisque4\n", "255 218 185 PeachPuff1\n", "238 203 173 PeachPuff2\n", "205 175 149 PeachPuff3\n", "139 119 101 PeachPuff4\n", "255 222 173 NavajoWhite1\n", "238 207 161 NavajoWhite2\n", "205 179 139 NavajoWhite3\n", "139 121 94 NavajoWhite4\n", "255 250 205 LemonChiffon1\n", "238 233 191 LemonChiffon2\n", "205 201 165 LemonChiffon3\n", "139 137 112 LemonChiffon4\n", "255 248 220 cornsilk1\n", "238 232 205 cornsilk2\n", "205 200 177 cornsilk3\n", "139 136 120 cornsilk4\n", "255 255 240 ivory1\n", "238 238 224 ivory2\n", "205 205 193 ivory3\n", "139 139 131 ivory4\n", "240 255 240 honeydew1\n", "224 238 224 honeydew2\n", "193 205 193 honeydew3\n", "131 139 131 honeydew4\n", "255 240 245 LavenderBlush1\n", "238 224 229 LavenderBlush2\n", "205 193 197 LavenderBlush3\n", "139 131 134 LavenderBlush4\n", "255 228 225 MistyRose1\n", "238 213 210 MistyRose2\n", "205 183 181 MistyRose3\n", "139 125 123 MistyRose4\n", "240 255 255 azure1\n", "224 238 238 azure2\n", "193 205 205 azure3\n", "131 139 139 azure4\n", "131 111 255 SlateBlue1\n", "122 103 238 SlateBlue2\n", "105 89 205 SlateBlue3\n", " 71 60 139 SlateBlue4\n", " 72 118 255 RoyalBlue1\n", " 67 110 238 RoyalBlue2\n", " 58 95 205 RoyalBlue3\n", " 39 64 139 RoyalBlue4\n", " 0 0 255 blue1\n", " 0 0 238 blue2\n", " 0 0 205 blue3\n", " 0 0 139 blue4\n", " 30 144 255 DodgerBlue1\n", " 28 134 238 DodgerBlue2\n", " 24 116 205 DodgerBlue3\n", " 16 78 139 DodgerBlue4\n", " 99 184 255 SteelBlue1\n", " 92 172 238 SteelBlue2\n", " 79 148 205 SteelBlue3\n", " 54 100 139 SteelBlue4\n", " 0 191 255 DeepSkyBlue1\n", " 0 178 238 DeepSkyBlue2\n", " 0 154 205 DeepSkyBlue3\n", " 0 104 139 DeepSkyBlue4\n", "135 206 255 SkyBlue1\n", "126 192 238 SkyBlue2\n", "108 166 205 SkyBlue3\n", " 74 112 139 SkyBlue4\n", "176 226 255 LightSkyBlue1\n", "164 211 238 LightSkyBlue2\n", "141 182 205 LightSkyBlue3\n", " 96 123 139 LightSkyBlue4\n", "198 226 255 SlateGray1\n", "185 211 238 SlateGray2\n", "159 182 205 SlateGray3\n", "108 123 139 SlateGray4\n", "202 225 255 LightSteelBlue1\n", "188 210 238 LightSteelBlue2\n", "162 181 205 LightSteelBlue3\n", "110 123 139 LightSteelBlue4\n", "191 239 255 LightBlue1\n", "178 223 238 LightBlue2\n", "154 192 205 LightBlue3\n", "104 131 139 LightBlue4\n", "224 255 255 LightCyan1\n", "209 238 238 LightCyan2\n", "180 205 205 LightCyan3\n", "122 139 139 LightCyan4\n", "187 255 255 PaleTurquoise1\n", "174 238 238 PaleTurquoise2\n", "150 205 205 PaleTurquoise3\n", "102 139 139 PaleTurquoise4\n", "152 245 255 CadetBlue1\n", "142 229 238 CadetBlue2\n", "122 197 205 CadetBlue3\n", " 83 134 139 CadetBlue4\n", " 0 245 255 turquoise1\n", " 0 229 238 turquoise2\n", " 0 197 205 turquoise3\n", " 0 134 139 turquoise4\n", " 0 255 255 cyan1\n", " 0 238 238 cyan2\n", " 0 205 205 cyan3\n", " 0 139 139 cyan4\n", "151 255 255 DarkSlateGray1\n", "141 238 238 DarkSlateGray2\n", "121 205 205 DarkSlateGray3\n", " 82 139 139 DarkSlateGray4\n", "127 255 212 aquamarine1\n", "118 238 198 aquamarine2\n", "102 205 170 aquamarine3\n", " 69 139 116 aquamarine4\n", "193 255 193 DarkSeaGreen1\n", "180 238 180 DarkSeaGreen2\n", "155 205 155 DarkSeaGreen3\n", "105 139 105 DarkSeaGreen4\n", " 84 255 159 SeaGreen1\n", " 78 238 148 SeaGreen2\n", " 67 205 128 SeaGreen3\n", " 46 139 87 SeaGreen4\n", "154 255 154 PaleGreen1\n", "144 238 144 PaleGreen2\n", "124 205 124 PaleGreen3\n", " 84 139 84 PaleGreen4\n", " 0 255 127 SpringGreen1\n", " 0 238 118 SpringGreen2\n", " 0 205 102 SpringGreen3\n", " 0 139 69 SpringGreen4\n", " 0 255 0 green1\n", " 0 238 0 green2\n", " 0 205 0 green3\n", " 0 139 0 green4\n", "127 255 0 chartreuse1\n", "118 238 0 chartreuse2\n", "102 205 0 chartreuse3\n", " 69 139 0 chartreuse4\n", "192 255 62 OliveDrab1\n", "179 238 58 OliveDrab2\n", "154 205 50 OliveDrab3\n", "105 139 34 OliveDrab4\n", "202 255 112 DarkOliveGreen1\n", "188 238 104 DarkOliveGreen2\n", "162 205 90 DarkOliveGreen3\n", "110 139 61 DarkOliveGreen4\n", "255 246 143 khaki1\n", "238 230 133 khaki2\n", "205 198 115 khaki3\n", "139 134 78 khaki4\n", "255 236 139 LightGoldenrod1\n", "238 220 130 LightGoldenrod2\n", "205 190 112 LightGoldenrod3\n", "139 129 76 LightGoldenrod4\n", "255 255 224 LightYellow1\n", "238 238 209 LightYellow2\n", "205 205 180 LightYellow3\n", "139 139 122 LightYellow4\n", "255 255 0 yellow1\n", "238 238 0 yellow2\n", "205 205 0 yellow3\n", "139 139 0 yellow4\n", "255 215 0 gold1\n", "238 201 0 gold2\n", "205 173 0 gold3\n", "139 117 0 gold4\n", "255 193 37 goldenrod1\n", "238 180 34 goldenrod2\n", "205 155 29 goldenrod3\n", "139 105 20 goldenrod4\n", "255 185 15 DarkGoldenrod1\n", "238 173 14 DarkGoldenrod2\n", "205 149 12 DarkGoldenrod3\n", "139 101 8 DarkGoldenrod4\n", "255 193 193 RosyBrown1\n", "238 180 180 RosyBrown2\n", "205 155 155 RosyBrown3\n", "139 105 105 RosyBrown4\n", "255 106 106 IndianRed1\n", "238 99 99 IndianRed2\n", "205 85 85 IndianRed3\n", "139 58 58 IndianRed4\n", "255 130 71 sienna1\n", "238 121 66 sienna2\n", "205 104 57 sienna3\n", "139 71 38 sienna4\n", "255 211 155 burlywood1\n", "238 197 145 burlywood2\n", "205 170 125 burlywood3\n", "139 115 85 burlywood4\n", "255 231 186 wheat1\n", "238 216 174 wheat2\n", "205 186 150 wheat3\n", "139 126 102 wheat4\n", "255 165 79 tan1\n", "238 154 73 tan2\n", "205 133 63 tan3\n", "139 90 43 tan4\n", "255 127 36 chocolate1\n", "238 118 33 chocolate2\n", "205 102 29 chocolate3\n", "139 69 19 chocolate4\n", "255 48 48 firebrick1\n", "238 44 44 firebrick2\n", "205 38 38 firebrick3\n", "139 26 26 firebrick4\n", "255 64 64 brown1\n", "238 59 59 brown2\n", "205 51 51 brown3\n", "139 35 35 brown4\n", "255 140 105 salmon1\n", "238 130 98 salmon2\n", "205 112 84 salmon3\n", "139 76 57 salmon4\n", "255 160 122 LightSalmon1\n", "238 149 114 LightSalmon2\n", "205 129 98 LightSalmon3\n", "139 87 66 LightSalmon4\n", "255 165 0 orange1\n", "238 154 0 orange2\n", "205 133 0 orange3\n", "139 90 0 orange4\n", "255 127 0 DarkOrange1\n", "238 118 0 DarkOrange2\n", "205 102 0 DarkOrange3\n", "139 69 0 DarkOrange4\n", "255 114 86 coral1\n", "238 106 80 coral2\n", "205 91 69 coral3\n", "139 62 47 coral4\n", "255 99 71 tomato1\n", "238 92 66 tomato2\n", "205 79 57 tomato3\n", "139 54 38 tomato4\n", "255 69 0 OrangeRed1\n", "238 64 0 OrangeRed2\n", "205 55 0 OrangeRed3\n", "139 37 0 OrangeRed4\n", "255 0 0 red1\n", "238 0 0 red2\n", "205 0 0 red3\n", "139 0 0 red4\n", "255 20 147 DeepPink1\n", "238 18 137 DeepPink2\n", "205 16 118 DeepPink3\n", "139 10 80 DeepPink4\n", "255 110 180 HotPink1\n", "238 106 167 HotPink2\n", "205 96 144 HotPink3\n", "139 58 98 HotPink4\n", "255 181 197 pink1\n", "238 169 184 pink2\n", "205 145 158 pink3\n", "139 99 108 pink4\n", "255 174 185 LightPink1\n", "238 162 173 LightPink2\n", "205 140 149 LightPink3\n", "139 95 101 LightPink4\n", "255 130 171 PaleVioletRed1\n", "238 121 159 PaleVioletRed2\n", "205 104 137 PaleVioletRed3\n", "139 71 93 PaleVioletRed4\n", "255 52 179 maroon1\n", "238 48 167 maroon2\n", "205 41 144 maroon3\n", "139 28 98 maroon4\n", "255 62 150 VioletRed1\n", "238 58 140 VioletRed2\n", "205 50 120 VioletRed3\n", "139 34 82 VioletRed4\n", "255 0 255 magenta1\n", "238 0 238 magenta2\n", "205 0 205 magenta3\n", "139 0 139 magenta4\n", "255 131 250 orchid1\n", "238 122 233 orchid2\n", "205 105 201 orchid3\n", "139 71 137 orchid4\n", "255 187 255 plum1\n", "238 174 238 plum2\n", "205 150 205 plum3\n", "139 102 139 plum4\n", "224 102 255 MediumOrchid1\n", "209 95 238 MediumOrchid2\n", "180 82 205 MediumOrchid3\n", "122 55 139 MediumOrchid4\n", "191 62 255 DarkOrchid1\n", "178 58 238 DarkOrchid2\n", "154 50 205 DarkOrchid3\n", "104 34 139 DarkOrchid4\n", "155 48 255 purple1\n", "145 44 238 purple2\n", "125 38 205 purple3\n", " 85 26 139 purple4\n", "171 130 255 MediumPurple1\n", "159 121 238 MediumPurple2\n", "137 104 205 MediumPurple3\n", " 93 71 139 MediumPurple4\n", "255 225 255 thistle1\n", "238 210 238 thistle2\n", "205 181 205 thistle3\n", "139 123 139 thistle4\n", " 0 0 0 gray0\n", " 0 0 0 grey0\n", " 3 3 3 gray1\n", " 3 3 3 grey1\n", " 5 5 5 gray2\n", " 5 5 5 grey2\n", " 8 8 8 gray3\n", " 8 8 8 grey3\n", " 10 10 10 gray4\n", " 10 10 10 grey4\n", " 13 13 13 gray5\n", " 13 13 13 grey5\n", " 15 15 15 gray6\n", " 15 15 15 grey6\n", " 18 18 18 gray7\n", " 18 18 18 grey7\n", " 20 20 20 gray8\n", " 20 20 20 grey8\n", " 23 23 23 gray9\n", " 23 23 23 grey9\n", " 26 26 26 gray10\n", " 26 26 26 grey10\n", " 28 28 28 gray11\n", " 28 28 28 grey11\n", " 31 31 31 gray12\n", " 31 31 31 grey12\n", " 33 33 33 gray13\n", " 33 33 33 grey13\n", " 36 36 36 gray14\n", " 36 36 36 grey14\n", " 38 38 38 gray15\n", " 38 38 38 grey15\n", " 41 41 41 gray16\n", " 41 41 41 grey16\n", " 43 43 43 gray17\n", " 43 43 43 grey17\n", " 46 46 46 gray18\n", " 46 46 46 grey18\n", " 48 48 48 gray19\n", " 48 48 48 grey19\n", " 51 51 51 gray20\n", " 51 51 51 grey20\n", " 54 54 54 gray21\n", " 54 54 54 grey21\n", " 56 56 56 gray22\n", " 56 56 56 grey22\n", " 59 59 59 gray23\n", " 59 59 59 grey23\n", " 61 61 61 gray24\n", " 61 61 61 grey24\n", " 64 64 64 gray25\n", " 64 64 64 grey25\n", " 66 66 66 gray26\n", " 66 66 66 grey26\n", " 69 69 69 gray27\n", " 69 69 69 grey27\n", " 71 71 71 gray28\n", " 71 71 71 grey28\n", " 74 74 74 gray29\n", " 74 74 74 grey29\n", " 77 77 77 gray30\n", " 77 77 77 grey30\n", " 79 79 79 gray31\n", " 79 79 79 grey31\n", " 82 82 82 gray32\n", " 82 82 82 grey32\n", " 84 84 84 gray33\n", " 84 84 84 grey33\n", " 87 87 87 gray34\n", " 87 87 87 grey34\n", " 89 89 89 gray35\n", " 89 89 89 grey35\n", " 92 92 92 gray36\n", " 92 92 92 grey36\n", " 94 94 94 gray37\n", " 94 94 94 grey37\n", " 97 97 97 gray38\n", " 97 97 97 grey38\n", " 99 99 99 gray39\n", " 99 99 99 grey39\n", "102 102 102 gray40\n", "102 102 102 grey40\n", "105 105 105 gray41\n", "105 105 105 grey41\n", "107 107 107 gray42\n", "107 107 107 grey42\n", "110 110 110 gray43\n", "110 110 110 grey43\n", "112 112 112 gray44\n", "112 112 112 grey44\n", "115 115 115 gray45\n", "115 115 115 grey45\n", "117 117 117 gray46\n", "117 117 117 grey46\n", "120 120 120 gray47\n", "120 120 120 grey47\n", "122 122 122 gray48\n", "122 122 122 grey48\n", "125 125 125 gray49\n", "125 125 125 grey49\n", "127 127 127 gray50\n", "127 127 127 grey50\n", "130 130 130 gray51\n", "130 130 130 grey51\n", "133 133 133 gray52\n", "133 133 133 grey52\n", "135 135 135 gray53\n", "135 135 135 grey53\n", "138 138 138 gray54\n", "138 138 138 grey54\n", "140 140 140 gray55\n", "140 140 140 grey55\n", "143 143 143 gray56\n", "143 143 143 grey56\n", "145 145 145 gray57\n", "145 145 145 grey57\n", "148 148 148 gray58\n", "148 148 148 grey58\n", "150 150 150 gray59\n", "150 150 150 grey59\n", "153 153 153 gray60\n", "153 153 153 grey60\n", "156 156 156 gray61\n", "156 156 156 grey61\n", "158 158 158 gray62\n", "158 158 158 grey62\n", "161 161 161 gray63\n", "161 161 161 grey63\n", "163 163 163 gray64\n", "163 163 163 grey64\n", "166 166 166 gray65\n", "166 166 166 grey65\n", "168 168 168 gray66\n", "168 168 168 grey66\n", "171 171 171 gray67\n", "171 171 171 grey67\n", "173 173 173 gray68\n", "173 173 173 grey68\n", "176 176 176 gray69\n", "176 176 176 grey69\n", "179 179 179 gray70\n", "179 179 179 grey70\n", "181 181 181 gray71\n", "181 181 181 grey71\n", "184 184 184 gray72\n", "184 184 184 grey72\n", "186 186 186 gray73\n", "186 186 186 grey73\n", "189 189 189 gray74\n", "189 189 189 grey74\n", "191 191 191 gray75\n", "191 191 191 grey75\n", "194 194 194 gray76\n", "194 194 194 grey76\n", "196 196 196 gray77\n", "196 196 196 grey77\n", "199 199 199 gray78\n", "199 199 199 grey78\n", "201 201 201 gray79\n", "201 201 201 grey79\n", "204 204 204 gray80\n", "204 204 204 grey80\n", "207 207 207 gray81\n", "207 207 207 grey81\n", "209 209 209 gray82\n", "209 209 209 grey82\n", "212 212 212 gray83\n", "212 212 212 grey83\n", "214 214 214 gray84\n", "214 214 214 grey84\n", "217 217 217 gray85\n", "217 217 217 grey85\n", "219 219 219 gray86\n", "219 219 219 grey86\n", "222 222 222 gray87\n", "222 222 222 grey87\n", "224 224 224 gray88\n", "224 224 224 grey88\n", "227 227 227 gray89\n", "227 227 227 grey89\n", "229 229 229 gray90\n", "229 229 229 grey90\n", "232 232 232 gray91\n", "232 232 232 grey91\n", "235 235 235 gray92\n", "235 235 235 grey92\n", "237 237 237 gray93\n", "237 237 237 grey93\n", "240 240 240 gray94\n", "240 240 240 grey94\n", "242 242 242 gray95\n", "242 242 242 grey95\n", "245 245 245 gray96\n", "245 245 245 grey96\n", "247 247 247 gray97\n", "247 247 247 grey97\n", "250 250 250 gray98\n", "250 250 250 grey98\n", "252 252 252 gray99\n", "252 252 252 grey99\n", "255 255 255 gray100\n", "255 255 255 grey100\n", "169 169 169 DarkGrey\n", "169 169 169 DarkGray\n", "0 0 139 DarkBlue\n", "0 139 139 DarkCyan\n", "139 0 139 DarkMagenta\n", "139 0 0 DarkRed\n", "144 238 144 LightGreen\n" }; static void init(Hashtable table){ if(_rgbtxt==null) return; StringBuffer foo=new StringBuffer(); for(int i=0; i< _rgbtxt.length; i++){ foo.append(_rgbtxt[i]); } rgbtxt=foo.toString(); _rgbtxt=null; foo=null; try{ InputStream is=new ByteArrayInputStream(RGBTXT.rgbtxt.getBytes()); // StreamTokenizer st=new StreamTokenizer(is); BufferedReader br=new BufferedReader(new InputStreamReader(is)); StreamTokenizer st=new StreamTokenizer(br); st.ordinaryChar('!'); // st.ordinaryChar('\n'); // st.ordinaryChar('\t'); String token=null; char c; int r,g,b; byte[] buf=new byte[1024]; while(st.nextToken()!=st.TT_EOF){ //System.out.println("type="+st.ttype+", "+st.sval); if(st.ttype=='!'){ // while((c=(char)is.read())!='\n'); while((c=(char)br.read())!='\n'); continue; } if(st.ttype==st.TT_NUMBER){ r=(int)st.nval; st.nextToken(); g=(int)st.nval; st.nextToken(); b=(int)st.nval; //System.out.print("r, g, b="+r+", "+g+", "+b); int i=0; // while((c=(char)is.read())!='\n'){ while((c=(char)br.read())!='\n'){ if(c=='\t')continue; if(c==' ')continue; if('A'<=c && c<='Z'){ c=(char)('a'+c-'A'); } buf[i]=(byte)c; i++; } table.put(new String(buf, 0, i), new Color(r,g,b)); //System.out.println(" -> "+new String(buf, 0, i)); continue; } } st=null; buf=null; // table.put("slategrey", rgbTable.get("slate grey")); // table.put("Black", rgbTable.get("black")); // table.put("White", rgbTable.get("white")); } catch(Exception e){ //System.out.println(e); } } } class Colormap16 extends Colormap{ Colormap16(int id, Screen s, Visual v, int alloc, Client client) { super(id, s, v, alloc, client); } int allocColor (Client client, int red, int green, int blue) throws IOException{ return ((red/8)<<11)|((green/4)<<5)|(blue/8); } Color getColor(int pixel){ if(pixel==1) return Color.white; int r=(((pixel>>11)&0x1f)*8); if(r==0xf8)r=0xff; int g=(((pixel>>5)&0x3f)*4); if(g==0xfc)g=0xff; int b=(((pixel)&0x1f)*8); if(b==0xf8)b=0xff; return new Color((r<<16) | (g<<8) | b); // return new Color(((((pixel>>11)&0x1f)*8)<<16) | // ((((pixel>>5)&0x3f)*4)<<8) | // ((pixel&0x1f)*8)); } void mkIcm(){ } void freePixels(int client){} void freeAll(){} int rgb2pixel(int rgb){ return (((rgb&0xff0000)>>16)/8)<<11| (((rgb&0xff00)>>8)/4)<<5| ((rgb&0xff))/8; } void delete() throws IOException{ } } weirdx-1.0.32/com/jcraft/weirdx/CopyPaste.java0000644000175000017500000000411410035636114017651 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 2000-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.awt.*; import java.awt.event.*; import java.awt.datatransfer.*; final class CopyPaste implements ClipboardOwner{ private static Clipboard clipboard=null; private static CopyPaste copypaste=null; private static boolean isOwner=true; static void init(){ if(clipboard==null){ try{ clipboard=Toolkit.getDefaultToolkit().getSystemClipboard(); } catch(Exception e){ //System.out.println(e); clipboard=null; } } if(clipboard!=null && copypaste == null){ copypaste=new CopyPaste(); setString(" "); } } static void setString(String str){ if(clipboard==null) return; StringSelection contents=new StringSelection(str); isOwner=true; clipboard.setContents(contents, copypaste); } static String getString(){ if(clipboard==null) return null; Transferable content=clipboard.getContents(copypaste); if(content != null){ try{ return (String)(content.getTransferData(DataFlavor.stringFlavor)); } catch(Exception e){ //System.out.println(e); } } return null; } public void lostOwnership(Clipboard clipboard, Transferable contents) { isOwner=false; } static boolean isOwner(){ return isOwner; } //static void setOwner(boolean foo){ isOwner=foo; } } weirdx-1.0.32/com/jcraft/weirdx/Cursor.java0000644000175000017500000002065310035636123017225 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.awt.*; import java.io.*; import java.util.*; final class Cursor extends Resource{ static Cursor rootCursor; java.awt.Cursor cursor; private static int[] cursors={ java.awt.Cursor.DEFAULT_CURSOR, java.awt.Cursor.CROSSHAIR_CURSOR, java.awt.Cursor.TEXT_CURSOR, java.awt.Cursor.WAIT_CURSOR, java.awt.Cursor.SW_RESIZE_CURSOR, java.awt.Cursor.SE_RESIZE_CURSOR, java.awt.Cursor.NW_RESIZE_CURSOR, java.awt.Cursor.NE_RESIZE_CURSOR, java.awt.Cursor.N_RESIZE_CURSOR, java.awt.Cursor.S_RESIZE_CURSOR, java.awt.Cursor.W_RESIZE_CURSOR, java.awt.Cursor.E_RESIZE_CURSOR, java.awt.Cursor.HAND_CURSOR, java.awt.Cursor.MOVE_CURSOR }; Cursor(int id){ super(id, RT_CURSOR); cursor=java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR); } Cursor(int id, Pixmap src, Pixmap msk, int fr, int fg, int fb, int br, int bg, int bb, int hx, int hy){ super(id, RT_CURSOR); cursor=java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR); } private int getType(int i){ int j=java.awt.Cursor.DEFAULT_CURSOR; switch(i){ case /*XC_X_cursor*/ 0: case /*XC_arrow*/ 2: break; case /*XC_based_arrow_down*/ 4: case /*XC_based_arrow_up*/ 6: case /*XC_boat*/ 8: case /*XC_bogosity*/ 10: case /*XC_bottom_left_corner*/ 12: j=java.awt.Cursor.SW_RESIZE_CURSOR; break; case /*XC_bottom_right_corner*/ 14: j=java.awt.Cursor.SE_RESIZE_CURSOR; break; case /*XC_bottom_side*/ 16: j=java.awt.Cursor.S_RESIZE_CURSOR; break; case /*XC_bottom_tee*/ 18: j=java.awt.Cursor.S_RESIZE_CURSOR; break; case /*XC_box_spiral*/ 20: case /*XC_center_ptr*/ 22: case /*XC_circle*/ 24: break; case /*XC_clock*/ 26: j=java.awt.Cursor.WAIT_CURSOR; break; case /*XC_coffee_mug*/ 28: break; case /*XC_cross*/ 30: case /*XC_cross_reverse*/ 32: case /*XC_crosshair*/ 34: j=java.awt.Cursor.CROSSHAIR_CURSOR; break; case /*XC_diamond_cross*/ 36: case /*XC_dot*/ 38: case /*XC_dotbox*/ 40: case /*XC_double_arrow*/ 42: case /*XC_draft_large*/ 44: case /*XC_draft_small*/ 46: case /*XC_draped_box*/ 48: case /*XC_exchange*/ 50: break; case /*XC_fleur*/ 52: j=java.awt.Cursor.MOVE_CURSOR; break; case /*XC_gobbler*/ 54: case /*XC_gumby*/ 56: break; case /*XC_hand1*/ 58: case /*XC_hand2*/ 60: j=java.awt.Cursor.HAND_CURSOR; break; case /*XC_heart*/ 62: case /*XC_icon*/ 64: case /*XC_iron_cross*/ 66: case /*XC_left_ptr*/ 68: break; case /*XC_left_side*/ 70: case /*XC_left_tee*/ 72: j=java.awt.Cursor.W_RESIZE_CURSOR; break; case /*XC_leftbutton*/ 74: case /*XC_ll_angle*/ 76: case /*XC_lr_angle*/ 78: case /*XC_man*/ 80: case /*XC_middlebutton*/ 82: case /*XC_mouse*/ 84: case /*XC_pencil*/ 86: case /*XC_pirate*/ 88: case /*XC_plus*/ 90: case /*XC_question_arrow*/ 92: case /*XC_right_ptr*/ 94: break; case /*XC_right_side*/ 96: case /*XC_right_tee*/ 98: j=java.awt.Cursor.E_RESIZE_CURSOR; break; case /*XC_rightbutton*/ 100: case /*XC_rtl_logo*/ 102: case /*XC_sailboat*/ 104: case /*XC_sb_down_arrow*/ 106: case /*XC_sb_h_double_arrow*/ 108: case /*XC_sb_left_arrow*/ 110: case /*XC_sb_right_arrow*/ 112: case /*XC_sb_up_arrow*/ 114: case /*XC_sb_v_double_arrow*/ 116: case /*XC_shuttle*/ 118: case /*XC_sizing*/ 120: case /*XC_spider*/ 122: case /*XC_spraycan*/ 124: case /*XC_star*/ 126: case /*XC_target*/ 128: case /*XC_tcross*/ 130: case /*XC_top_left_arrow*/ 132: break; case /*XC_top_left_corner*/ 134: j=java.awt.Cursor.NW_RESIZE_CURSOR; break; case /*XC_top_right_corner*/ 136: j=java.awt.Cursor.NE_RESIZE_CURSOR; break; case /*XC_top_side*/ 138: case /*XC_top_tee*/ 140: j=java.awt.Cursor.N_RESIZE_CURSOR; break; case /*XC_trek*/ 142: case /*XC_ul_angle*/ 144: case /*XC_umbrella*/ 146: case /*XC_ur_angle*/ 148: break; case /*XC_watch*/ 150: j=java.awt.Cursor.WAIT_CURSOR; break; case /*XC_xterm*/ 152: j=java.awt.Cursor.TEXT_CURSOR; break; default: } return j; } Cursor(int id, Font src, Font msk, int srcc, int mskc, int fr, int fg, int fb, int br, int bg, int bb){ super(id, RT_CURSOR); cursor=java.awt.Cursor.getPredefinedCursor(getType(srcc)); } static void reqCreateGlyphCursor(Client c) throws IOException{ int n, foo, cid, fr, fg, fb, br, bg, bb; int x, y; Resource r; int srcc, mskc; Font src, msk; cid=c.client.readInt(); foo=c.client.readInt(); c.length-=3; src=(Font)Resource.lookupIDByType(foo, Resource.RT_FONT); if(src==null){ c.errorValue=foo; c.errorReason=4; // BadValue; return; } foo=c.client.readInt(); c.length--; msk=(Font)Resource.lookupIDByType(foo, Resource.RT_FONT); if(msk==null){ c.errorValue=foo; c.errorReason=4; // BadValue; return; } srcc=(short)c.client.readShort(); mskc=(short)c.client.readShort(); fr=(short)c.client.readShort(); fg=(short)c.client.readShort(); fb=(short)c.client.readShort(); br=(short)c.client.readShort(); bg=(short)c.client.readShort(); bb=(short)c.client.readShort(); Cursor cur=new Cursor(cid, src, msk, srcc, mskc, fr, fg, fb, br, bg, bb); Resource.add(cur); } static void reqFreeCursor(Client c) throws IOException{ int foo; foo=c.client.readInt(); c.length-=2; Cursor cur=(Cursor)Resource.lookupIDByType(foo, Resource.RT_CURSOR); if(cur==null){ c.errorValue=foo; c.errorReason=4; // BadValue; return; } Resource.freeResource(foo, Resource.RT_NONE); } void recolor(int fr, int fg, int fb, int br, int bg, int bb){ } void delete() throws IOException{ cursor=null; } static void reqRecolorCursor(Client c) throws IOException{ int n, foo, cid, fr, fg, fb, br, bg, bb; int x, y; Resource r; Pixmap src, msk; foo=c.client.readInt(); c.length-=2; Cursor cur=(Cursor)Resource.lookupIDByType(foo, Resource.RT_CURSOR); if(cur==null){ c.errorValue=foo; c.errorReason=4; // BadValue; return; } fr=(short)c.client.readShort(); fg=(short)c.client.readShort(); fb=(short)c.client.readShort(); br=(short)c.client.readShort(); bg=(short)c.client.readShort(); bb=(short)c.client.readShort(); cur.recolor(fr, fg, fb, br, bg, bb); } static void reqCreateCursor(Client c) throws IOException{ int n, foo, cid, fr, fg, fb, br, bg, bb; int x, y; Resource r; Pixmap src, msk; cid=c.client.readInt(); foo=c.client.readInt(); c.length-=3; r=Resource.lookupIDByType(foo, RT_PIXMAP); if(r==null || !(r instanceof Pixmap)){ c.errorValue=foo; c.errorReason=4; // BadValue; return; } src=(Pixmap)r; foo=c.client.readInt(); c.length--; r=Resource.lookupIDByType(foo, RT_PIXMAP); if(r==null || !(r instanceof Pixmap)){ c.errorValue=foo; c.errorReason=4; // BadValue; return; } msk=(Pixmap)r; fr=(short)c.client.readShort(); fg=(short)c.client.readShort(); fb=(short)c.client.readShort(); br=(short)c.client.readShort(); bg=(short)c.client.readShort(); bb=(short)c.client.readShort(); x=(short)c.client.readShort(); y=(short)c.client.readShort(); Cursor cur=new Cursor(cid, src, msk, fr, fg, fb, br, bg, bb, x, y); Resource.add(cur); } } weirdx-1.0.32/com/jcraft/weirdx/DDXFont.java0000644000175000017500000001444110035636132017214 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.util.*; class DDXFont { static java.util.Hashtable table=new java.util.Hashtable(); static class RefCount{ int count=1; String key=null; java.awt.Font font=null; RefCount(String key, java.awt.Font font){ this.key=key; this.font=font; } } private static synchronized java.awt.Font getFont(String name, int style, int size){ String key=name+style+size; RefCount foo=(RefCount)table.get(key); if(foo!=null){ foo.count++; return foo.font; } java.awt.Font f=new java.awt.Font(name, style, size); foo=new RefCount(key, f); table.put(key, foo); return f; } private static synchronized void delFont(java.awt.Font f){ RefCount foo=null; for(Enumeration e=table.elements(); e.hasMoreElements();){ foo=(RefCount)e.nextElement(); if(foo.font==f){ foo.count--; if(foo.count==0){ table.remove(foo.key); foo.font=null; } return; } } } void delete(){ delFont(font); font=null; } byte[] lfname; java.awt.Font font; java.awt.FontMetrics metric; int[] prop; int min_char_or_byte2=32; int max_char_or_byte2=255; int min_byte1=0; int max_byte1=0; int default_char=32; int min_width; int max_width; String encoding=null; Font_CharSet charset=null; DDXFont(){ } void init(byte[] lfname) throws UnsupportedEncodingException{ if(encoding!=null){ if(charset==null) return; int tmp=default_char; int i=0; while(tmp!=0){ i++; tmp>>=8; tmp&=0xffffff; } byte[] btmp=new byte[i]; tmp=default_char; i--; while(tmp!=0){ btmp[i]=(byte)(tmp&0xff); tmp>>=8; tmp&=0xffffff; i--; } char[] ctmp=new char[1]; if(charset.encode(btmp, 0, btmp.length, ctmp)==0) return; } this.lfname=lfname; } java.awt.Font getFont(){ if(font!=null) return font; int size=12; try{ int tmp=Integer.parseInt(getFontSize()); if(tmp!=0) size=tmp; } catch(Exception e){} int style=java.awt.Font.PLAIN; if(getWeight().equals("bold")) style|=java.awt.Font.BOLD; if(getStyle().equals("i")) style|=java.awt.Font.ITALIC; if(getFamily().equals("times") || getFamily().equals("times new roman") || getFamily().equals("new century schoolbook")){ font=getFont("Serif", style, size); } else if(getFamily().equals("helvetica") || getFamily().equals("helvetic") || getFamily().equals("courier")){ font=getFont("SansSerif", style, size); } else{ font=getFont("Monospaced", style, size); } metric=java.awt.Toolkit.getDefaultToolkit().getFontMetrics(font); String reg=getCharsetRegistry(); String enc=getCharsetEncoding(); for (Enumeration e = Font.charSets.elements() ; e.hasMoreElements();){ Font_CharSet foo=(Font_CharSet)e.nextElement(); if(reg.equals(foo.getCharset()) || enc.equals(foo.getCharset())){ min_byte1=foo.getMinByte1(); max_byte1=foo.getMaxByte1(); min_char_or_byte2=foo.getMinCharOrByte2(); max_char_or_byte2=foo.getMaxCharOrByte2(); default_char=foo.getDefaultChar(); encoding=foo.getEncoding(); charset=foo; break; } } min_width=getMaxAdvance(); max_width=getMaxAdvance(); if(encoding!=null){ int tmp=default_char; int i=0; while(tmp!=0){ i++; tmp>>=8; tmp&=0xffffff; } byte[] btmp=new byte[i]; tmp=default_char; i--; while(tmp!=0){ btmp[i]=(byte)(tmp&0xff); tmp>>=8; tmp&=0xffffff; i--; } char[] ctmp=new char[1]; if(charset!=null) charset.encode(btmp, 0, btmp.length, ctmp); max_width=min_width=metric.charWidth(ctmp[0]); if(getSpace().equals("p")){ min_width=0; } } else{ char[] ctmp=new char[1]; ctmp[0]='@'; max_width=metric.charsWidth(ctmp, 0, 1); ctmp[0]=' '; min_width=metric.charsWidth(ctmp, 0, 1); } return font; } int[] getProp(){ if(prop==null) initprop(); return prop; } void initprop(){ prop=new int[2]; prop[0]=Atom.make("FONT", true); prop[1]=Atom.make(new String(lfname), true); } int getAscent(){ return metric.getAscent(); } int getDescent(){ return metric.getDescent(); } int getLeading(){ return metric.getLeading(); } int getHeight(){ return metric.getHeight(); } int getMaxAdvance(){ return metric.charWidth('@'); } int getMaxAscent(){ return metric.getAscent(); } int getMaxDescent(){ return metric.getDescent(); } int[] getWidths(){ return metric.getWidths(); } int charWidth(char c){ return metric.charWidth(c); } String getFamily(){ return chop(1); } String getWeight(){ return chop(2); } String getStyle(){ return chop(3); } String getFontSize(){ return chop(6); } String getSpace(){ return chop(10); } String getCharsetRegistry(){ return chop(12); } String getCharsetEncoding(){ return chop(13); } private String chop(int i){ int s,e; s=1; for(;i!=0;i--){ s=skip(s); s++; } e=skip(s); return new String(lfname, s, e-s); } private int skip(int i){ while(i0){ title=new String(p.data); } ((java.awt.Frame)(frame)).setTitle(title); } } } else{ frame.add(this); } frame.validate(); Insets insets=frame.getInsets(); frame.setSize(window.width+window.borderWidth*2+ insets.left+insets.right, window.height+window.borderWidth*2+ insets.top+insets.bottom); super.setLocation(insets.left, insets.top); frame.validate(); } } else{ if(isVisible()){ super.setVisible(false); if(window!=window.screen.root && window.screen.root.width*window.screen.root.height/4<= window.width*window.height){ freeImage(); exposed.setBounds(0, 0, 0, 0); } } } } public void setLocation(int x, int y){ Point p = getLocation(); if(p.x==x && p.y==y) return; if(window!=null && window.parent!=null){ int orgx=p.x-window.parent.borderWidth+window.borderWidth; int orgy=p.y-window.parent.borderWidth+window.borderWidth; int bitgrabity=window.attr&(15<<8); if(orgx<0 || orgy<0){ if(orgx<0 && orgx0 && (r.x<=bw || r.y<=bw || (width+bw)<=(r.width+r.x) || (height+bw)<=(r.height+r.y)) ){ if(window.isBorderPixel()){ g.setColor(window.getColormap().getColor(window.border.pixel)); } else{ g.setColor(Color.black); } for(int i=bw-1;0<=i; i--){ g.drawRect(i, i, width+2*bw-i*2-1, height+2*bw-i*2-1); } } if(window.screen.windowmode==WeirdX.InBrowser || window==window.screen.root){ if(LogoImage.logoimage!=null && window.x+r.x<=LogoImage.logoimagewidth && window.y+r.y<=LogoImage.logoimageheight){ g.drawImage(LogoImage.logoimage, 0, 0, LogoImage.logoimagewidth-(window.x-bw), LogoImage.logoimageheight-(window.y-bw), window.x-bw, window.y-bw, LogoImage.logoimagewidth, LogoImage.logoimageheight, this); } else{ } } } public boolean isOpaque(){ /* if(isVisible()){ if(window.clss==InputOnly){ return false; } return super.isOpaque(); } */ return false; } private final void expunion(Rectangle r) { int x1=Math.min(exposed.x, r.x); int x2=Math.max(exposed.x+exposed.width, r.x+r.width); int y1=Math.min(exposed.y, r.y); int y2=Math.max(exposed.y+exposed.height, r.y+r.height); exposed.setBounds(x1, y1, x2-x1, y2-y1); } private final boolean expcontains(int X, int Y, int W, int H) { int ww=exposed.width; int hh=exposed.height; if (ww<=0 || hh<=0 || W<=0 || H<=0) { return false; } int xx=exposed.x; int yy=exposed.y; return (X>=xx && Y>=yy && X+W<=xx+ww && Y+H<=yy+hh); } public void update(Graphics g){ paintComponent(g); // System.out.println("update: "); } public void paint(Graphics g){ paintComponent(g); try{ // ????? super.paint(g); }catch(Exception e){ return; } if(window==null)return; Client client=window.client; if(client==null || client==serverClient) return; Rectangle r=g.getClip().getBounds(); if(exposed.width==0){ exposed.setBounds(r); } else if(expcontains(r.x, r.y, r.width, r.height)){ return; } else{ expunion(r); } event.mkExpose(window.id, r.x, r.y, r.width, r.height, 0); try{ window.sendEvent(event, 1, null); } catch(Exception ee){} } public void setBorderPixmap(Pixmap p){ } public void mouseClicked(MouseEvent e){ } public void mouseEntered(MouseEvent e){ if(window==null)return; if(window.getFrame()!=null){ java.awt.Window frame=window.getFrame(); if((frame instanceof java.awt.Frame) && frame==e.getSource()){ try{ if(window.isRealized()){ Window.setInputFocus(window.client, window.id, 1, (int)System.currentTimeMillis(), false); } } catch(Exception ee){ System.out.println(ee); } return; } } String str=CopyPaste.getString(); if(!CopyPaste.isOwner() && str!=null){ synchronized(window.screen.root){ Property p=window.screen.root.getProperty(); while(p!=null){ if(p.propertyName==9)break; p=p.next; } if(p!=null){ p.data=str.getBytes(); p.size=p.data.length; } } Selection sel=Selection.getSelection(1); // PRIMARY if(sel!=null && sel.client!=null){ int time=(int)System.currentTimeMillis(); Event event=new Event(); event.mkSelectionClear(time, sel.wid, sel.selection); try{ sel.client.sendEvent(event, 1, Event.NoEventMask, Event.NoEventMask, null); } catch(Exception ee){ //System.out.println(ee); }; sel.window=window.screen.root; sel.wid=window.screen.root.id; sel.lastTimeChanged=time; sel.client=null; } CopyPaste.setString(str); } if(window.id==window.screen.rootId){ return; } if(window.isMapped()){ requestFocus(); Window.focus.win=window.id; } int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Client client=window.client; if(client==null || client==serverClient) return; event.mkEnterNotify(0, // Ancestor window.screen.rootId, window.id, 0, x, y, e.getX(), e.getY(), state, 0, // Normal 0x1|0x02 // focus|same-screen ); try{ Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mouseExited(MouseEvent e){ if(window==null) return; if(window.id==window.screen.rootId){ return; } int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Client client=window.client; if(client==null || client==serverClient) return; event.mkLeaveNotify(0, // Ancestor window.screen.rootId, window.id, 0, x, y, e.getX(), e.getY(), state, 0, // Normal 0x1|0x02 // focus|same-screen ); try{ Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mousePressed(MouseEvent e){ if(threeButton){ if(threeBstate==s){ threeBPressed=e; threeBstate=sp; return; } if(threeBstate==sp // || threeBstate==sppr ){ threeBPressed=null; threeBstate=spp; e=new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), (e.getModifiers()&(~(InputEvent.BUTTON1_MASK|InputEvent.BUTTON3_MASK)))|InputEvent.BUTTON2_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); } } procPressed(e); } // these are for storing the old windows position, as Panel // delivers in the mouseDraggedEvent coordinates relative to the old window position private int oldwindowx, oldwindowy; private void procPressed(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; oldwindowx = window.x; oldwindowy = window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); if(mod==0){ mod|=InputEvent.BUTTON1_MASK; } // ????? int state=0; int detail=1; if((mod & InputEvent.BUTTON1_MASK)!=0) detail=1; if((mod & InputEvent.BUTTON2_MASK)!=0) detail=2; if((mod & InputEvent.BUTTON3_MASK)!=0) detail=3; if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Event.filters[Event.MotionNotify]=Event.PointerMotionMask| Event.ButtonMotionMask | ((Event.Button1Mask>>1)< state|=8; Window.sprite.hot.state=state; } public void mouseReleased(MouseEvent e){ if(threeButton){ if(threeBstate==sppr){ threeBPressed=null; threeBstate=s; return; } if(threeBstate==sp){ procPressed(threeBPressed); threeBPressed=null; threeBstate=s; } else if(threeBstate==spp){ threeBPressed=null; threeBstate=sppr; e=new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), (e.getModifiers()&(~(InputEvent.BUTTON1_MASK|InputEvent.BUTTON3_MASK)))|InputEvent.BUTTON2_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); } } try{ procReleased(e); } catch(Exception ee){} } private void procReleased(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; int detail=0; if((mod & InputEvent.BUTTON1_MASK)!=0){ state|=(1<<8); detail=1;} if((mod & InputEvent.BUTTON2_MASK)!=0){ state|=(1<<9); detail=2;} if((mod & InputEvent.BUTTON3_MASK)!=0){ state|=(1<<10); detail=3;} if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=0; // ????? Event.filters[Event.MotionNotify]=Event.PointerMotionMask/*| ((Event.Button1Mask>>1)< 16 // button 2 -> 8 // button 3 -> 4 // shift -> 1 // control -> 2 // alt -> 12 ?? int state=0; int detail=0; if((mod & InputEvent.BUTTON1_MASK)!=0){ state|=(1<<8); detail=1;} if((mod & InputEvent.BUTTON2_MASK)!=0){ state|=(1<<9); detail=2;} if((mod & InputEvent.BUTTON3_MASK)!=0){ state|=(1<<10); detail=3;} if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=state; px=x; py=y; event.mkMotionNotify(1, window.screen.rootId, Window.sprite.win.id, 0, px, py, e.getX(), e.getY(), state, 1); try{ if(!Window.checkMotion(event, window)){ return; } event.mkMotionNotify(1, window.screen.rootId, Window.sprite.win.id, 0, px, py, px-Window.sprite.win.x, py-Window.sprite.win.y, state, 1); if(Window.grab!=null){ Window.sendGrabbedEvent(event, false, 1); }else{ Window.sendDeviceEvent(Window.sprite.win, event, Window.grab, null, 1); } } catch(Exception ee){ } } public void mouseMoved(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; px=x; py=y; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=state; event.mkMotionNotify(0, window.screen.rootId, window.id, 0, x, y, x-window.x, y-window.y, state, 1); try{ if(!Window.checkMotion(event, window)){ return; } if(Window.grab!=null) Window.sendGrabbedEvent(event, false, 1); else Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void processKeyEvent(KeyEvent e){ int id=e.getID(); if(id==KeyEvent.KEY_PRESSED) { keyPressed(e); } else if(id==KeyEvent.KEY_RELEASED) { keyReleased(e); } else if(id==KeyEvent.KEY_TYPED) { keyTyped(e); } e.consume(); // ?? } public void keyPressed(KeyEvent e){ if(!window.isMapped()) return; if(e.getKeyCode()==KeyEvent.VK_CAPS_LOCK){ if(clck_toggle){ clck_toggle=false; Window.sprite.hot.state&=(~1); } else{ clck_toggle=true; Window.sprite.hot.state|=1; } } // Easter Egg... if(window==window.screen.root && 0 "+e); } public Image getImage(){ if(offi==null) allocImage(); return offi; } public Image getImage(GC gc, int x, int y, int w, int h){ Image i=getImage(); if(gc!=null && gc.clip_mask!=null && gc.clip_mask instanceof ClipPixmap){ TransparentFilter tf=new TransparentFilter(0, 0, (Pixmap)(gc.clip_mask.getMask())); i=Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(i.getSource(), tf)); } return i; } public Graphics getGraphics2(){ if(window.clss==InputOnly){ return getGraphics(); } if(!isVisible()){ return null; } // Graphics g=getGraphics(); if(offg==null) allocImage(); Graphics g=offg; return g; } public final Graphics getGraphics(GC gc, int mask){ if(!isVisible()){ return null; } if(offg==null) allocImage(); Graphics graphics=offg; if((mask&GC.GCSubwindowMode)!=0 && (gc.attr&GC.IncludeInferiors)!=0){ graphics=getGraphics(); window.currentGC=null; } else{ if(gc==window.currentGC && gc.time==window.gctime && (mask&~window.gmask)==0){ //System.out.println("DDXWindow skip"); return graphics; } window.gctime=gc.time; window.currentGC=gc; window.gmask=mask; } if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ java.awt.Rectangle rec=(Rectangle)(gc.clip_mask.getMask()); if(rec!=null){ graphics=offg; } if(rec==null || (rec.x==0 && rec.y==0 && rec.width==window.width && rec.height==window.height)){ // return graphics; } else{ graphics.setClip(rec.x, rec.y, rec.width, rec.height); } } if((mask&GC.GCFunction)!=0){ Color color=window.getColormap().getColor(gc.fgPixel); if(gc.function==GC.GXxor){ window.gmask&=~GC.GCFunction; graphics.setXORMode(new Color((color.getRGB() ^ graphics.getColor().getRGB())&0xffffff)); } else if(gc.function==GC.GXinvert){ window.gmask&=~GC.GCFunction; graphics.setXORMode(window.screen.defaultColormap.getColor(window.background.pixel)); } else{ graphics.setColor(color); } } if((mask&GC.GCFont)!=0){ Font font=gc.font; graphics.setFont(font.getFont()); } if((mask&GC.GCLineWidth)!=0 || (mask&GC.GCLineStyle)!=0 || (mask&GC.GCCapStyle)!=0 || (mask&GC.GCJoinStyle)!=0 ){ } return graphics; } public void drawImage(Clip clip, Image img, int dx, int dy, int w, int h) { if(clip==null || (clip instanceof ClipPixmap)){ drawImage(img, dx, dy, w, h); return; } ClipRectangles rclip=(ClipRectangles)clip; java.awt.Rectangle rec=rclip.masks[0]; if(offg==null) allocImage(); java.awt.Shape tmp=offg.getClip(); if(tmp==null) { tmp=new Rectangle(0, 0, window.width, window.height); } offg.clipRect(rec.x, rec.y, rec.width, rec.height); drawImage(img, dx, dy, w, h); for(int i=1; i0){ title=new String(p.data); } ((java.awt.Frame)(frame)).setTitle(title); } } } else{ frame.add(this); } frame.validate(); Insets insets=frame.getInsets(); frame.setSize(window.width+window.borderWidth*2+ insets.left+insets.right, window.height+window.borderWidth*2+ insets.top+insets.bottom); super.setLocation(insets.left, insets.top); frame.validate(); } } else{ if(isVisible()){ super.setVisible(false); if(window!=window.screen.root && window.screen.root.width*window.screen.root.height/4<= window.width*window.height){ freeImage(); exposed.setBounds(0, 0, 0, 0); } } } } public void setLocation(int x, int y){ Point p = getLocation(); if(p.x==x && p.y==y) return; if(window!=null && window.parent!=null){ int orgx=p.x-window.parent.borderWidth+window.borderWidth; int orgy=p.y-window.parent.borderWidth+window.borderWidth; int bitgrabity=window.attr&(15<<8); if(orgx<0 || orgy<0){ if(orgx<0 && orgx0 && (r.x<=bw || r.y<=bw || (width+bw)<=(r.width+r.x) || (height+bw)<=(r.height+r.y)) ){ if(window.isBorderPixel()){ g.setColor(window.getColormap().getColor(window.border.pixel)); } else{ g.setColor(Color.black); } for(int i=bw-1;0<=i; i--){ g.drawRect(i, i, width+2*bw-i*2-1, height+2*bw-i*2-1); } } if(window.screen.windowmode==WeirdX.InBrowser || window==window.screen.root){ if(LogoImage.logoimage!=null && window.x+r.x<=LogoImage.logoimagewidth && window.y+r.y<=LogoImage.logoimageheight){ g.drawImage(LogoImage.logoimage, 0, 0, LogoImage.logoimagewidth-(window.x-bw), LogoImage.logoimageheight-(window.y-bw), window.x-bw, window.y-bw, LogoImage.logoimagewidth, LogoImage.logoimageheight, this); } else{ } } } public boolean isOpaque(){ if(isVisible()){ if(window.clss==InputOnly){ return false; } return super.isOpaque(); } return false; } private final void expunion(Rectangle r) { int x1=Math.min(exposed.x, r.x); int x2=Math.max(exposed.x+exposed.width, r.x+r.width); int y1=Math.min(exposed.y, r.y); int y2=Math.max(exposed.y+exposed.height, r.y+r.height); exposed.setBounds(x1, y1, x2-x1, y2-y1); } private final boolean expcontains(int X, int Y, int W, int H) { int ww=exposed.width; int hh=exposed.height; if (ww<=0 || hh<=0 || W<=0 || H<=0) { return false; } int xx=exposed.x; int yy=exposed.y; return (X>=xx && Y>=yy && X+W<=xx+ww && Y+H<=yy+hh); } public void update(Graphics g){ System.out.println("update: "); } public void paint(Graphics g){ try{ // ????? super.paint(g); }catch(Exception e){ return; } Client client=window.client; if(client==null || client==serverClient) return; Rectangle r=g.getClip().getBounds(); if(exposed.width==0){ exposed.setBounds(r); } else if(expcontains(r.x, r.y, r.width, r.height)){ return; } else{ expunion(r); } event.mkExpose(window.id, r.x, r.y, r.width, r.height, 0); try{ window.sendEvent(event, 1, null); } catch(Exception ee){} } public void setBorderPixmap(Pixmap p){ } public void mouseClicked(MouseEvent e){ } public void mouseEntered(MouseEvent e){ if(window!=null && window.getFrame()!=null){ java.awt.Window frame=window.getFrame(); if((frame instanceof java.awt.Frame) && frame==e.getSource()){ try{ if(window.isRealized()){ Window.setInputFocus(window.client, window.id, 1, (int)System.currentTimeMillis(), false); } } catch(Exception ee){ System.out.println(ee); } return; } } String str=CopyPaste.getString(); if(!CopyPaste.isOwner() && str!=null){ synchronized(window.screen.root){ Property p=window.screen.root.getProperty(); while(p!=null){ if(p.propertyName==9)break; p=p.next; } if(p!=null){ p.data=str.getBytes(); p.size=p.data.length; } } Selection sel=Selection.getSelection(1); // PRIMARY if(sel!=null && sel.client!=null){ int time=(int)System.currentTimeMillis(); Event event=new Event(); event.mkSelectionClear(time, sel.wid, sel.selection); try{ sel.client.sendEvent(event, 1, Event.NoEventMask, Event.NoEventMask, null); } catch(Exception ee){ //System.out.println(ee); }; sel.window=window.screen.root; sel.wid=window.screen.root.id; sel.lastTimeChanged=time; sel.client=null; } CopyPaste.setString(str); } if(window.id==window.screen.rootId){ return; } if(window.isMapped()){ requestFocus(); Window.focus.win=window.id; } int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Client client=window.client; if(client==null || client==serverClient) return; event.mkEnterNotify(0, // Ancestor window.screen.rootId, window.id, 0, x, y, e.getX(), e.getY(), state, 0, // Normal 0x1|0x02 // focus|same-screen ); try{ Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mouseExited(MouseEvent e){ if(window==null) return; if(window.id==window.screen.rootId){ return; } int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Client client=window.client; if(client==null || client==serverClient) return; event.mkLeaveNotify(0, // Ancestor window.screen.rootId, window.id, 0, x, y, e.getX(), e.getY(), state, 0, // Normal 0x1|0x02 // focus|same-screen ); try{ Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mousePressed(MouseEvent e){ if(threeButton){ if(threeBstate==s){ threeBPressed=e; threeBstate=sp; return; } if(threeBstate==sp // || threeBstate==sppr ){ threeBPressed=null; threeBstate=spp; e=new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), (e.getModifiers()&(~(InputEvent.BUTTON1_MASK|InputEvent.BUTTON3_MASK)))|InputEvent.BUTTON2_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); } } procPressed(e); } private void procPressed(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); if(mod==0){ mod|=InputEvent.BUTTON1_MASK; } // ????? int state=0; int detail=1; if((mod & InputEvent.BUTTON1_MASK)!=0) detail=1; if((mod & InputEvent.BUTTON2_MASK)!=0) detail=2; if((mod & InputEvent.BUTTON3_MASK)!=0) detail=3; if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Event.filters[Event.MotionNotify]=Event.PointerMotionMask| Event.ButtonMotionMask | ((Event.Button1Mask>>1)< state|=8; Window.sprite.hot.state=state; } public void mouseReleased(MouseEvent e){ if(threeButton){ if(threeBstate==sppr){ threeBPressed=null; threeBstate=s; return; } if(threeBstate==sp){ procPressed(threeBPressed); threeBPressed=null; threeBstate=s; } else if(threeBstate==spp){ threeBPressed=null; threeBstate=sppr; e=new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), (e.getModifiers()&(~(InputEvent.BUTTON1_MASK|InputEvent.BUTTON3_MASK)))|InputEvent.BUTTON2_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); } } procReleased(e); } private void procReleased(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; int detail=0; if((mod & InputEvent.BUTTON1_MASK)!=0){ state|=(1<<8); detail=1;} if((mod & InputEvent.BUTTON2_MASK)!=0){ state|=(1<<9); detail=2;} if((mod & InputEvent.BUTTON3_MASK)!=0){ state|=(1<<10); detail=3;} if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=0; // ????? Event.filters[Event.MotionNotify]=Event.PointerMotionMask/*| ((Event.Button1Mask>>1)< 16 // button 2 -> 8 // button 3 -> 4 // shift -> 1 // control -> 2 // alt -> 12 ?? int state=0; int detail=0; if((mod & InputEvent.BUTTON1_MASK)!=0){ state|=(1<<8); detail=1;} if((mod & InputEvent.BUTTON2_MASK)!=0){ state|=(1<<9); detail=2;} if((mod & InputEvent.BUTTON3_MASK)!=0){ state|=(1<<10); detail=3;} if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=state; px=x; py=y; event.mkMotionNotify(1, window.screen.rootId, /*window.id,*/ Window.sprite.win.id, 0, px, py, e.getX(), e.getY(), state, 1); try{ if(!Window.checkMotion(event, window)){ return; } event.mkMotionNotify(1, window.screen.rootId, /*window.id,*/ Window.sprite.win.id, 0, px, py, px-Window.sprite.win.x, py-Window.sprite.win.y, //e.getX(), //e.getY(), state, 1); if(Window.grab!=null) Window.sendGrabbedEvent(event, false, 1); else Window.sendDeviceEvent(Window.sprite.win, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mouseMoved(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; px=x; py=y; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=state; event.mkMotionNotify(0, window.screen.rootId, window.id, 0, x, y, x-window.x, y-window.y, state, 1); try{ if(!Window.checkMotion(event, window)){ return; } if(Window.grab!=null) Window.sendGrabbedEvent(event, false, 1); else Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void processKeyEvent(KeyEvent e){ int id=e.getID(); if(id==KeyEvent.KEY_PRESSED) { keyPressed(e); } else if(id==KeyEvent.KEY_RELEASED) { keyReleased(e); } else if(id==KeyEvent.KEY_TYPED) { keyTyped(e); } e.consume(); // ?? } public void keyPressed(KeyEvent e){ if(!window.isMapped()) return; if(e.getKeyCode()==KeyEvent.VK_CAPS_LOCK){ if(clck_toggle){ clck_toggle=false; Window.sprite.hot.state&=(~1); } else{ clck_toggle=true; Window.sprite.hot.state|=1; } } // Easter Egg... if(window==window.screen.root && 0 "+e); } public Image getImage(){ if(offi==null) allocImage(); return offi; } public Image getImage(GC gc, int x, int y, int w, int h){ Image i=getImage(); if(gc!=null && gc.clip_mask!=null && gc.clip_mask instanceof ClipPixmap){ TransparentFilter tf=new TransparentFilter(0, 0, (Pixmap)(gc.clip_mask.getMask())); i=Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(i.getSource(), tf)); } return i; } public Graphics getGraphics2(){ if(window.clss==InputOnly){ return getGraphics(); } if(!isVisible()){ return null; } // Graphics g=getGraphics(); if(offg==null) allocImage(); Graphics g=offg; return g; } public final Graphics getGraphics(GC gc, int mask){ if(!isVisible()){ return null; } if(offg==null) allocImage(); Graphics graphics=offg; if((mask&GC.GCSubwindowMode)!=0 && (gc.attr&GC.IncludeInferiors)!=0){ graphics=getGraphics(); window.currentGC=null; } else{ if(gc==window.currentGC && gc.time==window.gctime && (mask&~window.gmask)==0){ //System.out.println("DDXWindow skip"); return graphics; } window.gctime=gc.time; window.currentGC=gc; window.gmask=mask; } if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ java.awt.Rectangle rec=(Rectangle)(gc.clip_mask.getMask()); if(rec!=null){ graphics=offg; } if(rec==null || (rec.x==0 && rec.y==0 && rec.width==window.width && rec.height==window.height)){ // return graphics; } else{ graphics.setClip(rec.x, rec.y, rec.width, rec.height); } } if((mask&GC.GCFunction)!=0){ Color color=window.getColormap().getColor(gc.fgPixel); if(gc.function==GC.GXxor){ window.gmask&=~GC.GCFunction; graphics.setXORMode(new Color((color.getRGB() ^ graphics.getColor().getRGB())&0xffffff)); } else if(gc.function==GC.GXinvert){ window.gmask&=~GC.GCFunction; graphics.setXORMode(window.screen.defaultColormap.getColor(window.background.pixel)); } else{ graphics.setColor(color); } } if((mask&GC.GCFont)!=0){ Font font=gc.font; graphics.setFont(font.getFont()); } if((mask&GC.GCLineWidth)!=0 || (mask&GC.GCLineStyle)!=0 || (mask&GC.GCCapStyle)!=0 || (mask&GC.GCJoinStyle)!=0 ){ } return graphics; } public void drawImage(Clip clip, Image img, int dx, int dy, int w, int h) { if(clip==null || (clip instanceof ClipPixmap)){ drawImage(img, dx, dy, w, h); return; } ClipRectangles rclip=(ClipRectangles)clip; java.awt.Rectangle rec=rclip.masks[0]; if(offg==null) allocImage(); java.awt.Shape tmp=offg.getClip(); if(tmp==null) { tmp=new Rectangle(0, 0, window.width, window.height); } offg.clipRect(rec.x, rec.y, rec.width, rec.height); drawImage(img, dx, dy, w, h); for(int i=1; i=end){break;} start=current; } current++; } if(current!=start){ tmp.addElement(getVal(array, start, current-start)); } } catch(Exception e){ //System.out.println(e); } if(tmp.size()==1){ dalpha=((Integer)(tmp.firstElement())).intValue(); } else{ dalpha=255; int i=0; while(i0 && (r.x<=bw || r.y<=bw || (width+bw)<=(r.width+r.x) || (height+bw)<=(r.height+r.y)) ){ if(window.isBorderPixel()){ g.setColor(window.getColormap().getColor(window.border.pixel)); } else{ g.setColor(Color.black); } for(int i=bw-1;0<=i; i--){ g.drawRect(i, i, width+2*bw-i*2-1, height+2*bw-i*2-1); } } } public boolean isOpaque(){ if(isVisible()){ if(window.clss==2/*InputOnly*/){ return false; } if(alpha!=null) return false; return super.isOpaque(); } return false; } public void delete() throws IOException{ super.delete(); if(alpha!=null){ alpha.dispose(); alpha=null; } } private static Integer getVal(byte[]array, int s, int len){ String foo=new String(array, s, len); int radix=10; if(foo.startsWith("0x")){ radix=16; foo=new String(array,s+2,len-2); } int i=0; try{ i=Integer.parseInt(foo, radix); } catch(Exception e){} return new Integer(i); } public Window getWindow(){ return window; } } class AlphaBackground{ Image offi; Image filteredi=null; AlphaFilter filter=null; Color background=null; int x, y, width, height; int alpha; AlphaBackground(Image offi, int alpha){ this.offi=offi; this.alpha=alpha; filter=new AlphaFilter(alpha); } void setImage(Image img){ this.offi=img; freeImage(); filteredi=null; } void setCrop(int x, int y, int width, int height){ if(x==this.x && y==this.y && width==this.width && height==this.height) return; this.x=x; this.y=y; this.width=width; this.height=height; freeImage(); filteredi=null; } void setColor(Color c, int alpha){ if(background!=null && background.equals(c)) return; background=c; this.alpha=alpha; filter.setColor(c, alpha); freeImage(); filteredi=null; } synchronized void freeImage(){ if(filteredi!=null)filteredi.flush(); } Image getImage(){ if(filteredi==null){ if(filter==null){ filter=new AlphaFilter(alpha); } filteredi=Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(offi.getSource(), filter)); } return filteredi; } void dispose(){ finalize(); } synchronized void drawImage(Graphics g, int xx, int yy, ImageObserver io){ Rectangle r=g.getClipBounds(); Image i=getImage(); g.drawImage(i, xx, yy, io); } public void finalize(){ offi=null; freeImage(); filteredi=null; } } class AlphaFilter extends RGBImageFilter { int color=0xffffffff/*Color.white.getRGB()|0xff000000*/; int alphacolor=(color&0xffffff); int alpha=0; AlphaFilter(int alpha){ canFilterIndexColorModel=true; this.alpha=(alpha<<24); } void setColor(Color c, int alpha){ this.alpha=(alpha<<24); this.setColor(c); } void setColor(Color c){ color=c.getRGB()|0xff000000; alphacolor=(color&0xffffff)|alpha; } public int filterRGB(int x, int y, int rgb){ //System.out.println("x="+x+",y="+y); if(rgb==color){ return alphacolor;} return rgb; } } weirdx-1.0.32/com/jcraft/weirdx/Depth.java0000644000175000017500000000320410035636217017011 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; final class Depth { int depth; Visual visual[]; int getDepth() { return depth; } void setDepth(int d) { depth=d; } Visual[] getVisual() { return visual; } void setVisual(Visual[] v) { visual=v; } int visuals() { return visual.length; } Depth(int depth, Visual[] visual) { this.depth=depth; this.visual=visual; for(int i=0; i=lx)lx=x; if(y<=sy)sy=y; if(y>=ly)ly=y; while(n!=0){ x+=(short)io.readShort(); y+=(short)io.readShort(); n--; graphics.drawLine(x, y, x, y); if(x<=sx)sx=x; if(x>=lx)lx=x; if(y<=sy)sy=y; if(y>=ly)ly=y; } } else{ while(n!=0){ x=(short)io.readShort(); y=(short)io.readShort(); n--; graphics.drawLine(x, y, x, y); if(x<=sx)sx=x; if(x>=lx)lx=x; if(y<=sy)sy=y; if(y>=ly)ly=y; } } if(sx<0)sx=0; if(sy<0)sy=0; if(d instanceof Window){ ((Window)d).draw(sx, sy, lx-sx+1, ly-sy+1); } if(gc.function==GC.GXxor || gc.function==GC.GXinvert){ graphics.setPaintMode(); } if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ d.restoreClip(); } } static void reqFillPolyArc(Client c, Drawable d, GC gc) throws IOException{ int foo; int n=c.length; IO io=c.client; Graphics graphics=d.getGraphics(gc, GC.GCFunction|GC.GCSubwindowMode); if(graphics==null){ io.readPad(n*4); return; } if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ java.awt.Rectangle rec=(Rectangle)(gc.clip_mask.getMask()); if(rec==null){ io.readPad(n*4); return; } } n*=4; short x, y, a1, a2; int width, height; int sx=d.width; int sy=d.height; int lx=0; int ly=0; while(n!=0){ x=(short)io.readShort(); y=(short)io.readShort(); if(x0){ c.client.readPad(4); n--; } return; } } Font font=gc.font; int delta; n=n*4; int sx=d.width; int sy=d.height; int lx=0; int ly=0; while(n!=0){ if(n<2) break; foo=c.client.readByte(); n--; if(foo==255){ int i=0; foo=c.client.readByte(); n--; i=foo&0xff; foo=c.client.readByte(); n--; i=((i<<8)&0xffff)| foo&0xff; foo=c.client.readByte(); n--; i=((i<<8)&0xffffff)| foo&0xff; foo=c.client.readByte(); n--; i=(i<<8) | foo&0xff; Font tmp=(Font)Resource.lookupIDByType(i, Resource.RT_FONT); if(tmp!=null) { font=tmp; graphics.setFont(font.getFont()); } else{ System.out.println("font is null!!"); } continue; } delta=c.client.readByte(); n--; x+=delta; if(foo>0){ foo*=2; c.client.readByte(c.bbuffer, 0, foo); n-=foo; if(font.encoding!=null){ foo=font.encode(c.bbuffer, 0, foo, c.cbuffer); if(foo==0){ c.length=n; return; } } else{ for(int i=0; i0){ c.client.readPad(4); n--; } return; } } Font font=gc.font; n*=4; c.client.readByte(c.bbuffer, 0, n); len*=2; if(font.encoding!=null){ len=font.encode(c.bbuffer, 0, len, c.cbuffer); if(len==0){ return; } } else{ for(int i=0; i0){ io.readByte(c.bbuffer, 0, foo); n-=foo; if(font.encoding!=null){ foo=font.encode(c.bbuffer, 0, foo, c.cbuffer); } else{ char ccc=0; for(int i=0; i0){ io.readPad((-len)&3); } if(font.encoding!=null){ len=font.encode(c.bbuffer, 0, len, c.cbuffer); } else{ char ccc=0; for(int i=0; i0){ c.client.readPad(4); n--; } return; } } n/=2; int sx=d.width; int sy=d.height; int lx=0; int ly=0; while(n!=0){ foo=c.xarray[0]=(short)c.client.readShort(); if(foo<=sx)sx=foo; if(foo>=lx)lx=foo; foo=c.yarray[0]=(short)c.client.readShort(); if(foo<=sy)sy=foo; if(foo>=ly)ly=foo; foo=c.xarray[1]=(short)c.client.readShort(); if(foo<=sx)sx=foo; if(foo>=lx)lx=foo; foo=c.yarray[1]=(short)c.client.readShort(); if(foo<=sy)sy=foo; if(foo>=ly)ly=foo; if(gc.lineWidth<=1) graphics.drawPolyline(c.xarray, c.yarray, 2); else{ if(c.yarray[0]==c.yarray[1]){ graphics.drawPolyline(c.xarray, c.yarray, 2); c.yarray[0]-=(gc.lineWidth/2); c.yarray[1]-=(gc.lineWidth/2); for(int i=0; iMath.abs(y2-y1)){ int dy,srow; int dx,col,row,prevrow; if(x2>x1) dx = 1; else dx = -1; dy=(y2-y1)*8192/Math.abs(x2-x1); prevrow=row=y1; srow=row*8192+8192/2; col=x1; while(true){ if(row!=prevrow){ graphics.drawOval(col-lw2,prevrow-lw2,linewidth,linewidth); prevrow=row; } graphics.drawOval(col-lw2,row-lw2,linewidth,linewidth); if(col == x2) break; srow+=dy; row=srow/8192; col+=dx; } } else{ int dx,scol; int dy,col,row,prevcol; if(y2>y1) dy=1; else dy=-1; dx=(x2-x1)*8192/Math.abs(y2-y1); row=y1; prevcol=col=x1; scol=col*8192+8192/2; while(true){ if(col!=prevcol){ graphics.drawOval(prevcol-lw2,row-lw2,linewidth,linewidth); prevcol=col; } graphics.drawOval(col-lw2,row-lw2,linewidth,linewidth); if(row==y2) break; row+=dy; scol+=dx; col=scol/8192; } } } static void reqPolyLine(Client c, Drawable d, GC gc) throws IOException{ int n=c.length; int foo; Graphics graphics=d.getGraphics(gc, GC.GCFunction|GC.GCSubwindowMode |GC.GCLineWidth ); if(graphics==null){ c.client.readPad(n*4); return; } int mode=c.data; if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ java.awt.Rectangle rec=(Rectangle)(gc.clip_mask.getMask()); if(rec==null){ while(n>0){ c.client.readPad(4); n--; } return; } } short x, y; if(c.xarray.length=lx)lx=foo; foo=c.yarray[0]=(short)c.client.readShort(); if(foo<=sy)sy=foo; if(foo>=ly)ly=foo; for(int i=1;i=lx)lx=foo; foo=c.yarray[i]; if(foo<=sy)sy=foo; if(foo>=ly)ly=foo; } if(gc.lineWidth>1&&n>1){ --n; for(int i=0;i0){ c.client.readPad(4); n--; } return; } } short x, y; int sx=d.width; int sy=d.height; int lx=0; int ly=0; if(c.xarray.length0){ c.client.readPad(4); n--; } return; } } n/=2; short x, y; int ww, hh; int sx=d.width; int sy=d.height; int lx=0; int ly=0; while(n!=0){ x=(short)c.client.readShort(); y=(short)c.client.readShort(); ww=c.client.readShort(); hh=c.client.readShort(); if(x1){ int l2=gc.lineWidth/2; x-=l2; y-=l2; ww+=gc.lineWidth; hh+=gc.lineWidth; for(int i=0; icpixmap.width) ww=cpixmap.width; if(hh>cpixmap.height) hh=cpixmap.height; if(ww>d.width) ww=d.width; if(hh>d.height) hh=d.height; for(int i=0;i0){ c.client.readPad(8); n-=2; } return; } } Pixmap p=null; if(((gc.attr&GC.fillStyle)==GC.FillOpaqueStippled) || ((gc.attr&GC.fillStyle)==GC.FillStippled)){ p=gc.stipple; } if(((gc.attr&GC.fillStyle)==GC.FillTiled)){ p=gc.tile.pixmap; } short x, y; int ww, hh; int sx=d.width; int sy=d.height; int lx=0; int ly=0; while(n!=0){ x=(short)c.client.readShort(); y=(short)c.client.readShort(); ww=c.client.readShort(); hh=c.client.readShort(); n-=2; if(x<0){ww+=x; x=0;} if(y<0){hh+=y; y=0;} if(d.width<=x || d.height<=y) continue; if(ww<=0 || hh<=0) continue; if(xww-x)||(p.height>hh-y)){ tmp=graphics.getClip(); graphics.clipRect(x, y, ww-x, hh-y); } graphics.drawImage(p.img, x, y, Screen.screen[0].root.ddxwindow); if(tmp!=null) graphics.setClip(tmp); for(int i=x+p.width;iww) www=ww-i; if(y+hhh>=hh) hhh=hh-y; graphics.copyArea(x, y, www, hhh, i-x, 0); } for(int j=y+p.height;j=hh) hhh=hh-j; graphics.copyArea(x, y, ww-x, hhh, 0, j-y); } } else{ graphics.fillRect(x, y, ww, hh); } } if(sx<0)sx=0; if(sy<0)sy=0; if(d instanceof Window){ ((Window)d).draw(sx, sy, lx-sx+2, ly-sy+2); } if(gc.function==GC.GXxor || gc.function==GC.GXinvert){ graphics.setPaintMode(); } if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ d.restoreClip(); } } } weirdx-1.0.32/com/jcraft/weirdx/Drawable.java0000644000175000017500000000332710035636241017471 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.awt.*; import java.io.*; public abstract class Drawable extends Resource{ public static final byte DRAWABLE_WINDOW=0; public static final byte DRAWABLE_PIXMAP=1; public static final byte UNDRAWABLE_WINDOW=2; public static final byte DRAWABLE_BUFFER=3; public byte type; public int clss; public byte depth; public byte bitsPerPixel; public int x, y, width, height; public Screen screen; public long serialNumber; private static int serial=0; private static final int max= 1<<28; int gctime=0; int gmask=0; GC currentGC=null; Drawable(int id, int type){ super(id, type); if(++serial > max) serial=1; serialNumber=serial; } abstract Graphics getGraphics(); abstract void restoreClip(); abstract Graphics getGraphics(GC gc, int mask); abstract Colormap getColormap(); abstract Image getImage(GC gc, int x, int y, int width, int height); } weirdx-1.0.32/com/jcraft/weirdx/DummySHAPEExtension.java0000644000175000017500000002323010035636247021522 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.*; import java.awt.image.*; final class DummySHAPEExtension extends Extension{ static final int ShapeSet=0; static final int ShapeUnion=1; static final int ShapeIntersect=2; static final int ShapeSubtract=3; static final int ShapeInvert=4; static final int ShapeBounding=0; static final int ShapeClip=1; // static final int ShapeNotifyMask=(1 << 0); // static final int ShapeNotify=0; static int ctyp; static int etyp; DummySHAPEExtension(){ eventcount=1; errorcount=0; ctyp=Resource.newType(); etyp=Resource.newType(); name="SHAPE"; } void dispatch(Client c) throws IOException{ Window window; int kind, x, y, w, h, shaped, op; Rectangle[] rect; int foo; IO io=c.client; switch(c.data){ case 0: synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(0); io.writeShort(1); io.writeShort(0); io.writePad(20); io.flush(); } break; case 1: op=io.readByte(); kind=io.readByte(); int oder=io.readByte(); io.readPad(1); foo=io.readInt(); c.length-=3; window=c.lookupWindow(foo); if(window==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } x=(short)io.readShort(); y=(short)io.readShort(); c.length--; int len=(c.length)/2; rect=new Rectangle[len]; { int xx, yy, ww, hh; while(len>0){ xx=(short)io.readShort(); yy=(short)io.readShort(); ww=(short)io.readShort(); hh=(short)io.readShort(); rect[rect.length-len]=new Rectangle(xx, yy, ww, hh); len--; } } // synchronized(DummySHAPEExtension.class){ // window.ddxwindow.setShapeRectangles(op, kind, oder, x, y, rect); // } break; case 2: op=io.readByte(); kind=io.readByte(); io.readPad(2); foo=io.readInt(); c.length-=3; window=c.lookupWindow(foo); if(window==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } x=(short)io.readShort(); y=(short)io.readShort(); foo=io.readInt(); c.length-=2; if(foo==0){ sendShapeNotify(kind, window, x, y, window.width, window.height, 0); return; } Drawable d=c.lookupDrawable(foo); if(d==null || !(d instanceof Pixmap)){ c.errorValue=foo; c.errorReason=4; // BadPixmap; return; } Pixmap pixmap=(Pixmap)d; if(pixmap.depth!=1){ c.errorValue=foo; c.errorReason=8; // BadMatch return; } // synchronized(DummySHAPEExtension.class){ // if(kind==1){ // window.ddxwindow.setShapeMask(op, kind, x, y, pixmap); // } // } w=pixmap.width; h=pixmap.height; shaped=1; sendShapeNotify(kind, window, x, y, w, h, shaped); break; case 3: int dk, sk; op=io.readByte(); dk=io.readByte(); sk=io.readByte(); io.readPad(1); foo=io.readInt(); c.length-=3; Window dwindow=c.lookupWindow(foo); if(dwindow==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } x=(short)io.readShort(); y=(short)io.readShort(); foo=io.readInt(); c.length-=2; Window swindow=c.lookupWindow(foo); if(swindow==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } // synchronized(DummySHAPEExtension.class){ // dwindow.ddxwindow.setCombineMask(op, sk, dk, x, y, swindow); // } break; case 4: foo=io.readByte(); io.readPad(3); foo=io.readInt(); foo=io.readShort(); foo=io.readShort(); break; case 5: foo=io.readInt(); c.length-=2; window=c.lookupWindow(foo); if(window==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(0); io.writeByte(0); // bouding shaped io.writeByte(0); // clip shaped io.writePad(2); io.writeShort(-window.borderWidth); // bounding x io.writeShort(-window.borderWidth); io.writeShort(window.width+2*window.borderWidth); io.writeShort(window.height+2*window.borderWidth); io.writeShort(0); // clip x io.writeShort(0); io.writeShort(window.width); io.writeShort(window.height); io.writePad(4); io.flush(); } break; case 6: foo=io.readInt(); c.length-=2; window=c.lookupWindow(foo); if(window==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } foo=io.readByte(); io.readPad(3); c.length--; if(foo!=0 && foo!=1){ c.errorValue=foo; c.errorReason=2; // BadWindow return; } { Head head=(Head)Resource.lookupIDByType(window.id, DummySHAPEExtension.etyp); if(foo==1){ if(head!=null){ for(ShapeEvent se=head.next; se!=null; se=se.next){ if(se.client==c){ return; } } } ShapeEvent se=new ShapeEvent(Resource.fakeClientId(c), DummySHAPEExtension.ctyp, c, window); Resource.add(se); if(head==null){ head=new Head(window.id, DummySHAPEExtension.etyp); Resource.add(head); } else{ se.next=head.next; } head.next=se; return; } // foo==0 if(head!=null){ ShapeEvent nse=null; ShapeEvent se=null; for(se=head.next; se!=null ; se=se.next){ if(se.client==c) break; nse=se; } if(se!=null){ Resource.freeResource(se.id, DummySHAPEExtension.ctyp); if(nse!=null){ nse.next=se.next; } else{ head.next=se.next; } } } } break; case 7: foo=io.readInt(); c.length-=2; window=c.lookupWindow(foo); if(window==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } byte result=0; { Head head= (Head)Resource.lookupIDByType(window.id, DummySHAPEExtension.etyp); if(head!=null){ for(ShapeEvent se=head.next; se!=null; se=se.next){ if(se.client==c){ result=1; break; } } } } synchronized(io){ io.writeByte(1); io.writeByte(result); io.writeShort(c.seq); io.writeInt(0); io.writePad(24); io.flush(); } break; case 8: foo=io.readInt(); c.length-=2; window=c.lookupWindow(foo); if(window==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } kind=io.readByte(); io.readPad(3); synchronized(io){ io.writeByte(1); io.writeByte(0); io.writeShort(c.seq); io.writeInt(2*1); io.writeInt(1); io.writePad(20); io.writeShort(0); io.writeShort(0); io.writeShort(window.width); io.writeShort(window.height); io.flush(); } break; default: System.err.println("Shape: unknown code="+c.data); } } void sendShapeNotify(int kind, Window window, int x, int y, int w, int h, int shaped) throws IOException{ Head head=(Head)Resource.lookupIDByType(window.id, DummySHAPEExtension.etyp); if(head==null)return; for(ShapeEvent se=head.next; se!=null; se=se.next){ Client c=se.client; if(c==Client.clients[0] || c.clientGone){ continue; } mkShapeNotify(c.cevent, kind, window.id, x, y, w, h, shaped); c.cevent.putSequence(c.seq); c.sendEvent(1, c.cevent); } } void mkShapeNotify(Event e, int kind, int window, int x, int y, int w, int h, int shaped){ e.clear(); e.writeByte((byte)eventbase); e.writeByte((byte)kind); e.writePad(2); e.writeInt(window); e.writeShort(x); e.writeShort(y); e.writeShort(w); e.writeShort(h); int time=(int)System.currentTimeMillis(); e.writeInt(time); e.writeByte((byte)shaped); } void swap(Event e){ e.index=4; e.swapInt(); e.swapShort(); e.swapShort(); e.swapShort(); e.swapShort(); e.swapInt(); } class Head extends Resource{ ShapeEvent next; Head(int id, int typ){ super(id, typ); this.next=null; } void delete() throws IOException{ ShapeEvent pNext; for(ShapeEvent pCur=next; pCur!=null; pCur=pNext) { pNext=pCur.next; Resource.freeResource (pCur.id, DummySHAPEExtension.ctyp); } next=null; return; } } class ShapeEvent extends Resource{ ShapeEvent next; Client client; Window window; ShapeEvent(int id, int typ, Client client, Window window){ super(id, typ); this.client=client; this.window=window; this.next=null; } void delete() throws IOException{ Head head=(Head)lookupIDByType(window.id, DummySHAPEExtension.etyp); if(head!=null) { ShapeEvent pCur, pPrev=null; for(pCur=head.next; pCur!=null && pCur !=this; pCur=pCur.next){ pPrev=pCur; } if(pCur!=null){ if(pPrev!=null){ pPrev.next=next; } else{ head.next=next; } } } } } } weirdx-1.0.32/com/jcraft/weirdx/Error.java0000644000175000017500000000263710035636257017053 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; final class Error{ static final int Success=0; static final int BadRequest=1; static final int BadValue=2; static final int BadWindow=3; static final int BadPixmap=4; static final int BadAtom=5; static final int BadCursor=6; static final int BadFont=7; static final int BadMatch=8; static final int BadDrawable=9; static final int BadAccess=10; static final int BadAlloc=11; static final int BadColor=12; static final int BadGC=13; static final int BadIDChoice=14; static final int BadName=15; static final int BadLength=16; static final int BadImplementation=17; } weirdx-1.0.32/com/jcraft/weirdx/Event.java0000644000175000017500000006224710035636267017047 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.util.*; final class Event { static final int KeyPress=2; static final int KeyRelease=3; static final int ButtonPress=4; static final int ButtonRelease=5; static final int MotionNotify=6; static final int EnterNotify=7; static final int LeaveNotify=8; static final int FocusIn=9; static final int FocusOut=10; static final int KeymapNotify=11; static final int Expose=12; static final int GraphicsExpose=13; static final int NoExpose=14; static final int VisibilityNotify=15; static final int CreateNotify=16; static final int DestroyNotify=17; static final int UnmapNotify=18; static final int MapNotify=19; static final int MapRequest=20; static final int ReparentNotify=21; static final int ConfigureNotify=22; static final int ConfigureRequest=23; static final int GravityNotify=24; static final int ResizeRequest=25; static final int CirculateNotify=26; static final int CirculateRequest=27; static final int PropertyNotify=28; static final int SelectionClear=29; static final int SelectionRequest=30; static final int SelectionNotify=31; static final int ColormapNotify=32; static final int ClientMessage=33; static final int MappingNotify=34; static final int LASTEvent=35; static final int NoEventMask=0; static final int KeyPressMask=(1<<0); static final int KeyReleaseMask=(1<<1); static final int ButtonPressMask=(1<<2); static final int ButtonReleaseMask=(1<<3); static final int EnterWindowMask=(1<<4); static final int LeaveWindowMask=(1<<5); static final int PointerMotionMask=(1<<6); static final int PointerMotionHintMask=(1<<7); static final int Button1MotionMask=(1<<8); static final int Button2MotionMask=(1<<9); static final int Button3MotionMask=(1<<10); static final int Button4MotionMask=(1<<11); static final int Button5MotionMask=(1<<12); static final int ButtonMotionMask=(1<<13); static final int KeymapStateMask=(1<<14); static final int ExposureMask=(1<<15); static final int VisibilityChangeMask=(1<<16); static final int StructureNotifyMask=(1<<17); static final int ResizeRedirectMask=(1<<18); static final int SubstructureNotifyMask=(1<<19); static final int SubstructureRedirectMask=(1<<20); static final int FocusChangeMask=(1<<21); static final int PropertyChangeMask=(1<<22); static final int ColormapChangeMask=(1<<23); static final int OwnerGrabButtonMask=(1<<24); static final int Button1Mask=(1<<8); static final int Button2Mask=(1<<9); static final int Button3Mask=(1<<10); static final int Button4Mask=(1<<11); static final int Button5Mask=(1<<12); static final int NoSuchEvent=0x80000000; static final int StructureAndSubMask= ( StructureNotifyMask | SubstructureNotifyMask ); static final int CantBeFiltered=NoEventMask; static final int[] filters={ NoSuchEvent, /* 0 */ NoSuchEvent, /* 1 */ KeyPressMask, /* KeyPress */ KeyReleaseMask, /* KeyRelease */ ButtonPressMask, /* ButtonPress */ ButtonReleaseMask, /* ButtonRelease */ PointerMotionMask, /* MotionNotify */ EnterWindowMask, /* EnterNotify */ LeaveWindowMask, /* LeaveNotify */ FocusChangeMask, /* FocusIn */ FocusChangeMask, /* FocusOut */ KeymapStateMask, /* KeymapNotify */ ExposureMask, /* Expose */ NoEventMask, /* GraphicsExpose */ NoEventMask, /* NoExpose */ VisibilityChangeMask, /* VisibilityNotify */ SubstructureNotifyMask, /* CreateNotify */ StructureAndSubMask, /* DestroyNotify */ StructureAndSubMask, /* UnmapNotify */ StructureAndSubMask, /* MapNotify */ SubstructureRedirectMask, /* MapRequest */ StructureAndSubMask, /* ReparentNotify */ StructureAndSubMask, /* ConfigureNotify */ SubstructureRedirectMask, /* ConfigureRequest */ StructureAndSubMask, /* GravityNotify */ ResizeRedirectMask, /* ResizeRequest */ StructureAndSubMask, /* CirculateNotify */ SubstructureRedirectMask, /* CirculateRequest */ PropertyChangeMask, /* PropertyNotify */ NoEventMask, /* SelectionClear */ NoEventMask, /* SelectionRequest */ NoEventMask, /* SelectionNotify */ ColormapChangeMask, /* ColormapNotify */ NoEventMask, /* ClientMessage */ NoEventMask /* MappingNotify */ }; static final int AtMostOneClient= (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask); static final int MotionMask= (PointerMotionMask | Button1MotionMask | Button2MotionMask | Button3MotionMask | Button4MotionMask | Button5MotionMask | ButtonMotionMask ); static final int PropagateMask= (KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | MotionMask ); static final int PointerGrabMask=( ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionHintMask | KeymapStateMask | MotionMask ); static final int EXTENSION_EVENT_BASE=64; byte[] event; int index=0; static final byte[] zeros=new byte[32]; static{ for(int i=0; i<32; i++)zeros[i]=0; } Event(byte[] bb){ event=bb; } Event(){ event=new byte[32]; } void clear(){ System.arraycopy(zeros, 0, event, 0, 32); index=0; } void writeByte(byte val){ event[index++]=val; } void writeShort(int val){ event[index++]=(byte)((val>>8)&0xff); event[index++]=(byte)(val&0xff); } void writeInt(int val){ event[index++]=(byte)((val>>24)&0xff); event[index++]=(byte)((val>>16)&0xff); event[index++]=(byte)((val>>8)&0xff); event[index++]=(byte)(val&0xff); } void writePad(int i){ index+=i;} void _clear(){ System.arraycopy(zeros, 0, event, 0, 32); index=0; } private void _writeByte(byte val){ event[index++]=val; } private void _writeShort(int val){ event[index++]=(byte)((val>>8)&0xff); event[index++]=(byte)(val&0xff); } private void _writeInt(int val){ event[index++]=(byte)((val>>24)&0xff); event[index++]=(byte)((val>>16)&0xff); event[index++]=(byte)((val>>8)&0xff); event[index++]=(byte)(val&0xff); } private void _writePad(int i){ index+=i;} void putEvent(int e){ index=4; _writeInt(e); } void putSequence(int seq){ index=2; _writeShort(seq); } private int readShort(){ int s=0; s=event[index++]&0xff; s=((s<<8)&0xffff) | (event[index++]&0xff); return s; } int getState(){ index=28; return readShort(); } int getSameScreen(){ return event[30]; } int getDetail(){ return event[1]; } int getFlags(){ return event[31]; } void fixUpEventFromWindow(Window w, int child, int rootx, int rooty, boolean calcChild){ int flags=0; if(calcChild){ Window tmpw=Window.spriteTrace[Window.spriteTraceGood-1]; while(tmpw!=null){ if(tmpw==w){ child=0; break; } if(tmpw.parent==w){ child=w.id; break; } tmpw=tmpw.parent; } } int ex=0, ey=0; flags=1; ex=rootx-w.x; ey=rooty-w.y; index=0; _writePad(8); _writeInt(Window.spriteTrace[0].id); _writeInt(w.id); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writeShort(ex); _writeShort(ey); _writePad(2); _writeByte((byte)flags); } void mkCirculateRequest(int parent, int window, int place){ _clear(); _writeByte((byte)27); _writePad(1); _writePad(2); _writeInt(parent); _writeInt(window); _writePad(4); _writeByte((byte)place); //_writePad(15); } void mkCirculateNotify(int event, int window, int parent, int place){ _clear(); _writeByte((byte)26); _writePad(1); _writePad(2); _writeInt(event); _writeInt(window); _writeInt(parent); _writeByte((byte)place); //_writePad(15); } void mkColormapNotify(int window, int cmap, int neww, int state){ _clear(); _writeByte((byte)32); _writePad(1); _writePad(2); _writeInt(window); _writeInt(cmap); _writeByte((byte)neww); _writeByte((byte)state); //_writePad(18); } void mkFocusIn(int detail, int event, int mode){ _clear(); _writeByte((byte)9); _writeByte((byte)detail); _writePad(2); _writeInt(event); _writeByte((byte)mode); //_writePad(23); } void mkFocusOut(int detail, int event, int mode){ _clear(); _writeByte((byte)10); _writeByte((byte)detail); _writePad(2); _writeInt(event); _writeByte((byte)mode); //_writePad(23); } void mkPropertyNotify(int window, int atom, int time, int state){ _clear(); _writeByte((byte)28); _writePad(1); _writePad(2); _writeInt(window); _writeInt(atom); _writeInt(time); _writeByte((byte)state); //_writePad(15); } void mkSelectionNotify(int time, int requestor, int selection, int target, int property){ _clear(); _writeByte((byte)31); _writePad(1); _writePad(2); _writeInt(time); _writeInt(requestor); _writeInt(selection); _writeInt(target); _writeInt(property); //_writePad(8); } void mkSelectionRequest(int time, int owner, int requestor, int selection, int target, int property){ _clear(); _writeByte((byte)30); _writePad(1); _writePad(2); _writeInt(time); _writeInt(owner); _writeInt(requestor); _writeInt(selection); _writeInt(target); _writeInt(property); //_writePad(4); } void mkSelectionClear(int time, int owner, int selection){ _clear(); _writeByte((byte)29); _writePad(1); _writePad(2); _writeInt(time); _writeInt(owner); _writeInt(selection); //_writePad(16); } void mkVisibilityNotify(int window, int state){ _clear(); _writeByte((byte)15); _writePad(1); _writePad(2); _writeInt(window); _writeByte((byte)state); //_writePad(23); } void mkGravityNotify(int event, int window, int x, int y){ _clear(); _writeByte((byte)24); _writePad(1); _writePad(2); _writeInt(event); _writeInt(window); _writeShort(x); _writeShort(y); //_writePad(16); } void mkReparentNotify(int event, int window, int parent, int x, int y, int overr){ _clear(); _writeByte((byte)21); _writePad(1); _writePad(2); _writeInt(event); _writeInt(window); _writeInt(parent); _writeShort(x); _writeShort(y); _writeByte((byte)overr); _writePad(11); } void mkError(int code, int id, int minor, int major){ _clear(); _writeByte((byte)0); _writeByte((byte)code); _writePad(2); _writeInt(id); _writeShort(minor); _writeByte((byte)major); _writePad(21); } void mkDestroyNotify(int event, int window){ _clear(); _writeByte((byte)17); _writePad(1); _writePad(2); _writeInt(event); _writeInt(window); _writePad(20); } void mkEnterNotify(int detail, int root, int event, int child, int rootx, int rooty, int ex, int ey, int state, int mode, int sames_focus){ _clear(); _writeByte((byte)7); _writeByte((byte)detail); _writePad(2); _writeInt((int)System.currentTimeMillis()); _writeInt(root); _writeInt(event); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writeShort(ex); _writeShort(ey); // _writeShort(state); _writeShort(0); _writeByte((byte)mode); _writeByte((byte)sames_focus); } void mkLeaveNotify(int detail, int root, int event, int child, int rootx, int rooty, int ex, int ey, int state, int mode, int sames_focus){ _clear(); _writeByte((byte)8); _writeByte((byte)detail); _writePad(2); _writeInt((int)System.currentTimeMillis()); _writeInt(root); _writeInt(event); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writeShort(ex); _writeShort(ey); _writeShort(state); _writeByte((byte)mode); _writeByte((byte)sames_focus); } void mkClientMessage(int window, int typ){ _clear(); _writeByte((byte)33); _writePad(1); _writePad(2); _writeInt(window); _writeInt(typ); } void mkKeyPress(int detail, int root, int ev, int child, int rootx, int rooty, int ex, int ey, int state, int sames){ int i; index=0; event[index++]=(byte)2; event[index++]=(byte)detail; index+=2; i=(int)System.currentTimeMillis(); event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=root; event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=ev; event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=child; event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=rootx; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=rooty; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=ex; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=ey; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=state; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); event[index++]=(byte)sames; } void mkKeyRelease(int detail, int root, int ev, int child, int rootx, int rooty, int ex, int ey, int state, int sames){ int i; index=0; event[index++]=(byte)3; event[index++]=(byte)detail; index+=2; i=(int)System.currentTimeMillis(); event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=root; event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=ev; event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=child; event[index++]=(byte)((i>>24)&0xff); event[index++]=(byte)((i>>16)&0xff); event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=rootx; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=rooty; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=ex; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=ey; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); i=state; event[index++]=(byte)((i>>8)&0xff); event[index++]=(byte)(i&0xff); event[index++]=(byte)sames; } void mkNoExposure(int drawable, int minor, int major){ _clear(); _writeByte((byte)14); _writePad(1); _writePad(2); _writeInt(drawable); _writeShort(minor); _writeByte((byte)major); //_writePad(21); } void mkButtonPress(int detail, int root, int event, int child, int rootx, int rooty, int ex, int ey, int state, int sames){ _clear(); _writeByte((byte)4); _writeByte((byte)detail); _writePad(2); _writeInt((int)System.currentTimeMillis()); _writeInt(root); _writeInt(event); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writeShort(ex); _writeShort(ey); _writeShort(state); _writeByte((byte)sames); //_writePad(1); } void mkResizeRequest(int window, int w, int h){ _clear(); _writeByte((byte)25); _writePad(1); _writePad(2); _writeInt(window); _writeShort(w); _writeShort(h); //_writePad(20); } void mkCreateNotify(int parent, int window, int x, int y, int w, int h, int bw, int redirect){ _clear(); _writeByte((byte)16); _writePad(1); _writePad(2); _writeInt(parent); _writeInt(window); _writeShort(x); _writeShort(y); _writeShort(w); _writeShort(h); _writeShort(bw); _writeByte((byte)redirect); //_writePad(9); } void mkConfigureNotify(int window, int sibling, int x, int y, int w, int h, int bw, int redirect){ _clear(); _writeByte((byte)22); _writePad(1); _writePad(2); _writePad(4); _writeInt(window); _writeInt(sibling); _writeShort(x); _writeShort(y); _writeShort(w); _writeShort(h); _writeShort(bw); _writeByte((byte)redirect); //_writePad(5); } void mkConfigureRequest(int smode, int parent, int window, int sibling, int x, int y, int w, int h, int bw, int mask){ _clear(); _writeByte((byte)23); _writeByte((byte)smode); _writePad(2); _writeInt(parent); _writeInt(window); _writeInt(sibling); _writeShort(x); _writeShort(y); _writeShort(w); _writeShort(h); _writeShort(bw); _writeShort(mask); //_writePad(4); } void mkButtonRelease(int detail, int root, int event, int child, int rootx, int rooty, int ex, int ey, int state, int sames){ _clear(); _writeByte((byte)5); _writeByte((byte)detail); _writePad(2); _writeInt((int)System.currentTimeMillis()); _writeInt(root); _writeInt(event); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writeShort(ex); _writeShort(ey); _writeShort(state); _writeByte((byte)sames); //_writePad(1); } void mkMotionNotify(int detail, int root, int event, int child, int rootx, int rooty, int ex, int ey, int state, int sames){ _clear(); _writeByte((byte)6); _writeByte((byte)detail); _writePad(2); _writeInt((int)System.currentTimeMillis()); _writeInt(root); _writeInt(event); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writeShort(ex); _writeShort(ey); _writeShort(state); _writeByte((byte)sames); //_writePad(1); } void mkPointer(int type, int detail, int time, int child, int rootx, int rooty, int state, int mode, int flags){ index=0; _writeByte((byte)type); _writeByte((byte)detail); _writePad(2); _writeInt(time); _writePad(4); _writePad(4); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writePad(4); _writeShort(state); _writeByte((byte)mode); _writeByte((byte)flags); } void setPointer(int type, int detail, int time, int child, int rootx, int rooty, int state, int mode, int flags){ index=0; _writeByte((byte)type); _writeByte((byte)detail); _writePad(2); _writeInt(time); _writePad(8); _writeInt(child); _writeShort(rootx); _writeShort(rooty); _writePad(4); _writeShort(state); _writeByte((byte)mode); _writeByte((byte)flags); } void setType(byte bb){event[0]=bb;} byte getType(){return event[0];} void mkExpose(int id, int x, int y, int w, int h, int count){ _clear(); _writeByte((byte)12); _writePad(1); _writePad(2); _writeInt(id); _writeShort(x);_writeShort(y);_writeShort(w);_writeShort(h); _writeShort(count); //_writePad(14); } void mkGraphicsExposure(int id, int x, int y, int w, int h, int minorEvent, int count, int majorEvent){ _clear(); _writeByte((byte)13); _writePad(1); _writePad(2); _writeInt(id); _writeShort(x);_writeShort(y);_writeShort(w);_writeShort(h); _writeShort(minorEvent); _writeShort(count); _writeByte((byte)majorEvent); //_writePad(14); } void mkMapNotify(int window, int override){ _clear(); _writeByte((byte)19); _writePad(1); _writePad(2); _writeInt(window); //_writePad(4); _writeInt(window); _writeByte((byte)override); //_writePad(19); } void mkUnmapNotify(int window, int from){ _clear(); _writeByte((byte)18); _writePad(1); _writePad(2); _writePad(4); _writeInt(window); _writeByte((byte)from); //_writePad(19); } void mkMapRequest(int parent, int window){ _clear(); _writeByte((byte)20); _writePad(1); _writePad(2); _writeInt(parent); _writeInt(window); //_writePad(20); } byte[] sevent; void swapShort(){ byte i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; } void swapInt(){ byte i=event[index]; sevent[index]=event[index+3]; sevent[index+3]=i; i=event[index+1]; sevent[index+1]=event[index+2]; sevent[index+2]=i; index+=4; } private void _swapShort(){ byte i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; } private void _swapInt(){ byte i=event[index]; sevent[index]=event[index+3]; sevent[index+3]=i; i=event[index+1]; sevent[index+1]=event[index+2]; sevent[index+2]=i; index+=4; } void swap(byte[] b){ System.arraycopy(event, 0, b, 0, 32); sevent=b; swapaux(); } void swap(){ sevent=event; swapaux(); } private void swapaux(){ index=2; byte i; i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; i=(byte)((event[0]&~0x80)&0xff); switch(i){ case 0: _swapInt(); _swapShort(); break; case 2: case 3: case 4: case 5: case 6: case 7: case 8: i=event[index]; sevent[index]=event[index+3]; sevent[index+3]=i; i=event[index+1]; sevent[index+1]=event[index+2]; sevent[index+2]=i; index+=4; i=event[index]; sevent[index]=event[index+3]; sevent[index+3]=i; i=event[index+1]; sevent[index+1]=event[index+2]; sevent[index+2]=i; index+=4; i=event[index]; sevent[index]=event[index+3]; sevent[index+3]=i; i=event[index+1]; sevent[index+1]=event[index+2]; sevent[index+2]=i; index+=4; i=event[index]; sevent[index]=event[index+3]; sevent[index+3]=i; i=event[index+1]; sevent[index+1]=event[index+2]; sevent[index+2]=i; index+=4; i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; index+=2; i=event[index]; sevent[index]=event[index+1]; sevent[index+1]=i; break; case 9: case 10: _swapInt(); break; case 12: _swapInt(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); break; case 13: _swapInt(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); break; case 14: _swapInt(); _swapShort(); break; case 15: _swapInt(); break; case 16: _swapInt(); _swapInt(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); break; case 17: case 18: case 19: case 20: _swapInt(); _swapInt(); break; case 21: _swapInt(); _swapInt(); _swapInt(); _swapShort(); _swapShort(); break; case 22: _swapInt(); _swapInt(); _swapInt(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); break; case 23: _swapInt(); _swapInt(); _swapInt(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); _swapShort(); break; case 24: _swapInt(); _swapInt(); _swapShort(); _swapShort(); break; case 25: _swapInt(); _swapShort(); _swapShort(); break; case 26: case 27: case 28: case 29: _swapInt(); _swapInt(); _swapInt(); break; case 30: _swapInt(); _swapInt(); _swapInt(); _swapInt(); _swapInt(); _swapInt(); break; case 31: _swapInt(); _swapInt(); _swapInt(); _swapInt(); _swapInt(); break; case 32: _swapInt(); _swapInt(); break; case 33: _swapInt(); _swapInt(); // type switch(event[1]){ case 32: for(int ii=0; ii<5; ii++) _swapInt(); break; default: } break; default: // 11, 34 if(640){ load(foo.substring(start, end)); start=end+1; continue; } if(start0){ io.writePad((-n)&3); } io.flush(); } } static void reqQueryExtension(Client c) throws IOException{ int foo; int n; IO io=c.client; foo=c.length; n=io.readShort(); io.readPad(2); io.readByte(c.bbuffer, 0, n); io.readPad((-n) & 3); String name=new String(c.bbuffer, 0, n); synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(0); for(int i=0; i0){ loadCharSet(charset.substring(start, end)); start=end+1; continue; } if(start a*- for(int i=i1; i=b1.length || (b1[i1+1]!='-')){ return false; } } else if(b1[i1]=='0' && (i==7 || i==8 || i==9 || i==10 || i==11 || i==12)){ // scalable font!! if(b2[i2]<'0' || '9'=name.length)return 0; if('0'<=name[i] && name[i]<='9'){ while(i=name.length)return 0; if('0'<=name[i] && name[i]<='9'){ while(i0) size=(int)(size/10); } if(size==0){ i++; skip=3; while(i=name.length)return 0; if('0'<=name[i] && name[i]<='9'){ while(i0){ for(int i=0; i=count){ for(int i=0; i=count && count==0){ for(int i=0; i0){ for(int i=0; i0){ for(int i=0; i0){ for(int i=0; i=count){ for(int i=0; i=count && count==0){ for(int i=0; i0){ for (int i=0; i< aliases.length; i++){ if(match_aux(aliases[i].name, 0, pattern, 0)){ count--; io.writeByte(aliases[i].name.length); io.writeByte(aliases[i].name); if(count==0)break; } } } if(count>0){ for(int i=0; i0){ for(int i=0; i>8); src[1]=(byte)(i); encode(src, 0, 2, dst); w=(char)font.charWidth(dst[0]); io.writeShort(0); // left-side-bearing io.writeShort(w); // right-side-bearing io.writeShort(w); // character-width io.writeShort(ma); // ascent io.writeShort(md); // descent io.writeShort(0); // attribute } return; } } int encode(byte[] bbuffer, int start, int len, char[] cbuffer){ if(font.charset==null){ return 0; } return font.charset.encode(bbuffer, start, len, cbuffer); } } class Alias{ byte[] name; DDXFont font; Alias(byte[] n, DDXFont f){ this.name=n; this.font=f; } } weirdx-1.0.32/com/jcraft/weirdx/Font_CharSet.java0000644000175000017500000000213110035636316020262 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; interface Font_CharSet{ int getMinByte1(); int getMaxByte1(); int getMinCharOrByte2(); int getMaxCharOrByte2(); int getDefaultChar(); String getEncoding(); String getCharset(); void init(); int encode(byte[] bbuffer, int start, int len, char[] cbuffer); } weirdx-1.0.32/com/jcraft/weirdx/Font_CharSet_FONTSPECIFIC.java0000644000175000017500000001112010035636325022214 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 2000-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; class Font_CharSet_FONTSPECIFIC implements Font_CharSet{ private static char[] map={ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007, 0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f, 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017, 0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f, 0x0020,0x0021,0x2200,0x0023,0x2203,0x0025,0x0026,0x220d, 0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f, 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037, 0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f, 0x2245,0x0391,0x0392,0x03a7,0x0394,0x0395,0x03a6,0x0393, 0x0397,0x0399,0x03d1,0x039a,0x039b,0x039c,0x039d,0x039f, 0x03a0,0x0398,0x03a1,0x03a3,0x03a4,0x03a5,0x03c2,0x03a9, 0x039e,0x03a8,0x0396,0x005b,0x2234,0x005d,0x22a5,0x005f, 0x0020,0x03b1,0x03b2,0x03c7,0x03b4,0x03b5,0x03d5,0x03b3, 0x03b7,0x03b9,0x03c6,0x03ba,0x03bb,0x03bc,0x03bd,0x03bf, 0x03c0,0x03b8,0x03c1,0x03c3,0x03c4,0x03c5,0x03d6,0x03c9, 0x03be,0x03c8,0x03b6,0x007b,0x007c,0x007d,0x007e,0x007f, 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087, 0x0088,0x0089,0x008a,0x008b,0x008c,0x008d,0x008e,0x008f, 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097, 0x0098,0x0099,0x009a,0x009b,0x009c,0x009d,0x009e,0x009f, 0x00a0,0x03d2,0x0374,0x2264,0x2215,0x221e,0x2231,0x2663, 0x2666,0x2665,0x2660,0x2194,0x2190,0x2191,0x2192,0x2193, 0x2218,0x00b1,0x0022,0x2265,0x00d7,0x221d,0x2202,0x2219, 0x00f7,0x2260,0x2261,0x2248,0x22ef,0x2223,0x2212,0x21b2, 0x2135,0x2111,0x211c,0x2118,0x2297,0x2295,0x2205,0x22c2, 0x22c3,0xcc83,0x2287,0x2284,0x2282,0x2286,0x2208,0x2209, 0x2220,0x22bd,0x00ae,0x00a9,0x2122,0x220f,0x221a,0x22c5, 0x00ac,0x2227,0x2228,0x21d4,0x21d0,0x21d1,0x21d2,0x21d3, 0x226c,0x2329,0x00ae,0x00a9,0x2122,0x2211,0x0020,0x0020, // ?? 0x0020,0x0020,0x0020,0x230a,0x0020,0x0020,0x0020,0x0020, // ?? 0x0020,0x2328,0x222b,0x2308,0x0020,0x0020,0x0020,0x0020, // ?? 0x0020,0x0020,0x0020,0x230b,0x0020,0x0020,0x0020,0x0020 // ?? }; static int min_byte1=0; static int max_byte1=0; static int min_char_or_byte2=0x20; static int max_char_or_byte2=0xff; static int default_char=0x20; static String encoding="unknown"; static String charset="fontspecific"; public int getMinByte1(){return min_byte1;} public int getMaxByte1(){return max_byte1;} public int getMinCharOrByte2(){return min_char_or_byte2;} public int getMaxCharOrByte2(){return max_char_or_byte2;} public int getDefaultChar(){return default_char;} public String getEncoding(){return encoding;} public String getCharset(){return charset;} private static String[] _flist={ "-misc-nil-medium-r-normal--2-20-75-75-c-10-misc-fontspecific" }; private static String[] _flist_scalable={ "-misc-nil-medium-r-normal--0-0-75-75-c-0-misc-fontspecific" }; private static String[] _flist_scalable_proportional={ "-adobe-symbol-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific" }; private static String[] _aliases={ }; public void init(){ if(_flist==null)return; Font.addFont(_flist); _flist=null; Font.addFont(_flist_scalable); _flist_scalable=null; Font.addFont(_flist_scalable_proportional); _flist_scalable_proportional=null; Font.addAlias(_aliases); } public int encode(byte[] bbuffer, int start, int len, char[] cbuffer){ //System.out.println("encode: start="+start+","+len); //for(int ii=start; ii0){ io.readPad(n); } gc.time=0; } static void reqSetClipRectangles(Client c) throws IOException{ int foo, ordering; int n; IO io=c.client; ordering=c.data; n=c.length; foo=io.readInt(); c.length-=2; GC gc=c.lookupGC(foo); if(gc==null){ c.errorValue=foo; c.errorReason=13; // GC return; } gc.clip_x_origin=io.readShort(); gc.clip_y_origin=io.readShort(); c.length--; short x, y; int w, h; n=n-3; ClipRectangles cr=null; if(gc.clip_mask!=null){ if(gc.clip_mask instanceof ClipPixmap){ try{((Pixmap)(gc.clip_mask.getMask())).delete();} catch(Exception e){} gc.clip_mask=null; } } if(cr==null){ cr=new ClipRectangles(ordering, n/2); gc.clip_mask=cr; } while(n!=0){ x=(short)io.readShort(); y=(short)io.readShort(); w=io.readShort(); h=io.readShort(); n-=2; cr.add(x, y, w, h); } cr.validate(); c.length=0; } static void reqFreeGC(Client c) throws IOException{ int foo; IO io=c.client; foo=io.readInt(); c.length-=2; GC gc=c.lookupGC(foo); if(gc==null){ c.errorValue=foo; c.errorReason=13; // GC return; } Resource.freeResource(foo, Resource.RT_NONE); } void delete() throws IOException{ dash=null; if(stipple!=null){ try{stipple.delete();}catch(Exception e){} stipple=null; } if(clip_mask!=null){ try{ if(clip_mask instanceof ClipPixmap){ ((Pixmap)(clip_mask.getMask())).delete(); } }catch(Exception e){} clip_mask=null; } if(tile.pixmap!=null){ try{tile.pixmap.delete();}catch(Exception e){} tile.pixmap=null; tile=null; } put(this); } static void reqCopyGC(Client c) throws IOException{ int foo; IO io=c.client; foo=io.readInt(); c.length-=2; GC srcgc=c.lookupGC(foo); if(srcgc==null){ c.errorValue=foo; c.errorReason=13; // GC return; } foo=io.readInt(); c.length--; GC dstgc=c.lookupGC(foo); if(dstgc==null){ c.errorValue=foo; c.errorReason=13; // GC return; } int msk=io.readInt(); c.length--; msk&=0x7fffff; dstgc.copyAttr(c, msk, srcgc); } static void reqChangeGC(Client c) throws IOException{ int foo; int n; IO io=c.client; n=c.length; foo=io.readInt(); c.length-=2; GC gc=c.lookupGC(foo); if(gc==null){ c.errorValue=foo; c.errorReason=13; // GC return; } foo=io.readInt(); c.length--; foo&=0x7fffff; if(foo!=0){ gc.changeAttr(c, foo); } } static void reqCreateGC(Client c) throws IOException{ int foo; IO io=c.client; int cid=io.readInt(); foo=io.readInt(); c.length-=3; Drawable d=c.lookupDrawable(foo); if(d==null){ c.errorValue=foo; c.errorReason=9; // Drawable return; } int mask=io.readInt(); c.length--; GC gc=getGC(cid, d); mask&=0x7fffff; if(mask!=0){ gc.changeAttr(c, mask); } Resource.add(gc); } private void copyAttr(Client c, int vmask, GC srcgc) throws IOException{ int index=0; int foo; int mask=vmask; while(mask!=0){ index=lowbit(mask); mask&=~index; switch(index){ case GCFunction: function=(byte)srcgc.function; break; case GCPlaneMask: break; case GCForeground: fgPixel=srcgc.fgPixel; if((attr&tileIsPixel)==0 && tile.pixmap==null){ attr|=tileIsPixel; tile.pixel=fgPixel; } break; case GCBackground: bgPixel=srcgc.bgPixel; break; case GCLineWidth: lineWidth=srcgc.lineWidth; break; case GCLineStyle: attr&=~lineStyle; attr|=(srcgc.attr&lineStyle); break; case GCCapStyle: attr&=~capStyle; attr|=(srcgc.attr&capStyle); break; case GCJoinStyle: attr&=~joinStyle; attr|=(srcgc.attr&joinStyle); break; case GCFillStyle: attr&=~fillStyle; attr|=(srcgc.attr&fillStyle); break; case GCFillRule: attr&=~fillRule; attr|=(srcgc.attr&fillRule); break; case GCTile: // tile=srcgc.tile; if((srcgc.attr&tileIsPixel)!=0){ tile.pixel=srcgc.tile.pixel; } else{ tile.pixmap=srcgc.tile.pixmap; } break; case GCStipple: if(stipple!=null){ try{stipple.delete();}catch(Exception e){} stipple=null; } stipple=srcgc.stipple; if(stipple!=null){ stipple.ref(); } break; case GCTileStipXOrigin: tile_stipple_x_origin=srcgc.tile_stipple_x_origin; break; case GCTileStipYOrigin: tile_stipple_y_origin=srcgc.tile_stipple_y_origin; break; case GCFont: font=srcgc.font; break; case GCSubwindowMode: attr&=~subWindowMode; attr|=(srcgc.attr&subWindowMode); break; case GCGraphicsExposures: attr&=~graphicsExposures; attr|=(srcgc.attr&graphicsExposures); break; case GCClipXOrigin: clip_x_origin=srcgc.clip_x_origin; break; case GCClipYOrigin: clip_y_origin=srcgc.clip_y_origin; break; case GCClipMask: if(clip_mask!=null){ try{ if(clip_mask instanceof ClipPixmap){ ((Pixmap)(clip_mask.getMask())).delete(); } }catch(Exception e){} clip_mask=null; } clip_mask=srcgc.clip_mask; if(clip_mask!=null){ if(clip_mask instanceof ClipPixmap){ ((Pixmap)(clip_mask.getMask())).ref(); } } break; case GCDashOffset: dash_phase=srcgc.dash_phase; break; case GCDashList: dash=srcgc.dash; if(dash!=null){ float[] bar=new float[dash.length]; System.arraycopy(dash, 0, bar, 0, bar.length); dash=bar; } break; case GCArcMode: // not implemented break; default: c.errorValue=vmask; c.errorReason=2; // BadValue; } if(c.errorReason!=0){ return; } } if(c.length!=0){ c.errorValue=vmask; c.errorReason=2; // BadValue; } else{ time=c.seq; } } private void changeAttr(Client c, int vmask) throws IOException{ int index=0; int foo; int mask=vmask; IO io=c.client; while(mask!=0){ index=lowbit(mask); mask&=~index; c.length--; switch(index){ case GCFunction: foo=io.readInt(); foo&=0xff; function=(byte)foo; break; case GCPlaneMask: foo=io.readInt(); break; case GCForeground: foo=io.readInt(); fgPixel=foo; if((attr&tileIsPixel)==0 && tile.pixmap==null){ attr|=tileIsPixel; tile.pixel=fgPixel; } // fgPixel&=0xff; // depth 8 break; case GCBackground: bgPixel=io.readInt(); // bgPixel&=0xff; // depth 8 break; case GCLineWidth: foo=io.readInt(); foo&=0xffff; if(foo==0) foo=1; lineWidth=(short)foo; break; case GCLineStyle: foo=io.readInt(); foo&=0xff; foo=(foo<>lineStyleOffset; c.errorReason=2; // BadValue break; } attr&=~lineStyle; attr|=foo; break; case GCCapStyle: foo=io.readInt(); foo&=0xff; foo=(foo<>capStyleOffset; c.errorReason=2; // BadValue break; } attr|=foo; break; case GCJoinStyle: foo=io.readInt(); foo&=0xff; foo=(foo<>joinStyleOffset; c.errorReason=2; // BadValue break; } attr|=foo; break; case GCFillStyle: foo=io.readInt(); foo&=0xff; attr=(attr&~fillStyle)|(foo<>1; } return result; } static private GC getGC(int id, Drawable d){ GC gc=get(); if(gc==null){ return new GC(id, d);} gc.id=id; gc.drawable=d; gc.init(); return gc; } static private GC pool[]=new GC[32]; static private boolean full=false; static private synchronized GC get(){ GC tmp=null; if(full) full=false; for(int i=0; i<32; i++){ if(pool[i]!=null){ tmp=pool[i]; pool[i]=null; break;} } return tmp; } static private synchronized void put(GC gc){ if(full) return; for(int i=0; i<32; i++){ if(pool[i]==null){ pool[i]=gc; return; } } full=true; } } weirdx-1.0.32/com/jcraft/weirdx/Grab.java0000644000175000017500000001437610035636374016640 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.*; final class Grab extends Resource{ static final int ownerEvents=(1<<0); static final int keyboardMode=(1<<1); static final int pointerMode=(1<<2); static final int coreGrab=(1<<3); static final int coreMods=(1<<4); private static final int NotifyGrab=1; Grab(int id){ super(id, Resource.RT_PASSIVEGRAB); modifiersDetail=new Detail(); detail=new Detail(); enable(); } private boolean enable=false; boolean isEnabled(){return enable;} void enable(){enable=true;} void disable(){ enable=false; attr=0; eventMask=0; } boolean sameClient(Client c){ return ((resource & CLIENTMASK)==c.clientAsMask); } void set(int resource, Window window, int oevents, int emask, int kmode, int pmode, Window confineto){ this.resource=resource; this.window=window; this.attr=0; this.attr|=(oevents!=0?ownerEvents:0); this.eventMask=emask; this.attr|=(kmode!=0?keyboardMode:0); this.attr|=(pmode!=0?pointerMode:0); this.confineTo=confineto; } Grab next; int resource; Window window; int attr; int type; Detail modifiersDetail; Detail detail; Window confineTo; int eventMask; Client getClient(){ return Client.clients[((resource & Client.CLIENTMASK) >> Client.CLIENTOFFSET)]; } static Grab createGrab(Client c, Window gw, int emask, int oe, int kmode, int pmode, int mod, int type, int button, Window cto){ Grab grab=new Grab(Resource.fakeClientId(c)); grab.resource=grab.id; grab.window=gw; grab.eventMask=emask; grab.attr|=(oe!=0?ownerEvents:0); grab.attr|=(kmode!=0?keyboardMode:0); grab.attr|=(pmode!=0?pointerMode:0); grab.modifiersDetail.exact=mod; grab.modifiersDetail.pMask=null; grab.type=type; grab.detail.exact=button; grab.detail.pMask=null; grab.confineTo=cto; return grab; } void freeGrab(){ } boolean grabSupersedesSecond(Grab pSecondGrab){ if (!modifiersDetail.detailSupersedesSecond(pSecondGrab.modifiersDetail, Window.AnyModifier)) return false; if (detail.detailSupersedesSecond(pSecondGrab.detail, Window.AnyKey)) return true; return false; } boolean grabMatchesSecond(Grab pSecondGrab){ if (type !=pSecondGrab.type) return false; if (grabSupersedesSecond(pSecondGrab) || pSecondGrab.grabSupersedesSecond(this)) return true; if (pSecondGrab.detail.detailSupersedesSecond(detail, Window.AnyKey) && modifiersDetail.detailSupersedesSecond(pSecondGrab.modifiersDetail, Window.AnyModifier)) return true; if (detail.detailSupersedesSecond(pSecondGrab.detail, Window.AnyKey) && pSecondGrab.modifiersDetail.detailSupersedesSecond(modifiersDetail, Window.AnyModifier)) return true; return false; } int addPassiveGrabToList(){ for (Grab grab=window.getPassiveGrabs(); grab!=null; grab=grab.next){ if (grabMatchesSecond(grab)) { if ((resource & CLIENTMASK) != (grab.resource & CLIENTMASK)){ freeGrab(); return 0; } } } window.makeOptional(); next=window.optional.passiveGrabs; window.optional.passiveGrabs=this; Resource.add(this); return 1; } static void deactivatePointerGrab() throws IOException { Window.enter_leaveEvent(Window.grab.window, Window.sprite.win, NotifyGrab); Window.grab=null; } void activatePointerGrab(int time, boolean autoGrab) throws IOException { Window oldWin=(Window.grab!=null) ? Window.grab.window : Window.sprite.win; Window.enter_leaveEvent(oldWin, window, NotifyGrab); Window.grab=this; } boolean deletePassiveGrabFromList(){ Grab grab; int i=0; for (grab=window.getPassiveGrabs(); grab!=null; grab=grab.next){ i++; } if (i==0){ return true; } Grab[] deletes=new Grab[i]; int ndels=0; int nadds=0; int nups=0; boolean ok=true; for (grab=window.getPassiveGrabs(); grab!=null && ok; grab=grab.next){ if (((grab.resource & CLIENTMASK)!=(resource & CLIENTMASK)) || !grab.grabMatchesSecond(this)){ continue; } if (grabSupersedesSecond(grab)){ deletes[ndels++]=grab; } } if (!ok){ } else { for (i=0; i < ndels; i++){ Resource.freeResource(deletes[i].id, RT_NONE); } } return ok; } void delete() throws IOException{ Grab prev=null; for (Grab g=window.getPassiveGrabs(); g!=null; g=g.next){ if (this==g) { if (prev!=null){ prev.next=g.next; } else{ window.optional.passiveGrabs=g.next; break; } prev=g; } } } } class Detail { int exact; byte[] pMask=null; boolean isInGrabMask(Detail secondDetail, int exception){ if (exact==exception){ if (pMask==null) return true; if (secondDetail.exact==exception) return false; if ((pMask[secondDetail.exact>>5] & (secondDetail.exact<<31))!=0) return true; } return false; } static boolean identicalExactDetails(int firstExact, int secondExact, int exception){ if ((firstExact==exception) || (secondExact==exception)) return false; if (firstExact==secondExact) return true; return false; } boolean detailSupersedesSecond(Detail secondDetail,int exception){ if (isInGrabMask(secondDetail, exception)) return true; if (identicalExactDetails(exact, secondDetail.exact, exception)) return true; return false; } } weirdx-1.0.32/com/jcraft/weirdx/IO.java0000644000175000017500000001016310035636407016257 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.util.*; abstract class IO{ InputStream in=null; OutputStream out=null; byte[] inbuffer=new byte[1024]; byte[] outbuffer=new byte[1024]; int instart=0, inend=0, outindex=0, inrest=0; byte[] ba; byte[] sa; byte[] ia; IO(){ ba=new byte[1]; sa=new byte[2]; ia=new byte[8]; } abstract int readShort() throws java.io.IOException; abstract int readInt() throws java.io.IOException; abstract void writeShort(int val) throws java.io.IOException; abstract void writeInt(int val) throws java.io.IOException; void setInputStream(InputStream in){this.in=in; } void setOutputStream(OutputStream out){ this.out=out; } int available() throws java.io.IOException{ if(0 0){ if(inrestinbuffer.length){ n=inbuffer.length; } instart=inend=0; int i; while(true){ i=in.read(inbuffer, inend, inbuffer.length-inend); if(i==-1){ throw new java.io.IOException(); } inend+=i; if(n<=inend)break; } inrest=inend-instart; } void writeByte(byte val) throws java.io.IOException{ if((outbuffer.length-outindex)<1){ flush(); } outbuffer[outindex++]=val; } void writeByte(int val) throws java.io.IOException{ writeByte((byte)val); } void writeByte(byte[] array) throws java.io.IOException{ writeByte(array, 0, array.length); } void writeByte(byte[] array, int begin, int length) throws java.io.IOException{ if(length<=0) return; int i=0; while(true){ if((i=(outbuffer.length-outindex))> 8)&0xff); } void writeInt(int val) throws java.io.IOException{ if((outbuffer.length-outindex)<4){ flush(); } outbuffer[outindex++]=(byte)((val) & 0xff); outbuffer[outindex++]=(byte)((val >> 8) & 0xff); outbuffer[outindex++]=(byte)((val >> 16) & 0xff); outbuffer[outindex++]=(byte)((val >> 24) & 0xff); } } weirdx-1.0.32/com/jcraft/weirdx/IOMSB.java0000644000175000017500000000357010035636425016625 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.util.*; final class IOMSB extends IO { int readShort() throws java.io.IOException{ if((inrest)<2){ read(2); } inrest-=2; int s=inbuffer[instart++]&0xff; s=((s<<8)&0xffff)|(inbuffer[instart++]&0xff); return s; } int readInt() throws java.io.IOException{ if((inrest)<4){ read(4); } inrest-=4; int i=inbuffer[instart++]&0xff; i=((i<<8)&0xffff)|(inbuffer[instart++]&0xff); i=((i<<8)&0xffffff)|(inbuffer[instart++]&0xff); i=(i<<8)|(inbuffer[instart++]&0xff); return i; } void writeShort(int val) throws java.io.IOException{ if((outbuffer.length-outindex)<2){ flush(); } outbuffer[outindex++]=(byte)((val >> 8)&0xff); outbuffer[outindex++]=(byte)(val&0xff); } void writeInt(int val) throws java.io.IOException{ if((outbuffer.length-outindex)<4){ flush(); } outbuffer[outindex++]=(byte)((val >> 24) & 0xff); outbuffer[outindex++]=(byte)((val >> 16) & 0xff); outbuffer[outindex++]=(byte)((val >> 8) & 0xff); outbuffer[outindex++]=(byte)((val) & 0xff); } } weirdx-1.0.32/com/jcraft/weirdx/Keyboard.java0000644000175000017500000001172010035636433017507 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; final class Keyboard { static Keyboard keyboard=null; public int minKeyCode; public int maxKeyCode; int keysyms_per_keycode; int keysym[]; static final int noSymbol=0; public int keysym(int key, int n) { if (n < keysyms_per_keycode) return keysym[(key - minKeyCode)*keysyms_per_keycode + n]; return noSymbol; } public int group1(int key, int n) { return keysym(key, n); } public int group2(int key, int n) { if (keysyms_per_keycode < 3) return keysym(key, n); return keysym(key, n+2); } Keyboard(int minKeyCode, int maxKeyCode){ this.minKeyCode=minKeyCode; this.maxKeyCode=maxKeyCode; } void writeByte(IO out) throws java.io.IOException{ out.writeByte(minKeyCode); out.writeByte(maxKeyCode); } public void getMap() { int length=maxKeyCode - minKeyCode + 1; } // void print(PrintStream out) { // out.println("minKeyCode = " + minKeyCode); // out.println("maxKeyCode = " + maxKeyCode); // } void led(int number, int value) { } void bell(int volume) { } static void reqGrabKeyboard(Client c) throws IOException{ int foo, n; IO io=c.client; foo=c.data; foo=c.length; foo=io.readInt(); foo=io.readInt(); foo=io.readByte(); foo=io.readByte(); io.readPad(2); synchronized(io){ io.writeByte(1); io.writeByte(0); io.writeShort(c.seq); io.writeInt(0); io.writePad(24); io.flush(); } } static void reqGetKeyboardControl(Client c) throws IOException{ int foo, n; IO io=c.client; foo=c.length; synchronized(io){ io.writeByte(1); io.writeByte((byte)1); io.writeShort(c.seq); io.writeInt(5); io.writeInt(0); // led-mask io.writeByte((byte)0); // key-click-percent io.writeByte((byte)50); // bell-percent io.writeShort(400); // bell-pitch io.writeShort(100); // bell-duration io.writePad(2); for(int i=0; i<8; i++){ io.writeInt(0); } io.flush(); } } static void reqQueryKeymap(Client c) throws IOException{ int foo, n; IO io=c.client; foo=c.length; synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(2); for(int i=0; i<8;i++){ io.writeInt(0); } io.flush(); } } static void reqChangeKeyboardMapping(Client c) throws IOException{ int foo, n; IO io=c.client; n=c.length; int first=io.readByte(); int kpk=io.readByte(); io.readPad(2); n-=2; int i=(first-Keymap.km.start)*Keymap.km.width; while(n!=0){ foo=io.readInt(); if(kpk==1){ Keymap.km.map[i]=foo; } n--; } } static void reqGetKeyboardMapping(Client c) throws IOException{ int n; int foo; IO io=c.client; int i=io.readByte(); foo=io.readByte(); io.readPad(2); synchronized(io){ io.writeByte(1); io.writeByte(Keymap.km.width); io.writeShort(c.seq); io.writeInt(foo*Keymap.km.width); io.writePad(24); int ii=(i-Keymap.km.start)*Keymap.km.width; n=foo*Keymap.km.width; while(n!=0){ io.writeInt(Keymap.km.map[ii]); n--; ii++; } io.flush(); } } static void reqSetModifierMapping(Client c) throws IOException{ int foo, n; IO io=c.client; int kpm=c.data; n=c.length; n=n-1; int i=0; while(n!=0){ foo=io.readInt(); n--; } synchronized(io){ io.writeByte(1); io.writeByte(0); io.writeShort(c.seq); io.writeInt(0); io.writePad(24); io.flush(); } } static void reqGetModifierMapping(Client c) throws IOException{ int n; int foo; IO io=c.client; Keymodifier kmod=null; synchronized(io){ io.writeByte(1); io.writeByte(Keymodifier.kmod.width); io.writeShort(c.seq); io.writeInt(Keymodifier.kmod.width*2); io.writePad(24); n=Keymodifier.kmod.width*8; int ii=0; while(n!=0){ io.writeByte(Keymodifier.kmod.keys[ii]); ii++; n--; } io.flush(); } } } weirdx-1.0.32/com/jcraft/weirdx/Keycode.java0000644000175000017500000000475010035636440017335 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.event.KeyEvent; final class Keycode { static byte keycode[]; static{ keycode=new byte[256]; keycode['A']=keycode['a']=keycode[0x01]=38; keycode['S']=keycode['s']=39; keycode['D']=keycode['d']=40; keycode['F']=keycode['f']=41; keycode['G']=keycode['g']=42; keycode['H']=keycode['h']=43; keycode['J']=keycode['j']=44; keycode['K']=keycode['k']=45; keycode['L']=keycode['l']=46; keycode['Q']=keycode['q']=24; keycode['W']=keycode['w']=25; keycode['E']=keycode['e']=26; keycode['R']=keycode['r']=27; keycode['T']=keycode['t']=28; keycode['Y']=keycode['y']=29; keycode['U']=keycode['u']=30; keycode['I']=keycode['i']=31; keycode['O']=keycode['o']=32; keycode['P']=keycode['p']=33; keycode['Z']=keycode['z']=52; keycode['X']=keycode['x']=53; keycode['C']=keycode['c']=54; keycode['V']=keycode['v']=55; keycode['B']=keycode['b']=56; keycode['N']=keycode['n']=57; keycode['M']=keycode['m']=58; keycode['<']=keycode[',']=59; keycode['>']=keycode['.']=60; keycode['?']=keycode['/']=61; keycode['_']=keycode['\\']=123; keycode['1']=keycode['!']=10; keycode['2']=keycode['"']=11; keycode['3']=keycode['#']=12; keycode['4']=keycode['$']=13; keycode['5']=keycode['%']=14; keycode['6']=keycode['&']=15; keycode['7']=keycode['\'']=16; keycode['8']=keycode['(']=17; keycode['9']=keycode[')']=18; keycode['0']=keycode['~']=19; keycode['-']=keycode['=']=20; keycode[' ']=65; keycode['/']=61; keycode[16]=50; keycode[17]=66; keycode[8]=22; // ^H keycode[KeyEvent.VK_ENTER]=36; } } weirdx-1.0.32/com/jcraft/weirdx/Keymap.java0000644000175000017500000001364010035636446017204 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.event.KeyEvent; import java.net.*; class Keymap implements Serializable{ static Keymap km=null; int start; int width; int count; int[] map; static byte state=0; Keymap(){ } Keymap(int start, int width, int count){ this.start=start; this.width=width; this.count=count; map=new int[count*width]; } int getCode(KeyEvent e){ if(e.isShiftDown()) state|=1; if(e.isControlDown()) state|=4; if(e.isAltDown()) state|=8; int key=e.getKeyCode(); if(key!=0){ switch(key){ case KeyEvent.VK_A: case KeyEvent.VK_B: case KeyEvent.VK_C: case KeyEvent.VK_D: case KeyEvent.VK_E: case KeyEvent.VK_F: case KeyEvent.VK_G: case KeyEvent.VK_H: case KeyEvent.VK_I: case KeyEvent.VK_J: case KeyEvent.VK_K: case KeyEvent.VK_L: case KeyEvent.VK_M: case KeyEvent.VK_N: case KeyEvent.VK_O: case KeyEvent.VK_P: case KeyEvent.VK_Q: case KeyEvent.VK_R: case KeyEvent.VK_S: case KeyEvent.VK_T: case KeyEvent.VK_U: case KeyEvent.VK_V: case KeyEvent.VK_W: case KeyEvent.VK_X: case KeyEvent.VK_Y: case KeyEvent.VK_Z: key=key+0x20; break; case KeyEvent.VK_0: case KeyEvent.VK_1: case KeyEvent.VK_2: case KeyEvent.VK_3: case KeyEvent.VK_4: case KeyEvent.VK_5: case KeyEvent.VK_6: case KeyEvent.VK_7: case KeyEvent.VK_8: case KeyEvent.VK_9: break; case KeyEvent.VK_ENTER: key=0xff0d; break; case KeyEvent.VK_BACK_SPACE: key=0xff08; break; case KeyEvent.VK_TAB: key=0xff09; break; // case KeyEvent.VK_CANCEL: // key=0xff69; // break; // case KeyEvent.VK_CLEAR: // key=0xff0b; // break; case KeyEvent.VK_COMMA: case KeyEvent.VK_PERIOD: case KeyEvent.VK_SLASH: case KeyEvent.VK_SEMICOLON: case KeyEvent.VK_EQUALS: case KeyEvent.VK_OPEN_BRACKET: case KeyEvent.VK_BACK_SLASH: case KeyEvent.VK_CLOSE_BRACKET: case KeyEvent.VK_SPACE: break; case KeyEvent.VK_BACK_QUOTE: key=0x60; break; case KeyEvent.VK_QUOTE: key=0x27; break; case KeyEvent.VK_SHIFT: key=0xffe1; break; case KeyEvent.VK_CONTROL: key=0xffe3; break; case KeyEvent.VK_ALT: key=0xffe9; break; case KeyEvent.VK_PAUSE: key=0xff13; break; case KeyEvent.VK_CAPS_LOCK: key=0xffe5; break; case KeyEvent.VK_ESCAPE: key=0xff1b; break; case KeyEvent.VK_PAGE_UP: key=0xff55; break; case KeyEvent.VK_PAGE_DOWN: key=0xff56; break; case KeyEvent.VK_END: key=0xff57; break; case KeyEvent.VK_HOME: key=0xff50; break; case KeyEvent.VK_LEFT: key=0xff51; break; case KeyEvent.VK_UP: key=0xff52; break; case KeyEvent.VK_RIGHT: key=0xff53; break; case KeyEvent.VK_DOWN: key=0xff54; break; case KeyEvent.VK_NUMPAD0: key=0xffb0; break; case KeyEvent.VK_NUMPAD1: key=0xffb1; break; case KeyEvent.VK_NUMPAD2: key=0xffb2; break; case KeyEvent.VK_NUMPAD3: key=0xffb3; break; case KeyEvent.VK_NUMPAD4: key=0xffb4; break; case KeyEvent.VK_NUMPAD5: key=0xffb5; break; case KeyEvent.VK_NUMPAD6: key=0xffb6; break; case KeyEvent.VK_NUMPAD7: key=0xffb7; break; case KeyEvent.VK_NUMPAD8: key=0xffb8; break; case KeyEvent.VK_NUMPAD9: key=0xffb9; break; case KeyEvent.VK_MULTIPLY: key=0xffaa; break; case KeyEvent.VK_ADD: key=0xffab; break; case KeyEvent.VK_SEPARATER: key=0xffac; break; case KeyEvent.VK_SUBTRACT: key=0xffad; break; case KeyEvent.VK_DECIMAL: key=0xffae; break; case KeyEvent.VK_DIVIDE: key=0xffaf; break; case KeyEvent.VK_F1: key=0xffbe; break; case KeyEvent.VK_F2: key=0xffbf; break; case KeyEvent.VK_F3: key=0xffc0; break; case KeyEvent.VK_F4: key=0xffc1; break; case KeyEvent.VK_F5: key=0xffc2; break; case KeyEvent.VK_F6: key=0xffc3; break; case KeyEvent.VK_F7: key=0xffc4; break; case KeyEvent.VK_F8: key=0xffc5; break; case KeyEvent.VK_F9: key=0xffc6; break; case KeyEvent.VK_F10: key=0xffc7; break; case KeyEvent.VK_F11: key=0xffc8; break; case KeyEvent.VK_F12: key=0xffc9; break; case KeyEvent.VK_DELETE: key=0xffff; break; case KeyEvent.VK_NUM_LOCK: key=0xff7f; break; case KeyEvent.VK_SCROLL_LOCK: key=0xff14; break; case KeyEvent.VK_PRINTSCREEN: key=0xff61; break; case KeyEvent.VK_INSERT: key=0xff63; break; case KeyEvent.VK_HELP: key=0xff6a; break; case KeyEvent.VK_META: key=0xffe7; break; // case KeyEvent.VK_KP_UP: // key=0xff97; break; // case KeyEvent.VK_KP_DOWN: // key=0xff99; break; // case KeyEvent.VK_KP_LEFT: // key=0xff96; break; // case KeyEvent.VK_KP_RIGHT: // key=0xff98; break; default: key=e.getKeyChar(); } } else{ key=e.getKeyChar(); } int s=10; if(km!=null){ int i=0; int j=0; s=km.start; while(i * */ package com.jcraft.weirdx; import java.io.*; import java.awt.event.KeyEvent; import java.net.*; final class Keymap_de extends Keymap{ private static final int VK_ALT_GRAPH = 0x15; private int[] _map={ 0x0, 0x0, 0x0, 0x0, // 8 0xff1b, 0x0, 0x0, 0x0, // 9 (Escape) 0x0031, 0x0021, 0x00b9, 0x00a1, // 10 (1) (exclam) (onesuperior) (exclamdown) 0x0032, 0x0022, 0x00b2, 0x0ac3, // 11 (2) (quotedbl) (twosuperior) (oneeighth) 0x0033, 0x00a7, 0x00b3, 0x00a3, // 12 (3) (section) (threesuperior) (sterling) 0x0034, 0x0024, 0x00bc, 0x00a4, // 13 (4) (dollar) (onequarter) (currency) 0x0035, 0x0025, 0x00bd, 0x0ac4, // 14 (5) (percent) (onehalf) (threeeighths) 0x0036, 0x0026, 0x00be, 0x0ac5, // 15 (6) (ampersand) (threequarters) (fiveeighths) 0x0037, 0x002f, 0x007b, 0x0ac6, // 16 (7) (slash) (braceleft) (seveneighths) 0x0038, 0x0028, 0x005b, 0x0ac9, // 17 (8) (parenleft) (bracketleft) (trademark) 0x0039, 0x0029, 0x005d, 0x00b1, // 18 (9) (parenright) (bracketright) (plusminus) 0x0030, 0x003d, 0x007d, 0x00b0, // 19 (0) (equal) (braceright) (degree) 0x00df, 0x003f, 0x005c, 0x00bf, // 20 (ssharp) (question) (backslash) (questiondown) 0xfe51, 0xfe50, 0xfe5b, 0xfe5c, // 21 (dead_acute) (dead_grave) (dead_cedilla) (dead_ogonek) 0xff08, 0x0, 0x0, 0x0, // 22 (BackSpace) 0xff09, 0xfe20, 0x0, 0x0, // 23 (Tab) (ISO_Left_Tab) 0x0071, 0x0051, 0x0040, 0x07d9, // 24 (q) (Q) (at) (Greek_OMEGA) 0x0077, 0x0057, 0x01b3, 0x01a3, // 25 (w) (W) (lstroke) (Lstroke) 0x0065, 0x0045, 0x20ac, 0x0, // 26 (e) (E) (EuroSign) 0x0072, 0x0052, 0x00b6, 0x00ae, // 27 (r) (R) (paragraph) (registered) 0x0074, 0x0054, 0x03bc, 0x03ac, // 28 (t) (T) (tslash) (Tslash) 0x007a, 0x005a, 0x08fb, 0x00a5, // 29 (z) (Z) (leftarrow) (yen) 0x0075, 0x0055, 0x08fe, 0x08fc, // 30 (u) (U) (downarrow) (uparrow) 0x0069, 0x0049, 0x08fd, 0x02b9, // 31 (i) (I) (rightarrow) (idotless) 0x006f, 0x004f, 0x00f8, 0x00d8, // 32 (o) (O) (oslash) (Ooblique) 0x0070, 0x0050, 0x00fe, 0x00de, // 33 (p) (P) (thorn) (THORN) 0x00fc, 0x00dc, 0xfe57, 0xfe58, // 34 (udiaeresis) (Udiaeresis) (dead_diaeresis) (dead_abovering) 0x002b, 0x002a, 0xfe53, 0xfe54, // 35 (plus) (asterisk) (dead_tilde) (dead_macron) 0xff0d, 0x0, 0x0, 0x0, // 36 (Return) 0xffe3, 0x0, 0x0, 0x0, // 37 (Control_L) 0x0061, 0x0041, 0x00e6, 0x00c6, // 38 (a) (A) (ae) (AE) 0x0073, 0x0053, 0x00df, 0x00a7, // 39 (s) (S) (ssharp) (section) 0x0064, 0x0044, 0x00f0, 0x00d0, // 40 (d) (D) (eth) (ETH) 0x0066, 0x0046, 0x01f0, 0x00aa, // 41 (f) (F) (dstroke) (ordfeminine) 0x0067, 0x0047, 0x03bf, 0x03bd, // 42 (g) (G) (eng) (ENG) 0x0068, 0x0048, 0x02b1, 0x02a1, // 43 (h) (H) (hstroke) (Hstroke) 0x006a, 0x004a, 0x0, 0x0, // 44 (j) (J) 0x006b, 0x004b, 0x03a2, 0x0026, // 45 (k) (K) (kra) (ampersand) 0x006c, 0x004c, 0x01b3, 0x01a3, // 46 (l) (L) (lstroke) (Lstroke) 0x00f6, 0x00d6, 0xfe51, 0xfe59, // 47 (odiaeresis) (Odiaeresis) (dead_acute) (dead_doubleacute) 0x00e4, 0x00c4, 0xfe52, 0xfe5a, // 48 (adiaeresis) (Adiaeresis) (dead_circumflex) (dead_caron) 0xfe52, 0x00b0, 0x00ac, 0x0, // 49 (dead_circumflex) (degree) (notsign) 0xffe1, 0x0, 0x0, 0x0, // 50 (Shift_L) 0x0023, 0x0027, 0xfe50, 0xfe55, // 51 (numbersign) (apostrophe) (dead_grave) (dead_breve) 0x0079, 0x0059, 0x00ab, 0x00, // 52 (y) (Y) (guillemotleft) 0x0078, 0x0058, 0x00bb, 0x00, // 53 (x) (X) (guillemotright) 0x0063, 0x0043, 0x00a2, 0x00a9, // 54 (c) (C) (cent) (copyright) 0x0076, 0x0056, 0x0ad2, 0x0060, // 55 (v) (V) (leftdoublequotemark) (grave) 0x0062, 0x0042, 0x0ad3, 0x0027, // 56 (b) (B) (rightdoublequotemark) (apostrophe) 0x006e, 0x004e, 0x0, 0x0, // 57 (n) (N) 0x006d, 0x004d, 0x00b5, 0x00ba, // 58 (m) (M) (mu) (masculine) 0x002c, 0x003b, 0x08a3, 0x00d7, // 59 (comma) (semicolon) (horizconnector) (multiply) 0x002e, 0x003a, 0x00b7, 0x00f7, // 60 (period) (colon) (periodcentered) (division) 0x002d, 0x005f, 0xfe60, 0xfe56, // 61 (minus) (underscore) (dead_belowdot) (dead_abovedot) 0xffe2, 0x0, 0x0, 0x0, // 62 (Shift_R) 0xffaa, 0x0, 0x0, 0x0, // 63 (KP_Multiply) 0xffe9, 0xffe7, 0x0, 0x0, // 64 (Alt_L) (Meta_L) 0x0020, 0x0, 0x0, 0x0, // 65 (space) 0xffe5, 0x0, 0x0, 0x0, // 66 (Caps_Lock) 0xffbe, 0x0, 0x0, 0x0, // 67 (F1) 0xffbf, 0x0, 0x0, 0x0, // 68 (F2) 0xffc0, 0x0, 0x0, 0x0, // 69 (F3) 0xffc1, 0x0, 0x0, 0x0, // 70 (F4) 0xffc2, 0x0, 0x0, 0x0, // 71 (F5) 0xffc3, 0x0, 0x0, 0x0, // 72 (F6) 0xffc4, 0x0, 0x0, 0x0, // 73 (F7) 0xffc5, 0x0, 0x0, 0x0, // 74 (F8) 0xffc6, 0x0, 0x0, 0x0, // 75 (F9) 0xffc7, 0x0, 0x0, 0x0, // 76 (F10) 0xff7f, 0xfef9, 0x0, 0x0, // 77 (Num_Lock) (Pointer_EnableKeys) 0xff14, 0x0, 0x0, 0x0, // 78 (Scroll_Lock) 0xff95, 0xffb7, 0x0, 0x0, // 79 (KP_Home) (KP_7) 0xff97, 0xffb8, 0x0, 0x0, // 80 (KP_Up) (KP_8) 0xff9a, 0xffb9, 0x0, 0x0, // 81 (KP_Prior) (KP_9) 0xffad, 0x0, 0x0, 0x0, // 82 (KP_Subtract) 0xff96, 0xffb4, 0x0, 0x0, // 83 (KP_Left) (KP_4) 0xff9d, 0xffb5, 0x0, 0x0, // 84 (KP_Begin) (KP_5) 0xff98, 0xffb6, 0x0, 0x0, // 85 (KP_Right) (KP_6) 0xffab, 0x0, 0x0, 0x0, // 86 (KP_Add) 0xff9c, 0xffb1, 0x0, 0x0, // 87 (KP_End) (KP_1) 0xff99, 0xffb2, 0x0, 0x0, // 88 (KP_Down) (KP_2) 0xff9b, 0xffb3, 0x0, 0x0, // 89 (KP_Next) (KP_3) 0xff9e, 0xffb0, 0x0, 0x0, // 90 (KP_Insert) (KP_0) 0xff9f, 0xffae, 0x0, 0x0, // 91 (KP_Delete) (KP_Decimal) 0xff61, 0xff15, 0x0, 0x0, // 92 (Print) (Sys_Req) 0x0, 0x0, 0x0, 0x0, // 93 0x003c, 0x003e, 0x007c, 0x00a6, // 94 (less) (greater) (bar) (brokenbar) 0xffc8, 0x0, 0x0, 0x0, // 95 (F11) 0xffc9, 0x0, 0x0, 0x0, // 96 (F12) 0xff50, 0x0, 0x0, 0x0, // 97 (Home) 0xff52, 0x0, 0x0, 0x0, // 98 (Up) 0xff55, 0x0, 0x0, 0x0, // 99 (Prior) 0xff51, 0x0, 0x0, 0x0, // 100 (Left) 0x0, 0x0, 0x0, 0x0, // 101 0xff53, 0x0, 0x0, 0x0, // 102 (Right) 0xff57, 0x0, 0x0, 0x0, // 103 (End) 0xff54, 0x0, 0x0, 0x0, // 104 (Down) 0xff56, 0x0, 0x0, 0x0, // 105 (Next) 0xff63, 0x0, 0x0, 0x0, // 106 (Insert) 0xffff, 0x0, 0x0, 0x0, // 107 (Delete) 0xff8d, 0x0, 0x0, 0x0, // 108 (KP_Enter) 0xffe4, 0x0, 0x0, 0x0, // 109 (Control_R) 0xff13, 0xff6b, 0x0, 0x0, // 110 (Pause) (Break) 0xff61, 0xff15, 0x0, 0x0, // 111 (Print) (Sys_Req) 0xffaf, 0x0, 0x0, 0x0, // 112 (KP_Divide) 0xff7e, 0xff20, 0x0, 0x0, // 113 (Mode_switch) (Multi_key) 0xff13, 0xff6b, 0x0, 0x0, // 114 (Pause) (Break) 0x0, 0x0, 0x0, 0x0, // 115 0x0, 0x0, 0x0, 0x0, // 116 0x0, 0x0, 0x0, 0x0, // 117 0x0, 0x0, 0x0, 0x0, // 118 0x0, 0x0, 0x0, 0x0, // 119 0x0, 0x0, 0x0, 0x0, // 120 0x0, 0x0, 0x0, 0x0, // 121 0x0, 0x0, 0x0, 0x0, // 122 0x0, 0x0, 0x0, 0x0, // 123 0x0, 0x0, 0x0, 0x0, // 124 0x0, 0x0, 0x0, 0x0, // 125 0x0, 0x0, 0x0, 0x0, // 126 0x0, 0x0, 0x0, 0x0, // 127 0x0, 0x0, 0x0, 0x0, // 128 0x0, 0x0, 0x0, 0x0, // 129 0x0, 0x0, 0x0, 0x0, // 130 0x0, 0x0, 0x0, 0x0, // 131 0x0, 0x0, 0x0, 0x0, // 132 0x0, 0x0, 0x0, 0x0, // 133 0x0, 0x0, 0x0, 0x0, // 134 0x0, 0x0, 0x0, 0x0, // 135 0x0, 0x0, 0x0, 0x0, // 136 0x0, 0x0, 0x0, 0x0, // 137 0x0, 0x0, 0x0, 0x0, // 138 0x0, 0x0, 0x0, 0x0, // 139 0x0, 0x0, 0x0, 0x0, // 140 0x0, 0x0, 0x0, 0x0, // 141 0x0, 0x0, 0x0, 0x0, // 142 0x0, 0x0, 0x0, 0x0, // 143 0x0, 0x0, 0x0, 0x0, // 144 0x0, 0x0, 0x0, 0x0, // 145 0x0, 0x0, 0x0, 0x0, // 146 0x0, 0x0, 0x0, 0x0, // 147 0x0, 0x0, 0x0, 0x0, // 148 0x0, 0x0, 0x0, 0x0, // 149 0x0, 0x0, 0x0, 0x0, // 150 0x0, 0x0, 0x0, 0x0, // 151 0x0, 0x0, 0x0, 0x0, // 152 0x0, 0x0, 0x0, 0x0, // 153 0x0, 0x0, 0x0, 0x0, // 154 0x0, 0x0, 0x0, 0x0, // 155 0x0, 0x0, 0x0, 0x0, // 156 0x0, 0x0, 0x0, 0x0, // 157 0x0, 0x0, 0x0, 0x0, // 158 0x0, 0x0, 0x0, 0x0, // 159 0x0, 0x0, 0x0, 0x0, // 160 0x0, 0x0, 0x0, 0x0, // 161 0x0, 0x0, 0x0, 0x0, // 162 0x0, 0x0, 0x0, 0x0, // 163 0x0, 0x0, 0x0, 0x0, // 164 0x0, 0x0, 0x0, 0x0, // 165 0x0, 0x0, 0x0, 0x0, // 166 0x0, 0x0, 0x0, 0x0, // 167 0x0, 0x0, 0x0, 0x0, // 168 0x0, 0x0, 0x0, 0x0, // 169 0x0, 0x0, 0x0, 0x0, // 170 0x0, 0x0, 0x0, 0x0, // 171 0x0, 0x0, 0x0, 0x0, // 172 0x0, 0x0, 0x0, 0x0, // 173 0x0, 0x0, 0x0, 0x0, // 174 0x0, 0x0, 0x0, 0x0, // 175 0x0, 0x0, 0x0, 0x0, // 176 0x0, 0x0, 0x0, 0x0, // 177 0x0, 0x0, 0x0, 0x0, // 178 0x0, 0x0, 0x0, 0x0, // 179 0x0, 0x0, 0x0, 0x0, // 180 0x0, 0x0, 0x0, 0x0, // 181 0x0, 0x0, 0x0, 0x0, // 182 0x0, 0x0, 0x0, 0x0, // 183 0x0, 0x0, 0x0, 0x0, // 184 0x0, 0x0, 0x0, 0x0, // 185 0x0, 0x0, 0x0, 0x0, // 186 0x0, 0x0, 0x0, 0x0, // 187 0x0, 0x0, 0x0, 0x0, // 188 0x0, 0x0, 0x0, 0x0, // 189 0x0, 0x0, 0x0, 0x0, // 190 0x0, 0x0, 0x0, 0x0, // 191 0x0, 0x0, 0x0, 0x0, // 192 0x0, 0x0, 0x0, 0x0, // 193 0x0, 0x0, 0x0, 0x0, // 194 0x0, 0x0, 0x0, 0x0, // 195 0x0, 0x0, 0x0, 0x0, // 196 0x0, 0x0, 0x0, 0x0, // 197 0x0, 0x0, 0x0, 0x0, // 198 0x0, 0x0, 0x0, 0x0, // 199 0x0, 0x0, 0x0, 0x0, // 200 0x0, 0x0, 0x0, 0x0, // 201 0x0, 0x0, 0x0, 0x0, // 202 0x0, 0x0, 0x0, 0x0, // 203 0x0, 0x0, 0x0, 0x0, // 204 0x0, 0x0, 0x0, 0x0, // 205 0x0, 0x0, 0x0, 0x0, // 206 0x0, 0x0, 0x0, 0x0, // 207 0x0, 0x0, 0x0, 0x0, // 208 0x0, 0x0, 0x0, 0x0, // 209 0x0, 0x0, 0x0, 0x0, // 210 0x0, 0x0, 0x0, 0x0, // 211 0x0, 0x0, 0x0, 0x0, // 212 0x0, 0x0, 0x0, 0x0, // 213 0x0, 0x0, 0x0, 0x0, // 214 0x0, 0x0, 0x0, 0x0, // 215 0x0, 0x0, 0x0, 0x0, // 216 0x0, 0x0, 0x0, 0x0, // 217 0x0, 0x0, 0x0, 0x0, // 218 0x0, 0x0, 0x0, 0x0, // 219 0x0, 0x0, 0x0, 0x0, // 220 0x0, 0x0, 0x0, 0x0, // 221 0x0, 0x0, 0x0, 0x0, // 222 0x0, 0x0, 0x0, 0x0, // 223 0x0, 0x0, 0x0, 0x0, // 224 0x0, 0x0, 0x0, 0x0, // 225 0x0, 0x0, 0x0, 0x0, // 226 0x0, 0x0, 0x0, 0x0, // 227 0x0, 0x0, 0x0, 0x0, // 228 0x0, 0x0, 0x0, 0x0, // 229 0x0, 0x0, 0x0, 0x0, // 230 0x0, 0x0, 0x0, 0x0, // 231 0x0, 0x0, 0x0, 0x0, // 232 0x0, 0x0, 0x0, 0x0, // 233 0x0, 0x0, 0x0, 0x0, // 234 0x0, 0x0, 0x0, 0x0, // 235 0x0, 0x0, 0x0, 0x0, // 236 0x0, 0x0, 0x0, 0x0, // 237 0x0, 0x0, 0x0, 0x0, // 238 0x0, 0x0, 0x0, 0x0, // 239 0x0, 0x0, 0x0, 0x0, // 240 0x0, 0x0, 0x0, 0x0, // 241 0x0, 0x0, 0x0, 0x0, // 242 0x0, 0x0, 0x0, 0x0, // 243 0x0, 0x0, 0x0, 0x0, // 244 0x0, 0x0, 0x0, 0x0, // 245 0x0, 0x0, 0x0, 0x0, // 246 0x0, 0x0, 0x0, 0x0, // 247 0x0, 0x0, 0x0, 0x0, // 248 0x0, 0x0, 0x0, 0x0, // 249 0x0, 0x0, 0x0, 0x0, // 250 0x0, 0x0, 0x0, 0x0, // 251 0x0, 0x0, 0x0, 0x0, // 252 0x0, 0x0, 0x0, 0x0, // 253 0x0, 0x0, 0x0, 0x0, // 254 0x0, 0x0, 0x0, 0x0 // 255 }; Keymap_de(){ width = 4; start = 8; count = 248; map=_map; } final int getCode(KeyEvent e){ if(e.isShiftDown()) state|=1; if(e.isControlDown()) state|=4; if(e.isAltDown()) state|=8; int key=e.getKeyCode(); // check for windoze ALT+GR Style if(e.isAltDown() && e.isControlDown()) { key = VK_ALT_GRAPH; } // debug message //System.out.println( "Key: " + Integer.toHexString(key) ); if(key!=0){ switch(key){ case KeyEvent.VK_A: case KeyEvent.VK_B: case KeyEvent.VK_C: case KeyEvent.VK_D: case KeyEvent.VK_E: case KeyEvent.VK_F: case KeyEvent.VK_G: case KeyEvent.VK_H: case KeyEvent.VK_I: case KeyEvent.VK_J: case KeyEvent.VK_K: case KeyEvent.VK_L: case KeyEvent.VK_M: case KeyEvent.VK_N: case KeyEvent.VK_O: case KeyEvent.VK_P: case KeyEvent.VK_Q: case KeyEvent.VK_R: case KeyEvent.VK_S: case KeyEvent.VK_T: case KeyEvent.VK_U: case KeyEvent.VK_V: case KeyEvent.VK_W: case KeyEvent.VK_X: case KeyEvent.VK_Y: case KeyEvent.VK_Z: break; case KeyEvent.VK_0: case KeyEvent.VK_1: case KeyEvent.VK_2: case KeyEvent.VK_3: case KeyEvent.VK_4: case KeyEvent.VK_5: case KeyEvent.VK_6: case KeyEvent.VK_7: case KeyEvent.VK_8: case KeyEvent.VK_9: break; case KeyEvent.VK_ENTER: key=0xff0d; break; case KeyEvent.VK_BACK_SPACE: key=0xff08; break; case KeyEvent.VK_TAB: key=0xff09; break; // case KeyEvent.VK_CANCEL: // key=0xff69; // break; // case KeyEvent.VK_CLEAR: // key=0xff0b; // break; case KeyEvent.VK_COMMA: case KeyEvent.VK_PERIOD: case KeyEvent.VK_SLASH: case KeyEvent.VK_SEMICOLON: case KeyEvent.VK_EQUALS: case KeyEvent.VK_OPEN_BRACKET: case KeyEvent.VK_BACK_SLASH: case KeyEvent.VK_CLOSE_BRACKET: case KeyEvent.VK_SPACE: break; /* case KeyEvent.VK_BACK_QUOTE: if(e.getKeyChar()==0x27){key=0x27;} else if(e.getKeyChar()==0x40){key=0x40;} else key=0x60; break; case KeyEvent.VK_QUOTE: if(e.getKeyChar()==0x23){key=0x23;} else if(e.getKeyChar()==0x7e){key=0x7e;} else key=0x27; break; */ case KeyEvent.VK_SHIFT: key=0xffe1; break; case KeyEvent.VK_CONTROL: key=0xffe3; break; case KeyEvent.VK_ALT: key=0xffe9; break; case VK_ALT_GRAPH: key=0xff7e; break; case KeyEvent.VK_PAUSE: key=0xff13; break; case KeyEvent.VK_CAPS_LOCK: key=0xffe5; break; case KeyEvent.VK_ESCAPE: key=0xff1b; break; case KeyEvent.VK_PAGE_UP: key=0xff55; break; case KeyEvent.VK_PAGE_DOWN: key=0xff56; break; case KeyEvent.VK_END: key=0xff57; break; case KeyEvent.VK_HOME: key=0xff50; break; case KeyEvent.VK_LEFT: key=0xff51; break; case KeyEvent.VK_UP: key=0xff52; break; case KeyEvent.VK_RIGHT: key=0xff53; break; case KeyEvent.VK_DOWN: key=0xff54; break; case KeyEvent.VK_NUMPAD0: key=0xffb0; break; case KeyEvent.VK_NUMPAD1: key=0xffb1; break; case KeyEvent.VK_NUMPAD2: key=0xffb2; break; case KeyEvent.VK_NUMPAD3: key=0xffb3; break; case KeyEvent.VK_NUMPAD4: key=0xffb4; break; case KeyEvent.VK_NUMPAD5: key=0xffb5; break; case KeyEvent.VK_NUMPAD6: key=0xffb6; break; case KeyEvent.VK_NUMPAD7: key=0xffb7; break; case KeyEvent.VK_NUMPAD8: key=0xffb8; break; case KeyEvent.VK_NUMPAD9: key=0xffb9; break; case KeyEvent.VK_MULTIPLY: key=0xffaa; break; case KeyEvent.VK_ADD: key=0xffab; break; case KeyEvent.VK_SEPARATER: key=0xffac; break; case KeyEvent.VK_SUBTRACT: key=0xffad; break; case KeyEvent.VK_DECIMAL: key=0xffae; break; case KeyEvent.VK_DIVIDE: key=0xffaf; break; case KeyEvent.VK_F1: key=0xffbe; break; case KeyEvent.VK_F2: key=0xffbf; break; case KeyEvent.VK_F3: key=0xffc0; break; case KeyEvent.VK_F4: key=0xffc1; break; case KeyEvent.VK_F5: key=0xffc2; break; case KeyEvent.VK_F6: key=0xffc3; break; case KeyEvent.VK_F7: key=0xffc4; break; case KeyEvent.VK_F8: key=0xffc5; break; case KeyEvent.VK_F9: key=0xffc6; break; case KeyEvent.VK_F10: key=0xffc7; break; case KeyEvent.VK_F11: key=0xffc8; break; case KeyEvent.VK_F12: key=0xffc9; break; case KeyEvent.VK_DELETE: key=0xffff; break; case KeyEvent.VK_NUM_LOCK: key=0xff7f; break; case KeyEvent.VK_SCROLL_LOCK: key=0xff14; break; case KeyEvent.VK_PRINTSCREEN: key=0xff61; break; case KeyEvent.VK_INSERT: key=0xff63; break; case KeyEvent.VK_HELP: key=0xff6a; break; case KeyEvent.VK_META: key=0xffe7; break; // case KeyEvent.VK_KP_UP: // key=0xff97; break; // case KeyEvent.VK_KP_DOWN: // key=0xff99; break; // case KeyEvent.VK_KP_LEFT: // key=0xff96; break; // case KeyEvent.VK_KP_RIGHT: // key=0xff98; break; /* // For European keyboards case KeyEvent.VK_DEAD_GRAVE: case KeyEvent.VK_DEAD_ACUTE: case KeyEvent.VK_DEAD_CIRCUMFLEX: case KeyEvent.VK_DEAD_TILDE: case KeyEvent.VK_DEAD_MACRON: case KeyEvent.VK_DEAD_BREVE: case KeyEvent.VK_DEAD_ABOVEDOT: case KeyEvent.VK_DEAD_DIAERESIS: case KeyEvent.VK_DEAD_ABOVERING: case KeyEvent.VK_DEAD_DOUBLEACUTE: case KeyEvent.VK_DEAD_CARON: case KeyEvent.VK_DEAD_CEDILLA: case KeyEvent.VK_DEAD_OGONEK: case KeyEvent.VK_DEAD_IOTA: case KeyEvent.VK_DEAD_VOICED_SOUND: case KeyEvent.VK_DEAD_SEMIVOICED_SOUND: case KeyEvent.VK_AMPERSAND: case KeyEvent.VK_ASTERISK: case KeyEvent.VK_QUOTEDBL: case KeyEvent.VK_LESS: case KeyEvent.VK_GREATER: case KeyEvent.VK_BRACELEFT: case KeyEvent.VK_BRACERIGHT: // for Asian Keyboards case KeyEvent.VK_FINAL: case KeyEvent.VK_CONVERT: case KeyEvent.VK_NONCONVERT: case KeyEvent.VK_ACCEPT: case KeyEvent.VK_MODECHANGE: case KeyEvent.VK_KANA: case KeyEvent.VK_KANJI: // for Sun keyboards case KeyEvent.VK_CUT: case KeyEvent.VK_COPY: case KeyEvent.VK_PASTE: case KeyEvent.VK_UNDO: case KeyEvent.VK_AGAIN: case KeyEvent.VK_FIND: case KeyEvent.VK_PROPS: case KeyEvent.VK_STOP: */ default: key=e.getKeyChar(); } } else{ key=e.getKeyChar(); } // debug message // System.out.println( "AfterKey: " + Integer.toHexString(key) ); int s=32; if(km!=null){ int i=0; int j=0; s=km.start; while(iIJXK~4LhQӚw?/heDh]K}>s?f\KfĿ٣w?/kxv0P:$i*_Oѿy׏mu^Kx:yT\fZgkWeP5Ҽ1BCX ? xRM"1GVrhww6o%(<蕃n#a#ao~!ԴFX(ʖW*qdV/O ώ~b/9G/O ώ~b/9G/O ώ~b/9G/O ώ~b/9G/O ώ~b/9^_ŪxS WXn 3 weirdx-1.0.32/com/jcraft/weirdx/Keymodifier_de.java0000644000175000017500000000241210035636514020664 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; final class Keymodifier_de extends Keymodifier{ private byte[] _keys={ (byte)0x32, (byte)0x3e, // shift (byte)0x42, (byte)0, // lock (byte)0x25, (byte)0x6d, // control (byte)0x40, (byte)0, // mod1 (byte)0x4d,(byte)0, // mod2 (byte)0x71, (byte)0, // mod3 (byte)0, (byte)0, // mod4 (byte)0x4e, (byte)0 // mod5 }; Keymodifier_de(){ width=2; keys=_keys; } } weirdx-1.0.32/com/jcraft/weirdx/Keymodifier_gb.java0000644000175000017500000000241510035636522020666 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; final class Keymodifier_gb extends Keymodifier{ private byte[] _keys={ (byte)16, (byte)151, // shift (byte)20, (byte)0x00, // lock (byte)17, (byte)11, // control (byte)18, (byte)0, // mod1 (byte)148, (byte)0x00, // mod2, (byte)0x00, (byte)0x00, // mod3, (byte)0x00, (byte)0x00, // mod4 (byte)145, (byte)0x00 // mod5 }; Keymodifier_gb(){ width=2; keys=_keys; } } weirdx-1.0.32/com/jcraft/weirdx/Keymodifier_gen.java0000644000175000017500000000230410035636531021044 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; final class Keymodifier_gen extends Keymodifier{ private byte[] _keys={ 0x32, 0x3e, // shift 0x42, 0x00, // 0x25, 0x00, // lock 0x25, 0x6d, // 0x42, 0x6d, // control 0x40, 0x71, // mod1 0x4d, 0x00, // mod2, 0x00, 0x00, // mod3, 0x00, 0x00, // mod4 0x4e, 0x00 // mod5 }; Keymodifier_gen(){ width=2; keys=_keys; } } weirdx-1.0.32/com/jcraft/weirdx/LogoImage.java0000644000175000017500000000414310035636552017615 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.*; import java.net.*; import java.awt.image.*; final class LogoImage{ static Screen screen; static String name="weirdx.jpg"; static Image logoimage=null; static int logoimagex; static int logoimagey; static int logoimagewidth; static int logoimageheight; static void init(Screen[] scrn){ screen=scrn[0]; } static void storeImage(Image img){ logoimage=img; logoimagewidth=90; logoimageheight=30; } static boolean loadLogo(String _name){ if(_name==null) return false; if(logoimage==null || !name.equals(_name)){ name=_name; if(logoimage!=null) logoimage.flush(); try{ URL url=LogoImage.class.getResource(name); Image img=Toolkit.getDefaultToolkit(). createImage((ImageProducer)url.getContent()); storeImage(img); } catch(Exception e){ // System.exit(-1); } } return logoimage!=null; } static boolean loadLogo(){ return loadLogo(name); } static void toggle(){ if(logoimage==null){ up(); } else{ down(); } } static void up(){ if(logoimage==null){ loadLogo(); } } static void down(){ if(logoimage!=null){ Image img=logoimage; logoimage=null; img.flush(); } } } weirdx-1.0.32/com/jcraft/weirdx/OtherClients.java0000644000175000017500000000265110037060234020345 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.IOException; final class OtherClients extends Clients{ int mask; Window window; OtherClients(int id){super(id);} void delete() throws IOException{ if(window==null)return; Client c=getClient(); OtherClients prev=null; OtherClients other=(window.optional==null) ? null : window.optional.otherClients; for(; other!=null; other=(OtherClients)other.next) { if(other.getClient()==c){ if(prev!=null){ prev.next=other.next; } else{ window.optional.otherClients=(OtherClients)other.next; } window.recalculateDeliverableEvents(); } prev=other; } } } weirdx-1.0.32/com/jcraft/weirdx/Pixmap.java0000644000175000017500000012360110037060220017172 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.*; import java.awt.image.*; //import com.sun.java.swing.*; //import javax.swing.*; class Pixmap extends Drawable{ static void init(Screen[] screen){ ImageFactory.init(screen[0]); screen[0].pixmaps=new Pixmap[Format.format.length]; for(int i=0; i < Format.format.length; i++){ screen[0].pixmaps[i]= ResizablePixmap.createPixmap(Resource.fakeClientId(Client.clients[0]), screen[0].root, 1, 1, Format.format[i].depth); } } ColorModel filter; long time=0; int fg=1; int bg=0; byte lpad; Colormap colormap; boolean dirty=true; MemoryImageSource mis=null; Drawable drawable=null; int refcnt; int datasize; Image img=null; Graphics imgg=null; byte[] data=null; boolean imageDirty=false; int imageDirtyX, imageDirtyY, imageDirtyWidth, imageDirtyHeight; Pixmap(int id, Drawable d, int width, int height, byte depth) { super(id, RT_PIXMAP); type=Drawable.DRAWABLE_PIXMAP; clss=0; this.screen=d.screen; this.depth=depth; this.bitsPerPixel=depth; this.drawable=d; this.x=0; this.y=0; this.width=width; this.height=height; refcnt=0; img=ImageFactory.createImage(width, height); img.flush(); imgg=img.getGraphics(); colormap=d.getColormap(); filter=colormap.cm; time=System.currentTimeMillis(); } void ref(){ refcnt++; } void mkMIS(){ mis=new MemoryImageSource(width, height, colormap.cm, data, 0, width); mis.setAnimated(true); } byte[] getData(){ if(data==null){ data=new byte[width*height]; mkMIS(); } return data; } Image getImage(){ return img; } Image getImage(Window win){ return getImage(win, fg, bg); } Image getImage(Window win, GC gc){ return getImage(win, gc.fgPixel, gc.bgPixel); } Image getImage(Window win, int fgPixel, int bgPixel){ if(img==null) return null; if(win==null) return getImage(); if(imageDirty && colormap!=win.getColormap()){ data=getData(); } if(data!=null){ if(depth!=1 && (filter!=win.getColormap().cm)){ if(imageDirty){ image2data(); } filter=win.getColormap().cm; dirty=true; } else{ } if(time>16)&0xff)/8<<11 | ((iii>>8)&0xff)/4<<5 | ((iii)&0xff)/8; io.writeByte((iii)&0xff); io.writeByte((iii>>8)&0xff); i++; } if(width%2!=0) io.writePad(2); } io.flush(); return; } } } synchronized(io){ io.writeByte((byte)0); // error!! Implementation io.writeByte((byte)17); io.writeShort(c.seq); io.writePad(4); io.writeShort(0); io.writeByte((byte)73); io.writePad(21); io.flush(); } } static void reqPutImage(Client c) throws IOException{ int foo, n; IO io=c.client; byte format; short width, height, dstx, dsty; byte depth; byte lpad; Pixmap pixmap=null; format=(byte)c.data; n=c.length; foo=io.readInt(); Drawable d=c.lookupDrawable(foo); if(d==null){ c.errorValue=foo; c.errorReason=9; // BadDrawable; } foo=io.readInt(); GC gc=c.lookupGC(foo); if(gc==null && c.errorReason==0){ c.errorValue=foo; c.errorReason=13; // GC } width=(short)io.readShort(); height=(short)io.readShort(); dstx=(short)io.readShort(); dsty=(short)io.readShort(); lpad=(byte)io.readByte(); depth=(byte)io.readByte(); io.readPad(2); c.length-=6; n-=6; if(c.errorReason!=0){ return; } if(dsty<0){ // height+=dsty; dsty=0; } if(dstx<0){ // width+=dstx; dstx=0; } int ddstx=dstx; int ddsty=dsty; synchronized(Pixmap.class){ if (d instanceof Pixmap){ pixmap=(Pixmap)d; if(pixmap.imageDirty){ pixmap.image2data(); } } else{ if(!((Window)d).ddxwindow.isVisible()){ io.readPad(n*4); return; } pixmap=null; Pixmap[] pixmaps=((Window)d).screen.pixmaps; for(int i=0; i0){ io.readByte(data, j+dstx, restw); if(padding!=0){ io.readPad(padding); } } else{ io.readPad(paddedwidth); } n-=paddedwidthi; j+=www; resth--; } } else{ while(n!=0){ restww=restw; ww=width; i=dstx; while(00){ if(restww>=4){ System.arraycopy(c.bbuffer, 0, data, j+i, 4); restww-=4; } else if(restww>0){ System.arraycopy(c.bbuffer, 0, data, j+i, restww); restww=0; } } i+=4; ww-=4; } else{ if(resth>0){ if(restww>=ww){ System.arraycopy(c.bbuffer, 0, data, j+i, ww); restww-=ww; } else if(restww>0){ System.arraycopy(c.bbuffer, 0, data, j+i, restww); restww=0; } } i+=ww; break; } } j+=www; resth--; } } } else{ int www=0; if (d instanceof Window){ www=((Resizable)pixmap).getRealWidth(); } else{ www=pixmap.width; } n*=4; while(n!=0){ ww=width; i=dstx; while(4>8; data[j*www+i]=(byte)(foo&0xff); i++; foo=foo>>8; data[j*www+i]=(byte)(foo&0xff); i++; foo=foo>>8; data[j*www+i]=(byte)(foo&0xff); i++; ww-=4; } if(ww!=0){ foo=io.readInt(); n-=4; while(0>8; ww--; } } j++; } } } else if(pixmap.depth==16){ ((Pixmap16)pixmap).putImage(c, gc, dstx, dsty, width, height, lpad, format, depth); } else{ io.readPad(n*4); } if(d instanceof Window){ Graphics g=((Window)d).getGraphics(); pixmap.mis.newPixels(dstx, dsty, width, height); Image dataImg=Toolkit.getDefaultToolkit().createImage(pixmap.mis); Image ii=dataImg; java.awt.Shape tmp=g.getClip(); g.clipRect(ddstx, ddsty, width, height); g.drawImage(ii, ddstx, ddsty, Screen.screen[0].root.ddxwindow); if(tmp==null){ g.setClip(0, 0, d.width, d.height); } else{g.setClip(tmp);} ((Window)d).draw(ddstx, ddsty, width, height); dataImg.flush(); } else { if(pixmap.time>>=1; res<<=1; } while(--len>0); return res>>>1; } Graphics getGraphics(){ return imgg; } Graphics getGraphics(GC gc, int mask){ Graphics graphics=imgg; if(gc==currentGC && gc.time==gctime && (mask&~gmask)==0){ return graphics; } gctime=gc.time; currentGC=gc; gmask=mask; if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ java.awt.Rectangle rec=(Rectangle)(gc.clip_mask.getMask()); if(rec==null){ return graphics; } graphics.setClip(rec.x, rec.y, rec.width, rec.height); } if((mask&GC.GCFunction)!=0){ Color color=getColormap().getColor(gc.fgPixel); if(gc.function==GC.GXxor){ gmask&=~GC.GCFunction; graphics.setXORMode(new Color((color.getRGB() ^ graphics.getColor().getRGB())&0xffffff)); } else if(gc.function==GC.GXinvert){ //System.out.println("Pimxpa: GXinvert"); } else{ graphics.setColor(color); } } if((mask&GC.GCFont)!=0){ Font font=gc.font; graphics.setFont(font.getFont()); } if((mask&GC.GCLineWidth)!=0 || (mask&GC.GCLineStyle)!=0 || (mask&GC.GCCapStyle)!=0 || (mask&GC.GCJoinStyle)!=0 ){ } return graphics; } void copyPlane(Pixmap dst, GC gc, int sx, int sy, int dx, int dy, int w, int h){ copyArea(dst, gc, sx, sy, dx, dy, w, h); } void copyArea(Pixmap dst, GC gc, int sx, int sy, int dx, int dy, int w, int h){ if((width-sx)0){ refcnt--; return; } if(img!=null){ img.flush(); img=null; imgg.dispose(); imgg=null; } data=null; filter=null; colormap=null; drawable=null; } void restoreClip(){ imgg.setClip(0, 0, width, height); } } class ImageFactory { static DDXWindow ddxwindow; static void init(Screen screen){ ddxwindow=screen.root.ddxwindow; } static Image createImage(int width, int height){ return ddxwindow.createImage(width, height); } } class FBFilter extends RGBImageFilter { int foreGround=Color.white.getRGB(); int backGround=Color.black.getRGB(); boolean through=true; void setFgBg(Color f, Color b){ foreGround=f.getRGB()|0xff000000; backGround=b.getRGB()|0xff000000; if((foreGround&0x00ffffff)!=0 && (backGround&0x00ffffff)==0){ through=true; } else{ through=false; } } public int filterRGB(int x, int y, int rgb) { rgb&=0xffffff; if(rgb==0) return backGround; return foreGround; } } class Pixmap1 extends Pixmap { FBFilter fbFilter=null; Image fgImg=null; Pixmap1(int id, Drawable d, int width, int height) { super(id, d, width, height, (byte)1); reset(); } Image getImage(){ if(!fbFilter.through){ return fgImg; } else return super.getImage(); } Image getImage(Window win, int fgPixel, int bgPixel){ setFgBg(win.getColormap(), fgPixel, bgPixel); return super.getImage(null, fgPixel, bgPixel); } void reset(){ if(fgImg!=null){ fgImg.flush(); } fbFilter=new FBFilter(); fgImg=Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(img.getSource(), fbFilter)); } static void putData(Client c, byte[] d, int width, int dx, int dy, int dwidth, int lpad) throws IOException{ IO io=c.client; int j=dy*width; int n=c.length; int foo; if(n*4>>ii; for(;ii<8;ii++){ d[j+i]=(byte)(((foo&0x01)!=0)?1:0); i++; foo=foo>>>1; ww--; if(ww==0) break ww_break; } iii++; } for(;iii<4;iii++){ foo=c.bbuffer[start+iii]; for(ii=0;ii<8;ii++){ d[j+i]=(byte)(((foo&0x01)!=0)?1:0); i++; foo=foo>>>1; ww--; if(ww==0) break ww_break; } } } start+=4; } while(32>>1; } } ww-=32; } if(ww!=0){ n--; for(int iii=0;iii<4;iii++){ foo=c.bbuffer[start]; start++; for(int ii=0;ii<8;ii++){ if(0>>1; ww--; } } } } j+=width; } } else{ while(n!=0){ int ww=dwidth; int i=dx; if(lpad!=0){ io.readByte(c.bbuffer, 0, 4); n--; ww_break: { int ii=lpad % 8; int iii=lpad/8; if(ii!=0){ foo=c.bbuffer[iii]; foo=foo>>>ii; for(;ii<8;ii++){ d[j+i]=(byte)(((foo&0x01)!=0)?1:0); i++; foo=foo>>>1; ww--; if(ww==0) break ww_break; } iii++; } for(;iii<4;iii++){ foo=c.bbuffer[iii]; for(ii=0;ii<8;ii++){ d[j+i]=(byte)(((foo&0x01)!=0)?1:0); i++; foo=foo>>>1; ww--; if(ww==0) break ww_break; } } } } while(32>>1; } } ww-=32; } if(ww!=0){ io.readByte(c.bbuffer, 0, 4); n--; for(int iii=0;iii<4;iii++){ foo=c.bbuffer[iii]; for(int ii=0;ii<8;ii++){ if(0>>1; ww--; } } } } j+=width; } } } void delete() throws IOException{ if(refcnt>0){ super.delete(); return; } super.delete(); fbFilter=null; if(fgImg!=null){ fgImg.flush(); fgImg=null; } } void setFgBg(Colormap cmap, int fgPixel, int bgPixel){ if(img==null) return; if(fbFilter!=null){ fbFilter.setFgBg(cmap.getColor(fgPixel), cmap.getColor(bgPixel)); } } void copyArea(Pixmap dst, GC gc, int sx, int sy, int dx, int dy, int w, int h){ if(dst.depth!=1){ setFgBg(dst.colormap, gc.fgPixel, gc.bgPixel); } super.copyArea(dst, gc, sx, sy, dx, dy, w, h); } void mkMIS(){ mis=new MemoryImageSource(width, height, Colormap.bwicm, data, 0, width); mis.setAnimated(true); } } class Pixmap16 extends Pixmap { int[] idata; Pixmap16(int id, Drawable d, int width, int height) { super(id, d, width, height, (byte)16); img=ImageFactory.createImage(width, height); img.flush(); imgg=img.getGraphics(); } int getScanWidth(){ return width*2; } byte[] getData(){ if(data==null){ data=new byte[width*height*2]; idata=new int[width*height]; mkMIS(); } return data; } Image getImage(Window win){ return getImage(win, null); } Image getImage(Window win, GC gc){ if(img==null) return null; if(win==null) return getImage(); if(imageDirty && colormap!=win.getColormap()){ data=getData(); } if(data!=null){ if(depth!=1){ if(imageDirty){ image2data(); } dirty=true; } else{ } if(time>8)&0xff); // byte flo=(byte)(f&0xff); byte fhi=(byte)(f&0xff); byte flo=(byte)((f>>8)&0xff); int b=gc.bgPixel; // byte bhi=(byte)((b>>8)&0xff); // byte blo=(byte)(b&0xff); byte bhi=(byte)(b&0xff); byte blo=(byte)((b>>8)&0xff); if(n*4>ii; for(;ii<8;ii++){ if((foo&0x01)!=0){ d[j+i]=fhi; d[j+i+1]=flo; } else{ d[j+i]=bhi; d[j+i+1]=blo; } i+=2; foo=foo>>1; ww--; if(ww==0) break ww_break; } iii++; } for(;iii<4;iii++){ foo=c.bbuffer[start+iii]; for(ii=0;ii<8;ii++){ if((foo&0x01)!=0){ d[j+i]=fhi; d[j+i+1]=flo; } else{ d[j+i]=bhi; d[j+i+1]=blo; } i+=2; foo=foo>>1; ww--; if(ww==0) break ww_break; } } } start+=4; } while(32>1; } } ww-=32; } if(ww!=0){ n--; for(int iii=0;iii<4;iii++){ foo=c.bbuffer[start]; start++; for(int ii=0;ii<8;ii++){ if(0>1; ww--; } } } } j+=scanWidth; } } else{ while(n!=0){ int ww=dwidth; int i=dstx; if(lpad!=0){ io.readByte(c.bbuffer, 0, 4); n--; ww_break: { int ii=lpad % 8; int iii=lpad/8; if(ii!=0){ foo=c.bbuffer[iii]; foo=foo>>ii; for(;ii<8;ii++){ if((foo&0x01)!=0){ d[j+i]=fhi; d[j+i+1]=flo; } else{ d[j+i]=bhi; d[j+i+1]=blo; } i+=2; foo=foo>>1; ww--; if(ww==0) break ww_break; } iii++; } for(;iii<4;iii++){ foo=c.bbuffer[iii]; for(ii=0;ii<8;ii++){ if((foo&0x01)!=0){ d[j+i]=fhi; d[j+i+1]=flo; } else{ d[j+i]=bhi; d[j+i+1]=blo; } i+=2; foo=foo>>1; ww--; if(ww==0) break ww_break; } } } } while(32>1; } } ww-=32; } if(ww!=0){ io.readByte(c.bbuffer, 0, 4); n--; for(int iii=0;iii<4;iii++){ foo=c.bbuffer[iii]; for(int ii=0;ii<8;ii++){ if(0>1; ww--; } } } } j+=scanWidth; } } int resth=dheight; if(height>11)&0x1f)*8<<16 | ((foo>>5)&0x3f)*4<<8 | (foo&0x1f)*8; } } return; } if (depth==16){ int ww=0; int i=0; int j=dsty; int n=c.length; int foo; if(format == 2){ // ZPixmap int restw=dwidth; int restww=dwidth; int resth=dheight; if(width0){ if(restww>0){ System.arraycopy(c.bbuffer, 0, d, j+i, 2); restww-=2; i+=2; } if(restww>0){ System.arraycopy(c.bbuffer, 2, d, j+i, 2); restww-=2; i+=2; } } ww-=2; } j+=scanWidth; resth--; } resth=dheight; if(height>11)&0x1f)*8)<<16 | (((foo>>5)&0x3f)*4)<<8 | (foo&0x1f)*8; } } } else{ n*=4; j=dsty*scanWidth; while(n!=0){ ww=width; i=dstx; while(4>8; data[j+i]=(byte)(foo&0xff); i++; foo=foo>>8; data[j+i]=(byte)(foo&0xff); i++; foo=foo>>8; data[j+i]=(byte)(foo&0xff); i++; ww-=4; } if(ww!=0){ foo=io.readInt(); n-=4; while(0>8; ww--; } } j+=scanWidth; } } } else{ int n=c.length; int foo; while(n!=0){ foo=io.readInt(); n--; } } } void image2data(int x, int y, int w, int h){ if(pixels.length>16)&0xff)/8)<<11 | (((foo>>8)&0xff)/4)<<5 | ((foo&0xff)/8); dt[(y+i)*scanWidth + x+j*2]=(byte)((foo>>8)&0xff); dt[(y+i)*scanWidth + x+j*2+1]=(byte)(foo&0xff); } } int iii=scanWidth*(y-1); int iiii=(scanWidth/2)*(y-1); int jjj; for(int ii=y; ii>11)&0x1f)*8<<16 | ((foo>>5)&0x3f)*4<<8 | (foo&0x1f)*8; } } time=0; } void mkMIS(){ mis=new MemoryImageSource(width, height, idata, 0, width); mis.setAnimated(true); } void copyArea(Pixmap dst, GC gc, int sx, int sy, int dx, int dy, int w, int h){ super.copyArea(dst, gc, sx, sy, dx, dy, w, h); } } interface Resizable { void setColormap(Colormap colormap); int getRealWidth(); int getRealHeight(); void setSize(int w, int h); } class ResizablePixmap extends Pixmap implements Resizable{ int real_width=0; int real_height=0; ResizablePixmap(int id, Drawable d, int width, int height, byte depth) { super(id, d, width, height, depth); getData(); real_width=width; real_height=height; } public void setColormap(Colormap colormap){ this.colormap=colormap; } static Pixmap createPixmap(int id, Drawable d, int width, int height, byte depth){ Pixmap p=null; if(depth==1){ p=new ResizablePixmap1(id, d, width, height); } else if(depth==16){ p=new ResizablePixmap16(id, d, width, height); } else{ p=new ResizablePixmap(id, d, width, height, depth); } Resource.add(p); return p; } public void setSize(int w, int h){ if(w<=real_width && h<=real_height){ if(2*w < real_width && 2*h < real_height){ real_width/=2; real_height/=2; data=new byte[real_width*real_height]; mis=new MemoryImageSource(real_width, real_height, colormap.cm, data, 0, real_width); mis.setAnimated(true); } } else{ if(real_width0) System.arraycopy(p.data, 0, foo, 0, p.size); System.arraycopy(value, 0, foo, p.size, totalSize); p.size+=len; p.data=foo; } else if(mode==PropModePrepend){ byte[] foo=new byte[(format/8) * (len+p.size)]; System.arraycopy(value, 0, foo, 0, totalSize); if(p.size>0) System.arraycopy(p.data, 0, foo, totalSize, p.size); p.size+=len; p.data=foo; } // change; } else{ // w.setProperty(null); p=new Property(); p.propertyName=property; p.type=type; p.format=(short)format; p.data=value; p.size=len; p.next=w.getProperty(); w.setProperty(p); } if(p!=null){ if(p.propertyName==9 && // CUT_BUFFER0 w==w.screen.root && p.size>0){ CopyPaste.setString(new String(p.data, 0, p.size)); } if(w.screen.windowmode!=WeirdX.InBrowser && p.propertyName==39 && p.type==31 && p.size>0 && w.ddxwindow!=null){ java.awt.Window frame=w.getFrame(); if(frame!=null && (frame instanceof java.awt.Frame)){ ((java.awt.Frame)frame).setTitle(new String(p.data)); } } } } if (sendevent){ c.cevent.mkPropertyNotify(w.id, property, (int)System.currentTimeMillis(), 0); w.sendEvent(c.cevent, 1, null); } } static void reqRotateProperties(Client c) throws IOException{ int foo, propty; IO io=c.client; foo=io.readInt(); Window w=c.lookupWindow(foo); c.length-=2; if(w==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; return; } int n=(short)io.readShort(); int delta=(short)io.readShort(); c.length--; if(n==0){ return; } int[] atoms=new int[n]; Property[] props=new Property[n]; Property p; int i=0; while(n!=0){ atoms[i]=io.readInt(); c.length--; if(!Atom.valid(atoms[i])){ c.errorValue=atoms[i]; c.errorReason=5; // BadAtom return; } p=w.getProperty(); while(p!=null){ if(p.propertyName==atoms[i]){ props[i]=p; break; } p=p.next; } if(p==null){ c.errorReason=8; // BadMatch return; } i++; n--; } for(int j=0; j0){ bar=new byte[totalSize]; io.readByte(bar, 0, totalSize); if(c.swap){ switch(frmt){ case 16: swapS(bar, 0, totalSize); break; case 32: swapL(bar, 0, totalSize); break; default: } } io.readPad((-totalSize)&3); } c.length=0; if(c.errorReason!=0){ return; } changeWindowProperty(c, w, prpty, typ, frmt, mode, foo, bar, true); } private final static void swapS(byte[] b, int s, int len){ if((len)%2!=0){ // ?? return; } len+=s; byte bb; for(int i=s; i> 1; if ((next & lastResourceType)!=0) return 0; lastResourceClass=next; return next; } int id; int rtype; Resource(){} Resource(int id, int rtype){ this.id=id; this.rtype=rtype; } public int hashCode(){ return id; } public boolean equals(Object o){ if(o==null || id !=o.hashCode()) return false; if(!(o instanceof Resource)) return true; if(!(o instanceof Key)){ return rtype==((Resource)o).rtype; } Key key=(Key)o; if(key.clss==0){return rtype==key.rtype; } else if(key.clss==RC_ANY){ return true; } else{ return (rtype&key.clss)!=0; } } static void add(Resource r){ int client=((r.id & CLIENTMASK) >> CLIENTOFFSET); ClientResource cr=clients[client]; cr.put(r, r); } static void RemoveResource(Resource r){ int client=((r.id & CLIENTMASK) >> CLIENTOFFSET); ClientResource cr=clients[client]; RemoveResource(cr, r); } static void RemoveResource(ClientResource cr, Resource r){ synchronized(LOCK){ if ((r.rtype & RC_CACHED)!=0){ Client.flushCache(r.id); } } cr.remove(r); } static void freeResource(int id, int skip) { while(true){ Resource r=lookupIDByClass(id, RC_ANY); if(r==null) break; RemoveResource(r); try{ if (r.rtype !=skip){ deleteit(r); } }catch(Exception e){} } } static void freeResourceByType(int id, int typ, int skip) { Resource r=lookupIDByType(id, typ); if(r!=null){ RemoveResource(r); // should check type try{ if (r.rtype !=skip){ deleteit(r); } } catch(Exception e){} } } static Resource lookupIDByClass(int id, int clss){ int client=((id & CLIENTMASK) >> CLIENTOFFSET); if(clients.length<=client)return null; ClientResource cr=clients[client]; if(cr==null)return null; synchronized(cr){ try{ cr.key.id=id; cr.key.clss=clss; Resource r=(Resource)cr.get(cr.key); return r; } catch(Exception e){} return null; } } static Resource lookupIDByType(int id, int rtype){ int client=((id & CLIENTMASK) >> CLIENTOFFSET); if(clients.length<=client)return null; ClientResource cr=clients[client]; if(cr==null)return null; synchronized(cr){ cr.key.id=id; cr.key.clss=0; cr.key.rtype=rtype; Resource r=(Resource)cr.get(cr.key); return r; } } static void freeClientNeverResources(Client c){ if(c==null) return; ClientResource cr=clients[c.index]; synchronized(LOCK){ try{ for (Enumeration e=cr.elements() ; e.hasMoreElements();){ Resource r=(Resource)e.nextElement(); if ((r.rtype & RC_NEVERRETAIN)!=0){ deleteit(r); //System.out.println("freeclientResource: "+r); RemoveResource(cr, r); } } }catch(Exception e){} } } static void freeClientResources(Client c){ if(c==null) return; ClientResource cr=clients[c.index]; synchronized(LOCK){ try{ for (Enumeration e=cr.elements() ; e.hasMoreElements();){ Resource r=(Resource)e.nextElement(); deleteit(r); RemoveResource(cr, r); } }catch(Exception e){} } } static void deleteit(Resource r){ try{ r.delete(); } catch(Exception ee){ //System.out.println("r.delete: exception ->"+ee); //System.out.println("r="+r); } } void delete() throws IOException{ } static Client lookupClient(int rid){ Resource res=lookupIDByClass(rid, RC_ANY); int clientIndex=((rid & CLIENTMASK) >> CLIENTOFFSET); if (clientIndex!=0 && res!=null && clients[clientIndex]!=null && (rid & SERVER_BIT)==0){ return Client.clients[clientIndex]; } return null; } static void initClientResource(Client c){ ClientResource cr=clients[c.index]=new ClientResource(); cr.fakeID=c.clientAsMask | (c.index!=0 ? SERVER_BIT : SERVER_MINID); cr.endFakeID=(cr.fakeID | RESOURCE_ID_MASK)+1; cr.expectID=c.clientAsMask; } static int fakeClientId(Client c){ int id, maxid; id=clients[c.index].fakeID++; if (id !=clients[c.index].endFakeID){ return id; } //System.out.println("error: fakeClient "+id); return id; } /* static void dump(){ System.out.println("Resource.dump:"); for(int i=0; i0){ local=InetAddress.getByName(myName); } else{ local=InetAddress.getLocalHost(); } display=local.getHostName()+":"+num+".0"; } catch(Exception e){ display="localhost:"+num+".0"; System.out.println(e); } Frame jframe=new Frame(); jframe.setLayout(new GridLayout(0, 1)); Panel jpanel=null; jpanel=new Panel(); // jpanel.setBorder(BorderFactory.createTitledBorder("Host")); jpanel.setLayout(new BorderLayout()); host.setText(""); host.setSize(new Dimension(50, 25)); host.setEditable(true); jpanel.add(host, "Center"); jframe.add(jpanel); jpanel=new Panel(); // jpanel.setBorder(BorderFactory.createTitledBorder("User")); jpanel.setLayout(new BorderLayout()); name.setText(""); name.setSize(new Dimension(50, 25)); name.setEditable(true); jpanel.add(name, "Center"); jframe.add(jpanel); jpanel=new Panel(); // jpanel.setBorder(BorderFactory.createTitledBorder("Password")); jpanel.setLayout(new BorderLayout()); passwd.setSize(new Dimension(50, 25)); passwd.setEditable(true); passwd.setEchoChar('*'); jpanel.add(passwd, "Center"); jframe.add(jpanel); jpanel=new Panel(); // jpanel.setBorder(BorderFactory.createTitledBorder("Command with Absolute Path")); jpanel.setLayout(new BorderLayout()); command.setText(""); command.setSize(new Dimension(50, 25)); command.setEditable(true); jpanel.add(command, "Center"); command.addActionListener(this); jframe.add(jpanel); jpanel=new Panel(); jpanel.add(rexec, "Center"); rexec.addActionListener(this); jframe.add(jpanel); jframe.pack(); jframe.setVisible(true); } public static void main(String[] arg){ XRexec xsh=new XRexec(null, 2); } public void actionPerformed(java.awt.event.ActionEvent e) { char [] pass=null; try{pass=passwd.getText().toCharArray();}catch(Exception ee){} if(name.getText().length()==0 || host.getText().length()==0 || pass==null || pass.length==0 || command.getText().length()==0){ return; } try { String xcommand=null; xcommand="exec /bin/csh -cf \"setenv DISPLAY "+ display+"; exec "+ command.getText()+" < /dev/null >>& /dev/null \""; JRexec jrexec=new JRexec(name.getText(), host.getText(), new String(pass), xcommand); for(int i=0; i 0){ ddxwindow.setBorderPixmap(border.pixmap); } } catch(Exception ee){ //System.out.println("error: Window?? "+ee); } if(prnt.subSend()){ client.cevent.mkCreateNotify(prnt.id, id, x, y, width, height, borderWidth, (attr&overrideRedirect)!=0?0:1); prnt.sendEvent(client.cevent, 1, null); } } private final void changeAttr(Client c, int vmask) throws IOException{ int foo; boolean borderRelative=false; int index=0; int mask=vmask; IO io=c.client; while(mask!=0 && c.length!=0){ index=lowbit(mask); mask&=~index; c.length--; switch(index){ case CWBackPixmap: foo=io.readInt(); if((attr&backgroundState)==ParentRelative) borderRelative=true; if(foo==0){ if((attr&backgroundState)==BackgroundPixmap){ if(background.pixmap==null){ //System.err.println("BackPixmap: error!!"); } else{ try{background.pixmap.delete();}catch(Exception e){} background.pixmap=null; } } attr=attr&(~backgroundState); } else if(foo==ParentRelative){ if(parent!=null && depth!=parent.depth){ } if((attr&backgroundState)==BackgroundPixmap){ if(background.pixmap==null){ //System.err.println("BackPixmap: error!!"); } else{ try{background.pixmap.delete();}catch(Exception e){} background.pixmap=null; } } if(parent==null){ } else{ attr=(attr&~backgroundState)|(backgroundState&ParentRelative); } borderRelative=true; } else{ Pixmap pixmap=(Pixmap)Resource.lookupIDByType(foo, Resource.RT_PIXMAP); if(pixmap!=null){ if(pixmap.depth!=depth || pixmap.screen!=screen){ //System.err.println("error!!"); } if((attr&backgroundState)==BackgroundPixmap){ if(background.pixmap==null){ //System.err.println("BackPixmap: error!!"); } else{ try{background.pixmap.delete();}catch(Exception e){} background.pixmap=null; } } attr=(attr&~backgroundState)|(backgroundState&BackgroundPixmap); background.pixmap=pixmap; background.img=pixmap.getImage(this); pixmap.ref(); } else{ //System.err.println("error!!"); } } break; case CWBackPixel: foo=io.readInt(); if((attr&backgroundState)==ParentRelative){ borderRelative=true; } if((attr&backgroundState)==BackgroundPixmap){ if(background.pixmap==null){ //System.err.println("BackPixel: error!!"); } else{ try{background.pixmap.delete();}catch(Exception e){} background.pixmap=null; } } attr&=~backgroundState; attr|=BackgroundPixel; background.pixel=foo; break; case CWBorderPixmap: foo=io.readInt(); if(foo==CopyFromParent){ if(parent==null || depth!=parent.depth){ //System.err.println("err!!"); } if((attr&borderIsPixel)==0){ if(border.pixmap==null){ //System.err.println("BorderPixmap: error!!"); } else{ try{border.pixmap.delete();}catch(Exception e){} border.pixmap=null; } } border=parent.border.dup(); attr&=~borderIsPixel; attr|=(parent.attr&borderIsPixel); if((attr&borderIsPixel)!=0){ } else{ if(border.pixmap==null){ //System.err.println("BorderPixmap: error!!!"); } else{ border.pixmap.ref(); } } } else{ Pixmap pixmap=(Pixmap)Resource.lookupIDByType(foo, Resource.RT_PIXMAP); if(pixmap!=null){ if((pixmap.depth!=depth) || (pixmap.screen!=screen)){ //System.err.println("error!!"); } if((attr&borderIsPixel)==0){ if(border.pixmap==null){ //System.err.println("BorderPixmap: error!!"); } else{ try{border.pixmap.delete();}catch(Exception e){} border.pixmap=null; } } attr&=~borderIsPixel; border.pixmap=pixmap; pixmap.ref(); } else{ //System.err.println("error!!"); } } break; case CWBorderPixel: foo=io.readInt(); if((attr&borderIsPixel)==0){ if(border.pixmap==null){ //System.err.println("BorderPixmap: error!!"); } else{ try{border.pixmap.delete();}catch(Exception e){} border.pixmap=null; } } attr|=borderIsPixel; border.pixel=foo; break; case CWBitGravity: foo=io.readInt(); foo&=0xff; if(foo>StaticGravity){ //System.err.println("error!!"); } attr&=~bitGravity; attr|=(foo<StaticGravity){ //System.err.println("error!!"); } attr&=~winGravity; attr|=(foo<>dontPropagateOffset]--; } if(mask!=0){ i=DontPropagate.store(mask); } if(i!=0 || mask==0){ attr&=~dontPropagate; attr|=(i<>dontPropagateOffset]--; } OtherClients oc; while ((oc=getOtherClients())!=null ){ Resource.freeResource(oc.id, Resource.RT_NONE); } while ((passive=getPassiveGrabs())!=null){ Resource.freeResource(passive.id, Resource.RT_NONE); } } } private void deleteProperties() throws IOException{ Property pProp, pNextProp; pProp=getProperty(); while (pProp!=null){ client.cevent.mkPropertyNotify(id, pProp.propertyName, (int)System.currentTimeMillis(), 1 //Property.PropertyDelete ); sendEvent(client.cevent, 1, null); pNextProp=pProp.next; pProp.data=null; pProp=pNextProp; } } private void crushTree() throws IOException { Window child, sib, cparent; if((child=firstChild)==null) return; while (true){ if(child.firstChild!=null){ child=child.firstChild; continue; } while (true){ cparent=child.parent; if(child.substrSend()){ Event event=new Event(); event.mkDestroyNotify(child.id, child.id); try{ child.sendEvent(event, 1, null);} catch(Exception e){ //System.out.println("crush: exception -> "+e); } } try{ Resource.freeResource(child.id, Resource.RT_WINDOW); } catch(Exception e){ //System.out.println("crush: exception -> "+e); } sib=child.nextSib; child.attr&=~viewable; if((child.attr&realized)!=0){ child.attr&=~realized; child.attr|=visibility; child.ddxwindow.setVisible(false); if(screen.windowmode!=WeirdX.InBrowser && child.hasFrame()){ child.getFrame().setVisible(false); } } try{child.free();} catch(Exception e){ //System.out.println("crush: exception -> "+e); } if((child=sib)!=null) break; child=cparent; child.firstChild=null; child.lastChild=null; if(child==this) return; } } } void delete() throws IOException{ synchronized(LOCK){ try{unmapWindow(false);} catch(Exception e){ } try{ crushTree(); } catch(Exception e){ } if(id!=0 && parent!=null && substrSend()){ Event event=new Event(); event.mkDestroyNotify(id, id); try{sendEvent(event, 1, null);} catch(Exception e){ } } if(parent!=null){ if(parent.firstChild==this) parent.firstChild=nextSib; if(parent.lastChild==this) parent.lastChild=prevSib; if(nextSib!=null) nextSib.prevSib=prevSib; if(prevSib!=null) prevSib.nextSib=nextSib; } parent=null; nextSib=null; prevSib=null; firstChild=null; lastChild=null; prevSib=null; try{free();} catch(Exception e){ } } } static final void reqDestroyWindow(Client c) throws IOException{ int foo; IO io=c.client; foo=io.readInt(); c.length-=2; Window w=c.lookupWindow(foo); if(w==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; return; } if(w.parent!=null){ Resource.freeResource(w.id, Resource.RT_NONE); } } static final void reqSendEvent(Client c) throws IOException{ Window win; Window effectiveFocus=null; // only set if dest==InputFocus int foo; IO io=c.client; int prop=c.data; int dest=io.readInt(); int emask=io.readInt(); byte[] bb=new byte[32]; io.readByte(bb, 0, 32); c.length=0; Event event=new Event(bb); if(c.swap){ event.swap(); } if(dest==0/*PointerWindow*/){ win=sprite.win; } else{ win=c.lookupWindow(dest); } if(win==null){ c.errorValue=dest; c.errorReason=3; // BadWindow; return; } if((prop !=0) && (prop !=1)){ c.errorValue=prop; c.errorReason=2; // BadValue; return; } event.setType((byte)(event.getType()|0x80)); if(prop!=0){ for(;win!=null; win=win.parent){ if(win.sendEvent(event, 1, emask, null, 0)!=0) return; emask &=~win.getDontPropagateMask(); if(emask==0) break; } } else{ win.sendEvent(event, 1, emask, null, 0); } return; } static final void reqGetPointerMapping(Client c) throws IOException{ int foo,n; IO io=c.client; synchronized(io){ io.writeByte(1); io.writeByte(0); io.writeShort(c.seq); io.writeInt(0); io.writePad(24); io.flush(); } } static final void reqSetPointerMapping(Client c) throws IOException{ int foo, n; IO io=c.client; foo=c.data; n=c.length; n--; while(n!=0){ foo=io.readInt(); n--; } synchronized(io){ io.writeByte(1); io.writeByte((byte)1); io.writeShort(c.seq); io.writeInt(0); io.writePad(24); io.flush(); } } static final void reqGetPointerControl(Client c) throws IOException{ int foo,n; IO io=c.client; synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(0); io.writeShort(2); io.writeShort(1); io.writeShort(4); io.writePad(18); io.flush(); } } static final void reqQueryPointer(Client c) throws IOException{ int n, foo; IO io=c.client; foo=io.readInt(); c.length-=2; Window w=c.lookupWindow(foo); if(w==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; return; } int hx=Window.sprite.hot.x; int hy=Window.sprite.hot.y; Window child=null; synchronized(LOCK){ for(Window ww=Window.sprite.win; ww!=null; ww=ww.parent){ if(ww.parent==w){ child=ww; break; } } if(child!=null){ if(!child.contains(hx, hy)){ sprite.win=xy2Window(hx, hy, null); child=null; for(Window ww=sprite.win; ww!=null; ww=ww.parent){ if(ww.parent==w){ child=ww; break; } } } } } synchronized(io){ io.writeByte(1); io.writeByte(1); io.writeShort(c.seq); io.writeInt(0); io.writeInt(w.screen.rootId); io.writeInt((child==null? 0 : child.id)); io.writeShort(hx); io.writeShort(hy); io.writeShort(hx-w.x); io.writeShort(hy-w.y); io.writeShort(Window.sprite.hot.state); // io.writeShort(0); // ????????? io.writePad(6); io.flush(); } } static final void reqGetGeometry(Client c) throws IOException{ IO io=c.client; int foo=io.readInt(); Drawable d=c.lookupDrawable(foo); c.length-=2; if(d==null){ c.errorValue=foo; c.errorReason=9; // BadValue; return; } synchronized(io){ io.writeByte(1); io.writeByte(d.depth); io.writeShort(c.seq); io.writeInt(0); io.writeInt(d.screen.rootId); if((d.type==UNDRAWABLE_WINDOW)|| ((d.type==DRAWABLE_WINDOW) && foo==d.id)){ Window w=(Window)d; io.writeShort(w.origin.x-w.borderWidth); io.writeShort(w.origin.y-w.borderWidth); io.writeShort(w.width); io.writeShort(w.height); io.writeShort(w.borderWidth); } else{ io.writeShort(0); io.writeShort(0); io.writeShort(d.width); io.writeShort(d.height); io.writeShort(0); } io.writePad(10); io.flush(); } } static final void reqChangeWindowAttributes(Client c) throws IOException{ int foo; IO io=c.client; int wid=io.readInt(); int mask=io.readInt(); c.length-=3; Window w=c.lookupWindow(wid); if(w==null){ c.errorValue=wid; c.errorReason=3; // BadWindow; return; } mask&=0x7fff; if(mask!=0){ w.changeAttr(c, mask); } if(c.errorReason!=0){ return; } if((mask&CWBorderPixmap)!=0 || (mask&CWBorderPixel)!=0){ w.ddxwindow.setBorderPixmap(w.border.pixmap); } } static final void reqUngrabPointer(Client c) throws IOException{ int foo, n; IO io=c.client; foo=io.readInt(); if((Window.grab!=null) && Window.grab.sameClient(c)){ Window.grab.deactivatePointerGrab(); } } static final void reqUngrabButton(Client c) throws IOException{ int foo; int button, mod; IO io=c.client; button=c.data; foo=io.readInt(); c.length-=2; Window gw=c.lookupWindow(foo); if(gw==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; return; } mod=io.readShort(); io.readPad(2); c.length--; Grab grab=Grab.createGrab(c, gw, 0, 0, 0, 0, mod, 4, button, null); if(!grab.deletePassiveGrabFromList()){ c.errorReason=11; // BadAlloc } } static final void reqGrabButton(Client c) throws IOException{ int foo, n; int pmode, kmode, oe, emask, button, mod; IO io=c.client; oe=c.data; if(oe!=0 && oe!=1){ } foo=io.readInt(); Window gw=c.lookupWindow(foo); if(gw==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; } emask=io.readShort(); if((emask&~Event.PointerGrabMask)!=0){ } pmode=io.readByte(); if((pmode!=GrabModeSync) && (pmode!=GrabModeAsync)){ } kmode=io.readByte(); if((kmode!=GrabModeSync) && (kmode!=GrabModeAsync)){ } foo=io.readInt(); Window cto=null; if(foo!=0){ cto=c.lookupWindow(foo); } foo=io.readInt(); button=io.readByte(); io.readPad(1); mod=io.readShort(); c.length-=6; if(c.errorReason!=0){ return; } if(gw==null || cto==null){ } Grab grab=Grab.createGrab(c, gw, emask, oe, kmode, pmode, mod, Event.ButtonPress, button, cto); grab.addPassiveGrabToList(); } static final void reqGrabPointer(Client c) throws IOException{ int foo, n; int pmode, kmode, oe, emask, time; IO io=c.client; oe=c.data; if(oe!=0 && oe!=1){ c.errorValue=oe; c.errorReason=2; // BadValue; } foo=io.readInt(); Window gw=c.lookupWindow(foo); if(gw==null){ c.errorValue=foo; c.errorReason=3; // BadWindow } emask=io.readShort(); if((emask&~Event.PointerGrabMask)!=0){ c.errorValue=emask; c.errorReason=2; // BadValue; } pmode=io.readByte(); if((pmode!=GrabModeSync) && (pmode!=GrabModeAsync)){ c.errorValue=pmode; c.errorReason=2; // BadValue } kmode=io.readByte(); if((kmode!=GrabModeSync) && (kmode!=GrabModeAsync)){ c.errorValue=kmode; c.errorReason=2; // BadValue } foo=io.readInt(); Window cto=null; if(foo!=0){ cto=c.lookupWindow(foo); if(cto==null){ c.errorValue=foo; c.errorReason=3; // BadWindow } } foo=io.readInt(); Cursor cur=null; if(foo!=0){ cur=(Cursor)Resource.lookupIDByType(foo, Resource.RT_CURSOR); if(cur==null){ c.errorValue=foo; c.errorReason=6; //BadCursor } } time=io.readInt(); c.length-=6; if(c.errorReason!=0){ return; } int res=0; if(Window.grab!=null && c!=Window.grab.getClient()){ res=AlreadyGrabbed; } else if((gw.attr&realized)==0|| (cto!=null && !((cto.attr&realized)!=0 &&(cto.width!=0 || cto.height!=0)))){ res=GrabNotViewable; } else { Grab grab=new Grab(Resource.fakeClientId(c)); grab.set(c.clientAsMask, gw, oe, emask, kmode, pmode, cto); grab.activatePointerGrab((int)System.currentTimeMillis(), true); res=GrabSuccess; } synchronized(io){ io.writeByte(1); io.writeByte(res); io.writeShort(c.seq); io.writeInt(0); io.writePad(24); io.flush(); } } static final void reqCreateWindow(Client c) throws IOException{ int foo; byte depth; int x, y, width, height, bwidth, clss; int visual; int mask; IO io=c.client; depth=(byte)c.data; int wid=io.readInt(); foo=io.readInt(); Window prnt=c.lookupWindow(foo); x=io.readShort(); y=io.readShort(); width=io.readShort(); height=io.readShort(); bwidth=io.readShort(); clss=io.readShort(); visual=io.readInt(); mask=io.readInt(); c.length-=8; if(prnt==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; } if((width==0 || height==0) && c.errorReason==0){ c.errorValue=0; c.errorReason=2; // BadValue; } Window w=null; if(c.errorReason==0){ w=new Window(wid, prnt, x, y, width, height, bwidth, clss, depth, c, visual, mask); } if(c.errorReason!=0){ return; } Resource.add(w); } int sendEvent(Event event, int count, int filter, Grab grab, int mskidx) throws IOException{ int deliveries=0, nondeliveries=0; int attempt; Client c=null; int deliveryMask=0; int type=event.getType(); if((filter==Event.CantBeFiltered) || ((type & Event.EXTENSION_EVENT_BASE)==0)){ if((filter !=Event.CantBeFiltered) && (((getOtherEventMask()|eventMask) & filter)==0)){ return 0; } attempt=1; try{ attempt=client.sendEvent(event, count, eventMask, filter, grab); } catch(Exception e){ } if(attempt !=0 ){ if(attempt > 0){ deliveries++; c=client; deliveryMask=eventMask; } else nondeliveries--; } } Clients other; if(filter !=Event.CantBeFiltered){ if((type & Event.EXTENSION_EVENT_BASE)!=0){ OtherInputMasks inputMasks; inputMasks=(optional==null?null:optional.otherInputMasks); if((inputMasks==null) || ((inputMasks.inputEvents[mskidx] & filter)==0)){ return 0; } other=(Clients)(inputMasks.inputClients); } else{ other=(Clients)(optional==null?null:optional.otherClients); } for(; other!=null; other=(OtherClients)other.next){ attempt=1; try{ if(other.getClient()!=null){ int mask=(other instanceof OtherClients) ? ((OtherClients)other).mask : ((InputClients)other).mask[mskidx]; attempt=other.getClient().sendEvent(event, count, mask, filter, grab); } else{ attempt=0; } } catch(Exception e){ } if(attempt!=0){ if(attempt > 0){ deliveries++; c=other.getClient(); deliveryMask=((other instanceof OtherClients) ? ((OtherClients)other).mask : ((InputClients)other).mask[mskidx]); } else nondeliveries--; } } } if(c==null){ if(deliveries!=0){ return deliveries; } return nondeliveries; } if((type==Event.ButtonPress) && (deliveries!=0) && (grab==null)){ grab=new Grab(Resource.fakeClientId(c)); grab.set(c.clientAsMask, this, (deliveryMask & Event.OwnerGrabButtonMask), deliveryMask, GrabModeAsync, GrabModeAsync, null); grab.activatePointerGrab((int)System.currentTimeMillis(), true); } if(deliveries!=0) return deliveries; return nondeliveries; } int sendEvent(Event event, int count, Window otherParent)throws IOException{ int filter; int deliveries; if(count==0) return 0; filter=Event.filters[event.getType()]; if(((filter & Event.SubstructureNotifyMask)!=0) && (event.getType() !=Event.CreateNotify)){ event.putEvent(id); } if(filter !=Event.StructureAndSubMask){ return sendEvent(event, count, filter, null, 0); } deliveries=sendEvent(event, count, Event.StructureNotifyMask, null, 0); if(parent!=null){ event.putEvent(parent.id); deliveries +=parent.sendEvent(event, count, Event.SubstructureNotifyMask, null, 0); if(event.getType()==Event.ReparentNotify){ event.putEvent(otherParent.id); deliveries +=otherParent.sendEvent(event, count, Event.SubstructureNotifyMask, null, 0); } } return deliveries; } int sendEvent(Event event, int count, int filter, Client c) throws IOException{ if((eventMask&filter)!=0){ if(client==c) return 0; return client.sendEvent(event, count, eventMask, filter, null); } OtherClients other=(optional==null) ? null: optional.otherClients; for(; other!=null; other=(OtherClients)other.next){ if((other.mask & filter)!=0){ if(other.sameClient(c)) return 0; if(other.getClient()==null) return 0; return other.getClient().sendEvent(event, count, other.mask, filter, null); } } return 2; } private Window findOptional(){ Window w=this; do{w=w.parent;}while(w.optional==null); return w; } private void setDefault(){ prevSib=null; firstChild=null; lastChild=null; optional=null; attr=0; attr|=cursorIsNone; attr|=visibility; attr|=(NorthWestGravity<>overrideRedirectOffset); tmpw.sendEvent(c.cevent, 1, null); } if(firstMapped==null) firstMapped=tmpw; if((w.attr&realized)!=0){ tmpw.realizeTree(); } } } if(firstMapped!=null){ restructured (); } } } static final void reqUnmapWindow(Client c) throws IOException{ int foo; IO io=c.client; foo=io.readInt(); c.length-=2; Window w=c.lookupWindow(foo); if(w==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; return; } synchronized(LOCK){ w.unmapWindow(false); } } private void unrealizeTree(boolean fromConfigure){ Window child=this; while (true){ if((child.attr&realized)!=0){ child.attr&=~realized; child.attr|=visibility; //VisibilityNotViewable child.ddxwindow.setVisible(false); if(screen.windowmode!=WeirdX.InBrowser && child.hasFrame()){ child.getFrame().setVisible(false); } try{child.deleteEvent(false);} catch(Exception e){ //System.out.println(e); } if((child.attr&viewable)!=0){ child.attr&=~viewable; } if(child.firstChild!=null){ child=child.firstChild; continue; } } while (child.nextSib==null && (child !=this)) child=child.parent; if(child==this) break; child=child.nextSib; } if(parent!=null && borderWidth>0){ parent.ddxwindow.draw(origin.x-borderWidth, origin.y-borderWidth, width+2*borderWidth, height+2*borderWidth); } } private void realizeTree() throws IOException { Window child=this; while (true){ if((child.attr&mapped)!=0){ child.attr|=realized; child.attr|=(child.clss==InputOutput) ? viewable : 0; child.attr&=~visibility; child.attr|=(VisibilityUnobscured<>overrideRedirectOffset); sendEvent(c.cevent, 1, null); } if((this.parent.attr&realized)==0) return; this.realizeTree(); restructured (); } else{ this.attr|=mapped; this.attr|=realized; this.attr|=(this.clss==InputOutput) ? viewable : 0; } } static void restructured () throws IOException{ try{checkMotion(null, null);} catch(Exception e){ } } static boolean checkMotion (Event e, Window hint) throws IOException{ Window prevSpriteWin=sprite.win; sprite.win=xy2Window(sprite.hot.x, sprite.hot.y, hint); if(sprite.win !=prevSpriteWin){ if(prevSpriteWin !=null){ try{enter_leaveEvent(prevSpriteWin, sprite.win, NotifyNormal);} catch(Exception ee){ //System.out.println("checkmotion: execption -> "+ee); } } return false; } return true; } static void enter_leaveEvent(int type, int mode, int detail, Window win, int child) throws IOException { int mask; Grab grab=Window.grab; if(grab!=null){ mask=(win==grab.window) ? grab.eventMask : 0; if((grab.attr&grab.ownerEvents)!=0){ mask |=win.getEventMask(grab.getClient()); } } else { mask=win.eventMask | win.getOtherEventMask(); } if((mask & Event.filters[type])!=0){ Event event=new Event(); event.fixUpEventFromWindow(win, 0, sprite.hot.x, sprite.hot.y, false); int flags=0; flags=(event.getSameScreen()!=0?2:0); flags|=1; mode=0; event.mkPointer(type, detail, (int)System.currentTimeMillis(), child, sprite.hot.x, sprite.hot.y, sprite.hot.state, mode, flags); try{ if(grab!=null){ if(grab.getClient()!=null) grab.getClient().sendEvent(event, 1, mask, Event.filters[type], grab); } else{ win.sendEvent(event, 1, Event.filters[type], null, 0); } } catch(Exception e){ //System.out.println("enter_leaveEvent: exception -> "+e); } } if((type==Event.EnterNotify) && ((mask & Event.KeymapStateMask)!=0)){ // KeymapNotify } } private int getEventMask(Client c){ if(c==null) return 0; if(client==c) return eventMask; if(client==null) return 0; for(OtherClients other=getOtherClients(); other!=null; other=(OtherClients)other.next){ if(other.sameClient(c)) return other.mask; } return 0; } private static void enterNotifies(Window ancestor, Window child, int mode, int detail) throws IOException{ Window parent=child.parent; if(ancestor==parent) return; enterNotifies(ancestor, parent, mode, detail); enter_leaveEvent(Event.EnterNotify, mode, detail, parent, child.id); } private static void leaveNotifies(Window child, Window ancestor, int mode, int detail) throws IOException{ if(ancestor==child) return; for(Window win=child.parent; win !=ancestor; win=win.parent){ enter_leaveEvent(Event.LeaveNotify, mode, detail, win, child.id); child=win; } } static void enter_leaveEvent(Window fromWin, Window toWin, int mode) throws IOException{ if(fromWin==toWin) return; if(fromWin.isParent(toWin)){ try{ enter_leaveEvent(Event.LeaveNotify, mode, NotifyInferior, fromWin, 0); } catch(Exception e){ } try{ enterNotifies(fromWin, toWin, mode, NotifyVirtual); } catch(Exception e){ } try{ enter_leaveEvent(Event.EnterNotify, mode, NotifyAncestor, toWin, 0); } catch(Exception e){ } } else if(toWin.isParent(fromWin)){ try{ enter_leaveEvent(Event.LeaveNotify, mode, NotifyAncestor, fromWin, 0); } catch(Exception e){ } try{ leaveNotifies(fromWin, toWin, mode, NotifyVirtual); } catch(Exception e){ } try{ enter_leaveEvent(Event.EnterNotify, mode, NotifyInferior, toWin, 0); } catch(Exception e){ } } else { Window common=toWin.commonAncestor(fromWin); try{ enter_leaveEvent(Event.LeaveNotify, mode, NotifyNonlinear, fromWin, 0); } catch(Exception e){ } try{ leaveNotifies(fromWin, common, mode, NotifyNonlinearVirtual); } catch(Exception e){ } try{ enterNotifies(common, toWin, mode, NotifyNonlinearVirtual); } catch(Exception e){ } try{ enter_leaveEvent(Event.EnterNotify, mode, NotifyNonlinear, toWin, 0); } catch(Exception e){ } } } boolean contains(int xx, int yy){ return ddxwindow.contains(xx-x-borderWidth, yy-y-borderWidth); } static Window xy2Window(int x, int y, Window hint){ if(hint!=spriteTrace[spriteTraceGood-1]){ spriteTraceGood=1; } // else{ System.out.println("skip!!"); } Window win=spriteTrace[spriteTraceGood-1]; if(((win.attr&mapped)==0) || !win.contains(x, y)){ win=spriteTrace[0]; spriteTraceGood=1; } win=win.firstChild; while (win!=null){ if(((win.attr&mapped)!=0) && win.contains(x, y)){ if(spriteTraceGood >=spriteTrace.length){ Window[] foo=new Window[spriteTrace.length+10]; System.arraycopy(spriteTrace, 0, foo, 0, spriteTrace.length); spriteTrace=foo; } spriteTrace[spriteTraceGood++]=win; win=win.firstChild; } else{ win=win.nextSib; } } return spriteTrace[spriteTraceGood-1]; } Cursor getCursor(){ if(optional!=null) return optional.cursor; Window p=findOptional(); return p.optional.cursor; } private boolean redirectSend(){ return ((eventMask|getOtherEventMask()) & Event.SubstructureRedirectMask)!=0; } private boolean subSend(){ return ((eventMask|getOtherEventMask()) & Event.SubstructureNotifyMask)!=0; } private boolean strSend(){ return ((eventMask|getOtherEventMask()) & Event.StructureNotifyMask)!=0; } private boolean substrSend(){ return strSend() || parent.subSend(); } void makeOptional(){ if(optional!=null) return; optional=new WindowOpt(); optional.dontPropagateMask=DontPropagate.masks[(attr&dontPropagate)>>dontPropagateOffset]; optional.otherEventMasks=0; optional.backingBitPlanes=~0L; optional.backingPixel=0; if(parent!=null){ WindowOpt parentOptional=findOptional().optional; optional.visual=parentOptional.visual; if((attr&cursorIsNone)==0){ optional.cursor=parentOptional.cursor; } else { optional.cursor=null; } optional.colormap=parentOptional.colormap; } } private void sendVisibilityNotify() throws IOException{ Event event=new Event(); event.mkVisibilityNotify(id, (attr&visibility)>>visibilityOffset); sendEvent(event, 1, null); } static final void reqQueryTree(Client c) throws IOException{ int foo; Window prnt; Window w; int wid; int x, y, width, height, bwidth, clss; int visual; int mask; int rootId; IO io=c.client; wid=io.readInt(); c.length-=2; w=c.lookupWindow(wid); if(w==null){ c.errorValue=wid; c.errorReason=3; // BadWindow; return; } synchronized(LOCK){ int numchild=0; for(Window p=w.lastChild; p !=null; p=p.prevSib){ numchild++; } synchronized(io){ io.writeByte(1); io.writePad(1); io.writeShort(c.seq); io.writeInt(numchild); io.writeInt(w.screen.rootId); if(w.parent!=null) io.writeInt(w.parent.id); else io.writeInt(0); io.writeShort(numchild); io.writePad(14); if(0 focus.traceSize){ focus.traceSize=depth+1; focus.trace=new Window[focus.traceSize]; } focus.traceGood=depth; depth--; for(Window tmpw=win; tmpw!=null; tmpw=tmpw.parent, depth--){ focus.trace[depth]=tmpw; } } } } static final void reqGetInputFocus(Client c) throws IOException{ int foo; IO io=c.client; synchronized(io){ io.writeByte(1); io.writeByte(focus.revert); // revert-to io.writeShort(c.seq); io.writeInt(0); io.writeInt(focus.win); // focus io.writePad(20); io.flush(); } } static final void reqGetWindowAttributes(Client c) throws IOException{ int foo; IO io=c.client; foo=io.readInt(); c.length-=2; Window w=c.lookupWindow(foo); if(w==null){ c.errorValue=foo; c.errorReason=3; // BadWindow return; } synchronized(io){ io.writeByte(1); if((w.attr&forcedBS)!=0 && (w.attr&backingStore)!=2) io.writeByte(0); // NotUseful else io.writeByte((w.attr&backingStore)>>backingStoreOffset); io.writeShort(c.seq); io.writeInt(3); io.writeInt(w.getVisual()); io.writeShort(w.clss); io.writeByte((w.attr&bitGravity)>>bitGravityOffset); io.writeByte((w.attr&winGravity)>>winGravityOffset); io.writeInt(w.getBackingBitPlanes()); io.writeInt(w.getBackingPixel()); io.writeByte((w.attr&saveUnder)>>saveUnderOffset); if(w.getColormapId()==0) io.writeByte(0); else io.writeByte(Colormap.isMapInstalled(w.getColormapId(), w)); if((w.attr&mapped)==0) io.writeByte(0); else if((w.attr&realized)!=0) io.writeByte(2); else io.writeByte(1); io.writeByte((w.attr&overrideRedirect)>>overrideRedirectOffset); io.writeInt(w.getColormapId()); io.writeInt(w.eventMask|w.getOtherEventMask()); io.writeInt(w.getEventMask(c)); io.writeShort(w.getDontPropagateMask()); io.writePad(2); io.flush(); } } static final void reqCopyPlane(Client c) throws IOException{ int foo; Drawable dsrc=null, ddst=null; IO io=c.client; foo=io.readInt(); dsrc=c.lookupDrawable(foo); if(dsrc==null){ c.errorValue=foo; c.errorReason=9; // Drawable } int dest=io.readInt(); ddst=c.lookupDrawable(dest); if(ddst==null && c.errorReason==0){ c.errorValue=dest; c.errorReason=9; // Drawable } foo=io.readInt(); GC gc=c.lookupGC(foo); if(gc==null && c.errorReason==0){ c.errorValue=foo; c.errorReason=13; // BadGC; } int sx, sy, dx, dy, width, height; sx=(short)io.readShort(); sy=(short)io.readShort(); int destx, desty; destx=(short)io.readShort(); dx=destx-sx; desty=(short)io.readShort(); dy=desty-sy; width=io.readShort(); height=io.readShort(); int bplane=io.readInt(); c.length-=8; if(c.errorReason!=0){ return; } Graphics g=ddst.getGraphics(); if(((dsrc instanceof Window) && !((Window)dsrc).ddxwindow.isVisible())){ g=null; } if(dsrc.width<=sx || dsrc.height<=sy || (sx+width)<=0 || (sy+height)<=0 || (destx+width)<=0 || (desty+height)<=0){ g=null; } if(g!=null){ if(dsrc instanceof Window){ if(ddst instanceof Window){ ((Window)dsrc).ddxwindow.copyArea(((Window)ddst), gc, sx, sy, width, height, destx, desty); } } else { Image img=null; if(ddst instanceof Pixmap){ ((Pixmap)dsrc).copyPlane((Pixmap)ddst, gc, sx, sy, destx, desty, width, height); } else{ img=((Pixmap)dsrc).getImage((Window)ddst, gc, sx, sy, width, height); Window wdst=(Window)ddst; if(sx==0 && sy==0 && width==dsrc.width && height==dsrc.height){ wdst.ddxwindow.drawImage(gc.clip_mask, img, destx, desty, width, height); } else{ java.awt.Shape tmp=g.getClip(); g.clipRect(destx, desty, width, height); wdst.ddxwindow.drawImage(gc.clip_mask, img, destx-sx, desty-sy, dsrc.width, dsrc.height); if(tmp==null){ g.setClip(0, 0, wdst.width, wdst.height); } else{ g.setClip(tmp); } } wdst.draw(destx, desty, width, height); if(img!=((Pixmap)dsrc).getImage()){ img.flush(); } } } } } static final void reqCopyArea(Client c) throws IOException{ int foo; Drawable dsrc=null, ddst=null; IO io=c.client; foo=io.readInt(); dsrc=c.lookupDrawable(foo); if(dsrc==null){ c.errorValue=foo; c.errorReason=9; // BadDrawable; } int dest=io.readInt(); ddst=c.lookupDrawable(dest); if(ddst==null && c.errorReason==0){ c.errorValue=dest; c.errorReason=9; // BadDrawable; } foo=io.readInt(); GC gc=c.lookupGC(foo); if(gc==null && c.errorReason==0){ c.errorValue=foo; c.errorReason=13; // BadGC; } int sx, sy; sx=(short)io.readShort(); sy=(short)io.readShort(); int destx, desty; destx=(short)io.readShort(); desty=(short)io.readShort(); int width, height; width=io.readShort(); height=io.readShort(); c.length-=7; if(c.errorReason!=0){ return; } Graphics g=ddst.getGraphics(); if(((dsrc instanceof Window) && !((Window)dsrc).ddxwindow.isVisible())){ g=null; } if(dsrc.width<=sx || dsrc.height<=sy || (sx+width)<=0 || (sy+height)<=0 || (destx+width)<=0 || (desty+height)<=0){ g=null; } /* System.out.println("copyArea: "+dsrc+" sx="+sx+",sy="+sy+ ", w="+width+", h="+height+" "+ ddst+" destx="+destx+",desty="+desty); */ if(g!=null){ if(dsrc instanceof Window){ if(sx<0){sx=0;} if(sy<0){sy=0;} if(destx<0){destx=0;} if(desty<0){desty=0;} if(ddst instanceof Window){ ((Window)dsrc).ddxwindow. copyArea(((Window)ddst), gc, sx, sy, width, height, destx, desty); } // else{ // ((Window)dsrc).ddxwindow. // copyArea((Pixmap)ddst, gc, // sx, sy, destx, desty, width, height); // } } else { if(ddst instanceof Pixmap){ if(sx<0){sx=0;} if(sy<0){sy=0;} if(destx<0){destx=0;} if(desty<0){desty=0;} ((Pixmap)dsrc).copyArea((Pixmap)ddst, gc, sx, sy, destx, desty, width, height); } else{ Image img=((Pixmap)dsrc).getImage((Window)ddst, gc, sx, sy, width, height); Window wdst=(Window)ddst; if(sx==0 && sy==0 && width==dsrc.width && height==dsrc.height){ wdst.ddxwindow.drawImage(gc.clip_mask, img, destx, desty, width, height); } else{ java.awt.Shape tmp=g.getClip(); if(destx>=0 && desty>=0){ g.clipRect(destx, desty, width, height); } else{ g.clipRect((destx<0?0:destx), (desty<0?0:desty), (destx<0?width+destx:width), (desty<0?height+desty:height)); } wdst.ddxwindow.drawImage(gc.clip_mask, img, destx-sx, desty-sy, dsrc.width, dsrc.height); if(tmp==null){ g.setClip(0, 0, wdst.width, wdst.height); } else{ g.setClip(tmp); } } wdst.draw(destx, desty, width, height); if(img!=((Pixmap)dsrc).getImage()){ img.flush(); } } } } if((gc.attr&GC.graphicsExposures)!=0){ c.cevent.mkNoExposure(dest, 0, 62); c.sendEvent(c.cevent, 1, 0, Event.NoEventMask, null); } } static final void reqClearArea(Client c) throws IOException{ int foo; int exposures=c.data; IO io=c.client; foo=io.readInt(); c.length-=2; Window w=c.lookupWindow(foo); if(w==null){ c.errorValue=foo; c.errorReason=3; // BadWindow; return; } int x, y, width, height; x=(short)io.readShort(); y=(short)io.readShort(); width=io.readShort(); if(width==0){width=w.width-x;} height=io.readShort(); if(height==0){height=w.height-y;} c.length-=2; if(c.errorReason!=0){ return; } if(w.getGraphics()!=null){ // isMapped?? w.makeBackgroundTile(x, y, width, height); w.draw(x, y, width+1, height+1); } if(exposures!=0){ c.cevent.mkExpose(w.id, x, y, width, height, 0); c.sendEvent(c.cevent, 1, Event.filters[Event.Expose], Event.filters[Event.Expose], Window.grab); } } void draw(){ ddxwindow.draw(); } void draw(int x, int y, int width, int height){ ddxwindow.draw(x, y, width, height); } private Window trackParent(){ Window w=this; while(true){ if(w.optional!=null)break; w=w.parent; } return w; } private Client getClient(){ return Client.clients[(((id) & Client.CLIENTMASK) >> Client.CLIENTOFFSET)]; } private int getBackingBitPlanes(){ if(optional==null)return ~0; return (int)optional.backingBitPlanes; } private int getBackingPixel(){ if(optional==null)return 0; return (int)optional.backingPixel; } OtherClients getOtherClients(){ if(optional==null)return null; return optional.otherClients; } static java.awt.Frame owner=new java.awt.Frame(); java.awt.Window frame=null; static private final int poolsize=5; static java.awt.Window[] frames=new java.awt.Window[poolsize]; java.awt.Window getFrame(){ if(hasFrame()) return optional.frame; if(parent!=screen.root){ return null; } makeOptional(); if(screen.windowmode==WeirdX.RootlessWM && !screen.root.redirectSend() && (attr&(1<<16))==0){ optional.frame=new java.awt.Frame(); optional.frame.addMouseListener((java.awt.event.MouseListener)ddxwindow); return optional.frame; } synchronized(Window.class){ java.awt.Window foo=null; for(int i=0; i>dontPropagateOffset]; return optional.dontPropagateMask; } Grab getPassiveGrabs(){ if(optional==null) return null; return optional.passiveGrabs; } int getOtherEventMask(){ if(optional==null) return 0; return optional.otherEventMasks; } void setColormap(Colormap cmap){ makeOptional(); optional.colormap=cmap; } Colormap getColormap(){ return trackParent().optional.colormap; } private int getColormapId(){ if(clss==InputOnly) return 0; return getColormap().id; } void setVisual(int id){ makeOptional(); optional.visual=id; } private int getVisual(){ return trackParent().optional.visual; } boolean isMapped(){ return (attr&mapped)!=0; } boolean isRealized(){ return (attr&realized)!=0; } boolean isViewable(){ return (attr&viewable)!=0; } boolean isBorderPixel(){ return (attr&borderIsPixel)!=0; } void setBorderIsPixel(){ attr|=borderIsPixel; } void setBackgroundIsPixel(){ attr&=~backgroundState; attr|=BackgroundPixel; } boolean hasParentRelativeBorder(){ return (attr&borderIsPixel)==0 && hasBorder() && (attr&backgroundState)==ParentRelative; } boolean hasBorder(){ return borderWidth!=0; } private void reflectStackChange(Window sib) throws IOException{ boolean wasViewable=(attr&viewable)!=0; if(parent==null) return; Window firstChange=moveInStack(sib); if((attr&realized)!=0){ restructured(); } } private int isSiblingAboveMe(Window sib){ Window win=parent.firstChild; while (win!=null){ if(win==sib) return(Above); else if(win==this) return(Below); win=win.nextSib; } return(Below); } private Window getPlaceInTheStack(Window sib, int x, int y, int w, int h, int smode){ if((this==parent.firstChild) && (this==parent.lastChild)) return null; Window first=parent.firstChild; switch (smode){ case Above: if(sib!=null) return(sib); else if(this==first) return(nextSib); else return(first); case Below: if(sib!=null) if(sib.nextSib !=this) return(sib.nextSib); else return(nextSib); else return null; case TopIf: if((((attr&mapped)==0) || (sib!=null && (sib.attr&mapped)==0))) return(nextSib); else if(sib!=null){ if((isSiblingAboveMe(sib)==Above)) return(first); else return(nextSib); } else return(first); case BottomIf: if((((attr&mapped)==0) || (sib!=null && (sib.attr&mapped)==0))) return(nextSib); else if(sib!=null){ if((isSiblingAboveMe(sib)==Below)) return null; else return(nextSib); } else return null; case Opposite: if((((attr&mapped)==0) || (sib!=null && (sib.attr&mapped)==0))) return(nextSib); else if(sib!=null){ if(isSiblingAboveMe(sib)==Above) return(first); else return null; } else return(first); default: return nextSib; } } private Window moveInStack(Window next){ Window firstChange=this; synchronized(LOCK){ if(nextSib !=next){ if(next==null){ // to bottom if(parent.firstChild==this) parent.firstChild=nextSib; firstChange=nextSib; nextSib.prevSib=prevSib; if(prevSib!=null) prevSib.nextSib=nextSib; parent.lastChild.nextSib=this; prevSib=parent.lastChild; nextSib=null; parent.lastChild=this; if(screen.windowmode==WeirdX.InBrowser || parent!=screen.root){ parent.ddxwindow.add((java.awt.Component)(this.ddxwindow), -1); } } else if(parent.firstChild==next){ // to top firstChange=this; if(parent.lastChild==this) parent.lastChild=prevSib; if(nextSib!=null) nextSib.prevSib=prevSib; if(prevSib!=null) prevSib.nextSib=nextSib; nextSib=parent.firstChild; prevSib=null; next.prevSib=this; parent.firstChild=this; if(screen.windowmode==WeirdX.InBrowser || parent!=screen.root){ parent.ddxwindow.add((java.awt.Component)(this.ddxwindow), 0); } } else{ // in middle Window pOldNext=nextSib; firstChange=null; if(parent.firstChild==this) firstChange=parent.firstChild=nextSib; if(parent.lastChild==this){ firstChange=this; parent.lastChild=prevSib; } if(nextSib!=null) nextSib.prevSib=prevSib; if(prevSib!=null) prevSib.nextSib=nextSib; nextSib=next; prevSib=next.prevSib; if(next.prevSib!=null) next.prevSib.nextSib=this; next.prevSib=this; if(firstChange==null){ firstChange=parent.firstChild; while ((firstChange !=this) && (firstChange !=pOldNext)) firstChange=firstChange.nextSib; } Component[] component=parent.ddxwindow.getComponents(); for(int i=0; i>winGravityOffset) > NorthWestGravity)){ int newx=sib.origin.x; int newy=sib.origin.y; gravityTranslate (newx, newy, newx-dx, newy-dy, dw, dh, (sib.attr&winGravity)>>winGravityOffset, gpoint); if(gpoint.x !=sib.origin.x || gpoint.y !=sib.origin.y){ Event event=new Event(); event.mkGravityNotify(sib.id, sib.id, gpoint.x - sib.borderWidth, gpoint.y - sib.borderWidth ); sib.sendEvent(event, 1, null); sib.origin.x=gpoint.x; sib.origin.y=gpoint.y; } } sib.x=x + sib.origin.x; sib.y=y + sib.origin.y; if(sib.ddxwindow!=null) // ?? sib.ddxwindow.setLocation(sib.origin.x-sib.borderWidth+sib.parent.borderWidth, sib.origin.y-sib.borderWidth+sib.parent.borderWidth); Window child=sib.firstChild; if(child !=null){ while (true){ child.x=child.parent.x + child.origin.x; child.y=child.parent.y + child.origin.y; if(child.ddxwindow!=null) // ?? child.ddxwindow.setLocation(child.origin.x-child.borderWidth+child.parent.borderWidth, child.origin.y-child.borderWidth+child.parent.borderWidth); if(child.firstChild!=null){ child=child.firstChild; continue; } while (child.nextSib==null && (child !=sib)) child=child.parent; if(child==sib) break; child=child.nextSib; } } } } static boolean checkDeviceGrabs(Event e, int checkFirst, int count) throws IOException { Window win; int i=checkFirst; for(; i < spriteTraceGood; i++){ win=spriteTrace[i]; if(win.optional!=null && win.checkPassiveGrabsOnWindow(e, count)){ return true; } } return false; } boolean checkPassiveGrabsOnWindow(Event e, int count) throws IOException { Grab grab=getPassiveGrabs(); if(grab==null) return false; synchronized(LOCK){ Grab tempGrab=new Grab(Resource.fakeClientId(client)); tempGrab.window=this; tempGrab.type=e.getType(); tempGrab.detail.exact=e.getDetail(); tempGrab.detail.pMask=null; tempGrab.modifiersDetail.pMask=null; tempGrab.modifiersDetail.exact=e.getState()&0x0f; for(; grab!=null; grab=grab.next){ if(tempGrab.grabMatchesSecond(grab) && (grab.confineTo==null || ((grab.confineTo.attr&realized)!=0 && (grab.confineTo.x!=0 || grab.confineTo.y!=0)))){ grab.activatePointerGrab((int)System.currentTimeMillis(), true); e.fixUpEventFromWindow(grab.window, 0, Window.sprite.hot.x, Window.sprite.hot.y, true); if(grab.getClient()!=null) grab.getClient().sendEvent(e, count, Event.filters[e.getType()], Event.filters[e.getType()], grab); return true; } } } return false; } static void sendGrabbedEvent(Event e, boolean deactivateGrab, int count) throws IOException{ Grab grab=Window.grab; int deliveries=0; if((grab.attr&Grab.ownerEvents)!=0){ Window focus=null; if(focus==null) deliveries=sendDeviceEvent(sprite.win, e, grab, null, count); else if(focus!=null && (focus==sprite.win || focus.isParent(sprite.win))) deliveries=sendDeviceEvent(sprite.win, e, grab, focus, count); else if(focus!=null) deliveries=sendDeviceEvent(focus, e, grab, focus, count); } if(deliveries==0){ e.fixUpEventFromWindow(grab.window, 0, sprite.hot.x, sprite.hot.y, true); if(grab.getClient()!=null) deliveries=grab.getClient().sendEvent(e, count, grab.eventMask, Event.filters[e.getType()], grab); } } static int sendDeviceEvent(Window win, Event e, Grab grab, Window stopAt, int count) throws IOException { int child=0; int type=e.getType(); int filter=Event.filters[type]; int deliveries=0; if((type & Event.EXTENSION_EVENT_BASE)!=0){ OtherInputMasks inputMasks; int mskidx=0; inputMasks=(win.optional==null? null: win.optional.otherInputMasks); if(inputMasks!=null && (filter & inputMasks.deliverableEvents[mskidx])==0) return 0; while (win!=null){ if(inputMasks!=null && (inputMasks.inputEvents[mskidx] & filter)!=0){ e.fixUpEventFromWindow(win, child, sprite.hot.x, sprite.hot.y, false); deliveries=win.sendEvent(e, count, filter, grab, mskidx); if(deliveries > 0) return deliveries; } if((deliveries < 0) || (win==stopAt) || (inputMasks!=null && (filter & inputMasks.dontPropagateMask[mskidx])!=0)) return 0; child=win.id; win=win.parent; if(win!=null){ inputMasks=(win.optional==null? null : win.optional.otherInputMasks); } } } else { if((filter & win.deliverableEvents)==0) return 0; while (win!=null){ if(((win.getOtherEventMask()|win.eventMask) & filter)!=0){ e.fixUpEventFromWindow(win, child, sprite.hot.x, sprite.hot.y, false); deliveries=win.sendEvent(e, count, filter, grab, 0); if(deliveries > 0) return deliveries; } if((deliveries < 0) || (win==stopAt) || ((filter & win.getDontPropagateMask())!=0)) return 0; child=win.id; win=win.parent; } } return 0; } boolean isParent(Window w){ for(w=w.parent; w!=null; w=w.parent){ if(w==this) return true; } return false; } Window commonAncestor(Window w){ for(w=w.parent; w!=null; w=w.parent){ if(w.isParent(this)) return w; } return null; } private static void doFocusEvents(Client c, int fromWin, int toWin, int mode) throws IOException { int out, in; if(fromWin==toWin) return; out=(fromWin==0) ? NotifyDetailNone : NotifyPointerRoot; in=(toWin==0) ? NotifyDetailNone : NotifyPointerRoot; if((toWin==0) || (toWin==1)){ if((fromWin==0) || (fromWin==1)){ if(fromWin==1){ focusOutEvents(c, sprite.win, sprite.win.screen.root, mode, NotifyPointer, true); } } else { Window from=(c!=null) ? c.lookupWindow(fromWin) : (Window)Resource.lookupIDByClass(fromWin, Resource.RC_DRAWABLE); if(from==null) return; if(from.isParent(sprite.win)){ focusOutEvents(c, sprite.win, from, mode, NotifyPointer, false); } from.sendFocusEvent(c, Event.FocusOut, mode, NotifyNonlinear); focusOutEvents(c, from.parent, null, mode, NotifyNonlinearVirtual, false); } if(toWin==1){ focusInEvents(c, sprite.win.screen.root, sprite.win, null, mode, NotifyPointer, true); } } else { if((fromWin==0) || (fromWin==1)){ if(fromWin==1){ focusOutEvents(c, sprite.win, sprite.win.screen.root, mode, NotifyPointer, true); } Window to=(c!=null) ? c.lookupWindow(toWin) : (Window)Resource.lookupIDByClass(toWin, Resource.RC_DRAWABLE); if(to==null) return; if(to.parent !=null){ focusInEvents(c, to.screen.root, to, to, mode, NotifyNonlinearVirtual, true); } to.sendFocusEvent(c, Event.FocusIn, mode, NotifyNonlinear); if(to.isParent(sprite.win)){ focusInEvents(c, to, sprite.win, null, mode, NotifyPointer, false); } } else { Window to=(c!=null) ? c.lookupWindow(toWin) : (Window)Resource.lookupIDByClass(toWin, Resource.RC_DRAWABLE); Window from=(c!=null) ? c.lookupWindow(fromWin) : (Window)Resource.lookupIDByClass(fromWin, Resource.RC_DRAWABLE); if(from==null || to==null) return; if(to.isParent(from)){ from.sendFocusEvent(c, Event.FocusOut, mode, NotifyAncestor); focusOutEvents(c, from.parent, to, mode, NotifyVirtual, false); to.sendFocusEvent(c, Event.FocusIn, mode, NotifyInferior); if((to.isParent(sprite.win)) && (sprite.win !=from) && (!from.isParent(sprite.win)) && (!sprite.win.isParent(from))){ focusInEvents(c, to, sprite.win, null, mode, NotifyPointer, false); } } else{ if(from.isParent(to)){ if((from.isParent(sprite.win)) && (sprite.win !=from) && (!to.isParent(sprite.win)) && (!sprite.win.isParent(to))){ focusOutEvents(c, sprite.win, from, mode, NotifyPointer, false); } from.sendFocusEvent(c, Event.FocusOut, mode, NotifyInferior); focusInEvents(c, from, to, to, mode, NotifyVirtual, false); to.sendFocusEvent(c, Event.FocusIn, mode, NotifyAncestor); } else { Window common=to.commonAncestor(from); if(from.isParent(sprite.win)){ focusOutEvents(c, sprite.win, from, mode, NotifyPointer, false); } from.sendFocusEvent(c, Event.FocusOut, mode, NotifyNonlinear); if(from.parent !=null){ focusOutEvents(c, from.parent, common, mode, NotifyNonlinearVirtual, false); } if(to.parent !=null){ focusInEvents(c, common, to, to, mode, NotifyNonlinearVirtual, false); } to.sendFocusEvent(c, Event.FocusIn, mode, NotifyNonlinear); if(to.isParent(sprite.win)){ focusInEvents(c, to, sprite.win, null, mode, NotifyPointer, false); } } } } } } private static void focusOutEvents(Client c, Window child, Window ancestor, int mode, int detail, boolean doAncestor) throws IOException { for(Window win=child; win !=ancestor; win=win.parent){ win.sendFocusEvent(c, Event.FocusOut, mode, detail); } if(doAncestor){ ancestor.sendFocusEvent(c, Event.FocusOut, mode, detail); } } private static boolean focusInEvents(Client c, Window ancestor, Window child, Window skipChild, int mode, int detail, boolean doAncestor) throws IOException { if(child==null){ return ancestor==null; } if(ancestor==child){ if(doAncestor){ child.sendFocusEvent(c, Event.FocusIn, mode, detail); } return true; } if(focusInEvents(c, ancestor, child.parent, skipChild, mode, detail, doAncestor)){ if(child !=skipChild){ child.sendFocusEvent(c, Event.FocusIn, mode, detail); } return true; } return false; } void sendFocusEvent(Client c, int type, int mode, int detail) throws IOException { Event event=(c!=null) ? c.cevent : new Event(); if(type==Event.FocusIn){ event.mkFocusIn(detail, id, mode); } else if(type==Event.FocusOut){ event.mkFocusOut(detail, id, mode); } else{ return; } sendEvent(event, 1, Event.filters[type], null, 0); } void initAttr(){ setBackgroundIsPixel(); background.pixel=screen.white; setBorderIsPixel(); border.pixel=screen.black; borderWidth=0; } void restoreClip(){ ddxwindow.restoreClip(); } private static int lowbit(int mask){ int result=1; for(int i=0; i<32; i++){ if((mask & 1)==1){result=result<>1; } return result; } static void printWindow(Window p1, int indent){ for(int i=0; i>>24); //protocol eb[13]=(byte)(del>>>16); eb[14]=(byte)(del>>>8); eb[15]=(byte)(del); int tm=(int)System.currentTimeMillis(); eb[16]=(byte)(tm>>>24); //time eb[17]=(byte)(tm>>>16); eb[18]=(byte)(tm>>>8); eb[19]=(byte)(tm); eb[20]=eb[21]=eb[22]=eb[23]=0; eb[24]=eb[25]=eb[26]=eb[27]=0; eb[28]=eb[29]=eb[30]=eb[31]=0; eb[0]|=0x80; try{ sendEvent(event, 1, Event.NoEventMask, null, 0); } catch(Exception ee){} } } ); } private void addComponentListener(java.awt.Frame foo){ final java.awt.Frame frame=foo; frame.addComponentListener( new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent e){ if(parent==null)return; Rectangle rectangle=frame.getBounds(); if(rectangle.width==0 ||rectangle.height==0)return; if(frame_width!=rectangle.width || frame_height!=rectangle.height){ Insets insets=frame.getInsets(); synchronized(Window.LOCK){ try{ Point point=frame.getLocation(); int ww=rectangle.width-insets.left-insets.right-borderWidth*2; int hh=rectangle.height-insets.top-insets.bottom-borderWidth*2; if(ww>0 && hh>0){ ddxwindow.setSize(ww, hh); frame.pack(); Event event=new Event(); event.mkConfigureNotify(id, id, (rectangle.x+insets.left), (rectangle.y+insets.top), ww, hh, borderWidth, (attr&(1<<16))!=0?1:0); sendEvent(event, 1, null); frame_x=rectangle.x; frame_y=rectangle.y; frame_width=rectangle.width; frame_height=rectangle.height; } } catch(Exception ee){ System.out.println(ee); } } } } } ); } } class InputClients extends Clients{ int[] mask; InputClients(int id){ super(id); mask=new int[9/*EMASKSIZE*/]; } } class OtherInputMasks { int[] deliverableEvents; int[] inputEvents; int[] dontPropagateMask; InputClients inputClients; OtherInputMasks(){ deliverableEvents=new int[9/*EMASKSIZE*/]; inputEvents=new int[9/*EMASKSIZE*/]; dontPropagateMask=new int[9/*EMASKSIZE*/]; } } class WindowOpt{ int visual; Cursor cursor; Colormap colormap; int dontPropagateMask; int otherEventMasks; OtherClients otherClients; Grab passiveGrabs; Property userProps; long backingBitPlanes; long backingPixel; OtherInputMasks otherInputMasks; java.awt.Window frame; } class Sprite { Window win; HotSpot hot; Sprite(){ hot=new HotSpot(); } } final class HotSpot extends Point{ int state=0; } class DontPropagate{ static int[] masks=new int[8]; static int[] refc=new int[8]; static{ for(int i=0;i<8;i++){ masks[i]=refc[i]=0; } } static int store(int mask){ int i=0; int free=0; for(i=8, free=0; --i > 0; ){ if(refc[i]==0){free=i;} else if(mask==masks[i]) break; } if(i==0 && free!=0){ i=free; masks[i]=mask; } return i; } } class Focus{ int win; Window window; int revert; long time; Window[] trace; int traceSize; int traceGood; } weirdx-1.0.32/com/jcraft/weirdx/XDMCP.java0000644000175000017500000004255510037060047016626 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - XDMCP support * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.net.*; import java.util.*; final class XDMCP extends Thread implements ClientListener{ private final static int start=1; private final static int query=2; private final static int collect_query=3; private final static int broadcast=4; private final static int collect_broadcast_query=5; private final static int update_broadcast_willing=6; private final static int indirect=7; private final static int collect_indirect_query=8; private final static int update_indirect_willing=9; private final static int start_connection=10; private final static int await_request_response=11; private final static int manage=12; private final static int await_manage_response=13; private final static int stop_connection=14; private final static int run_session=15; private final static int keep_alive=16; private final static int await_alive=17; private final static int reset_display=18; final static int BroadcastQuery=1; final static int Query=2; final static int IndirectQuery=3; private final static int ForwardQuery=4; private final static int Willing=5; private final static int Unwilling=6; private final static int Request=7; private final static int Accept=8; private final static int Decline=9; private final static int Manage=10; private final static int Refuse=11; private final static int Failed=12; private final static int KeepAlive=13; private final static int Alive=14; private int state=0; private final static byte[] manu_display_id="JCraft-WeirdX-1".getBytes(); private final static byte[] display_class="JCraft-WeirdX".getBytes(); private final static byte[] authname="MIT-MAGIC-COOKIE-1".getBytes(); static byte[] mitcookie=null; private final static int XDMCPcp_port=177; private static byte[] myaddress=null; static int timeout=5000; int displayNum=0; UDPIOByte io; byte[] buf=new byte[1024]; int sessionID; String XDMCP; int fstclient=-1; String host; int mode=query; void close(){ try{ if(io!=null) io.close(); } catch(Exception e){ } } void getLocalHost(String name){ myaddress=new byte[4]; try{ InetAddress local; if(name!=null&&name.length()>0){ local=InetAddress.getByName(name); } else{ local=InetAddress.getLocalHost(); } byte[] b=local.getHostAddress().getBytes(); int bi=0; for(int i=0; i<4; i++){ myaddress[i]=0; while(bi0) bar=new String(buf, 0, foo); foo=io.getShort(); io.getByte(buf, 0, foo); if(bar!=null && bar.equals("MIT-MAGIC-COOKIE-1") && foo>0){ mitcookie=new byte[foo]; System.arraycopy(buf, 0, mitcookie, 0, foo); } else{ mitcookie=null; } state=manage; } else if(opcode==Decline){ foo=io.getShort(); io.getByte(buf, 0, foo); foo=io.getShort(); io.getByte(buf, 0, foo); foo=io.getShort(); io.getByte(buf, 0, foo); state=stop_connection; } else{ System.out.println("unknow opcode("+opcode+") at "+state); return; } } catch(InterruptedIOException ie){ // timeout state=start_connection; return; } break; case manage: io.putShort(1); io.putShort(Manage); io.putShort(8+display_class.length); io.putInt(sessionID); io.putShort(displayNum); io.putShort(display_class.length); io.putByte(display_class, 0, display_class.length); io.flush(); state=await_manage_response; break; case await_manage_response: try{ foo=io.getShort(); opcode=foo=io.getShort(); len=foo=io.getShort(); if(opcode==Refuse){ int id=io.getInt(); if(sessionID==id){ state=start_connection; } else{ return; } } else if(opcode==Failed){ int id=io.getInt(); foo=io.getShort(); io.getByte(buf, 0, foo); if(sessionID==id){ state=stop_connection; } else{ System.out.println("await_manage_response: invalid failed "+id); return; } } else { System.out.println("unknow opcode("+opcode+") at "+state); return; } } catch(InterruptedIOException ie){ // timeout try{Thread.sleep(1000);} catch(Exception e){} if(fstclient==-1){ state=manage; } else{ state=run_session; } } break; case stop_connection: state=start; break; case run_session: while(true){ try{Thread.sleep(10000);} catch(Exception e){} if(state==reset_display)break; } //state=keep_alive; state=reset_display; break; case keep_alive: io.putShort(1); io.putShort(KeepAlive); io.putShort(6); io.putShort(displayNum); io.putInt(sessionID); io.flush(); state=await_alive; break; case await_alive: foo=io.getShort(); opcode=io.getShort(); len=io.getShort(); int running=foo=io.getByte(); int id=io.getInt(); if(running!=0 && id==sessionID){ // running state=run_session; } else{ state=reset_display; } break; case reset_display: state=start; break; default: System.out.println("??"); } } } class UDPIOByte{ InetAddress address; DatagramSocket socket = null; DatagramPacket sndpacket; DatagramPacket recpacket; byte[] buf = new byte[1024]; String host; int port; byte[] inbuffer=new byte[1024]; byte[] outbuffer=new byte[1024]; int instart=0, inend=0, outindex=0; /*private*/ byte[] ba; /*private*/ byte[] sa; /*private*/ byte[] ia; UDPIOByte(String host, int port){ this.host=host; this.port=port; try{ address = InetAddress.getByName(host); // socket = new DatagramSocket(); socket = new DatagramSocket(6001); // dummy... } catch(Exception e){System.err.println(e);} ba=new byte[1]; sa=new byte[2]; ia=new byte[8]; recpacket = new DatagramPacket(buf, 1024); sndpacket=new DatagramPacket(outbuffer, 0, address, port); } void setTimeout(int i){ try{socket.setSoTimeout(i);} catch(Exception e){System.out.println(e);} } int getByte() throws java.io.IOException{ if((inend-instart)<1){ read(1); } return inbuffer[instart++]&0xff; } void getByte(byte[] array) throws java.io.IOException{ getByte(array, 0, array.length); } void getByte(byte[] array, int begin, int length) throws java.io.IOException{ int i=0; while(true){ if((i=(inend-instart)) 0){ if((i=inend-instart)inbuffer.length){ n=inbuffer.length; } instart=inend=0; int i; while(true){ recpacket = new DatagramPacket(buf, 1024); socket.receive(recpacket); i=recpacket.getLength(); System.arraycopy(recpacket.getData(), 0, inbuffer, inend, i); // i=in.read(inbuffer, inend, inbuffer.length-inend); if(i==-1){ throw new IOException(); } inend+=i; if(n<=inend)break; } } void putByte(byte val) throws java.io.IOException{ if((outbuffer.length-outindex)<1){ flush(); } outbuffer[outindex++]=val; } void putByte(int val) throws java.io.IOException{ putByte((byte)val); } void putByte(byte[] array) throws java.io.IOException{ putByte(array, 0, array.length); } void putByte(byte[] array, int begin, int length) throws java.io.IOException{ if(length<=0) return; int i=0; while(true){ if((i=(outbuffer.length-outindex))> 8)&0xff); outbuffer[outindex++]=(byte)(val&0xff); } void putInt(int val) throws java.io.IOException{ if((outbuffer.length-outindex)<4){ flush(); } outbuffer[outindex++]=(byte)((val >> 24) & 0xff); outbuffer[outindex++]=(byte)((val >> 16) & 0xff); outbuffer[outindex++]=(byte)((val >> 8) & 0xff); outbuffer[outindex++]=(byte)((val) & 0xff); } void putPad(int n) throws java.io.IOException{ int i; while(true){ if((i=(outbuffer.length-outindex)) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Authors: Christian Werner * * 08-Mar-2000: This file is written by Christian Werner. * 02-Aug-2000: ymnk extracts initialization code for XJS from WeirdX class * and add it to this class. */ package com.jcraft.weirdx; import java.lang.reflect.*; import java.io.*; import java.applet.*; import java.awt.*; import java.awt.image.*; import java.lang.reflect.*; final class XJSExtension extends Extension{ private static Object jswin=null; private static Method jseval=null; private static Method jscall=null; static int ctyp; static int etyp; XJSExtension(){ try{ Method getw=null; Class c=Class.forName("netscape.javascript.JSObject"); Method ms[] = c.getMethods(); for(int i=0; i0){ io.readByte(c.bbuffer, 0, len); for(i=0; i0){ io.readByte(c.bbuffer, 0, len); for(i=0; i0){ local=InetAddress.getByName(myName); } else{ local=InetAddress.getLocalHost(); } display=local.getHostName()+":"+num+".0"; } catch(Exception e){ display="localhost:"+num+".0"; System.out.println(e); } JFrame jframe=new JFrame(); Container cpane=jframe.getContentPane(); cpane.setLayout(new GridLayout(0, 1)); JPanel jpanel=null; jpanel=new JPanel(); jpanel.setBorder(BorderFactory.createTitledBorder("Host")); jpanel.setLayout(new BorderLayout()); host.setText(""); host.setMinimumSize(new Dimension(50, 25)); host.setEditable(true); jpanel.add(host, "Center"); cpane.add(jpanel); jpanel=new JPanel(); jpanel.setBorder(BorderFactory.createTitledBorder("User")); jpanel.setLayout(new BorderLayout()); name.setText(""); name.setMinimumSize(new Dimension(50, 25)); name.setEditable(true); jpanel.add(name, "Center"); cpane.add(jpanel); jpanel=new JPanel(); jpanel.setBorder(BorderFactory.createTitledBorder("Password")); jpanel.setLayout(new BorderLayout()); passwd.setMinimumSize(new Dimension(50, 25)); passwd.setEditable(true); jpanel.add(passwd, "Center"); cpane.add(jpanel); jpanel=new JPanel(); jpanel.setBorder(BorderFactory.createTitledBorder("Command with Absolute Path")); jpanel.setLayout(new BorderLayout()); command.setText(""); command.setMinimumSize(new Dimension(50, 25)); command.setEditable(true); jpanel.add(command, "Center"); command.addActionListener(this); cpane.add(jpanel); jpanel=new JPanel(); jpanel.add(rexec, "Center"); rexec.addActionListener(this); cpane.add(jpanel); jframe.pack(); jframe.setVisible(true); } public static void main(String[] arg){ XRexec xsh=new XRexec(null, 2); } public void actionPerformed(java.awt.event.ActionEvent e) { char [] pass=null; try{pass=passwd.getPassword();}catch(Exception ee){} if(name.getText().length()==0 || host.getText().length()==0 || pass==null || pass.length==0 || command.getText().length()==0){ return; } try { String xcommand=null; xcommand="exec /bin/csh -cf \"setenv DISPLAY "+ display+"; exec "+ command.getText()+" < /dev/null >>& /dev/null \""; JRexec jrexec=new JRexec(name.getText(), host.getText(), new String(pass), xcommand); for(int i=0; i0 && (r.x<=bw || r.y<=bw || (width+bw)<=(r.width+r.x) || (height+bw)<=(r.height+r.y)) ){ if(window.isBorderPixel()){ g.setColor(window.getColormap().getColor(window.border.pixel)); } else{ g.setColor(Color.black); } for(int i=bw-1;0<=i; i--){ g.drawRect(i, i, width+2*bw-i*2-1, height+2*bw-i*2-1); } } } public boolean isOpaque(){ if(isVisible()){ if(window.clss==2/*InputOnly*/){ return false; } if(alpha) return false; return true; } return false; } public Window getWindow(){ return window; } } weirdx-1.0.32/com/jcraft/weirdx/DDXWindow.java.old0000644000175000017500000007362710035636146020352 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - Guess. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.io.*; import java.awt.*; import java.awt.image.*; import java.awt.event.KeyEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.KeyEvent; import java.awt.event.InputEvent; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; //import com.sun.java.swing.*; import javax.swing.*; class DDXWindow extends JPanel implements MouseListener, MouseMotionListener { private static final byte s=0; // start private static final byte sp=1; // press private static final byte spp=2; // press, press private static final byte sppr=3; // press, press, release private static byte threeBstate=s; private static MouseEvent threeBPressed=null; private static boolean threeButton=false; private static final int InputOnly=2; private static Client serverClient=null; private static DDXWindow ddxwindow=null; static void init(Screen[] scrn, boolean tb){ Window root=scrn[0].root; serverClient=root.client; ddxwindow=root.ddxwindow; threeButton=tb; } Window window; int width, height; int bw; boolean bwc=false; static Event event=new Event(); Image offi=null; Graphics offg=null; static int px, py; Rectangle exposed=new Rectangle(); DDXWindow(){ } void init(Window w){ this.window=w; this.bw=w.borderWidth; bwc=true; setSize(w.width, w.height); addMouseListener(this); addMouseMotionListener(this); //addKeyListener(this); px=0; py=0; enableEvents(AWTEvent.KEY_EVENT_MASK); setVisible(false); //??? setLayout(null); } void setBorder(int bw){ if(this.bw!=bw){ this.bw=bw; bwc=true; } } public void setVisible(boolean b){ if(b){ if(offi==null && window.clss!=InputOnly){ allocImage(); } if(window!=window.screen.root && !isVisible()){ exposed.setBounds(0, 0, 0, 0); } super.setVisible(true); } else{ if(isVisible()){ super.setVisible(false); if(window!=window.screen.root && window.screen.root.width*window.screen.root.height/4<= window.width*window.height){ freeImage(); exposed.setBounds(0, 0, 0, 0); } } } } public void setLocation(int x, int y){ if(getX()==x && getY()==y) return; if(window!=null && window.parent!=null){ int orgx=getX()-window.parent.borderWidth+window.borderWidth; int orgy=getY()-window.parent.borderWidth+window.borderWidth; int bitgrabity=window.attr&(15<<8); if(orgx<0 || orgy<0){ if(orgx<0 && orgx0 && (r.x<=bw || r.y<=bw || (width+bw)<=(r.width+r.x) || (height+bw)<=(r.height+r.y)) ){ if(window.isBorderPixel()){ g.setColor(window.getColormap().getColor(window.border.pixel)); } else{ g.setColor(Color.black); } for(int i=bw-1;0<=i; i--){ g.drawRect(i, i, width+2*bw-i*2-1, height+2*bw-i*2-1); } } if(!window.screen.multimode || window==window.screen.root){ if(LogoImage.logoimage!=null && window.x+r.x<=LogoImage.logoimagewidth && window.y+r.y<=LogoImage.logoimageheight){ g.drawImage(LogoImage.logoimage, 0, 0, LogoImage.logoimagewidth-(window.x-bw), LogoImage.logoimageheight-(window.y-bw), window.x-bw, window.y-bw, LogoImage.logoimagewidth, LogoImage.logoimageheight, this); } else{ } } } public boolean isOpaque(){ if(isVisible()){ if(window.clss==InputOnly){ return false; } return super.isOpaque(); } return false; } private final void expunion(Rectangle r) { int x1=Math.min(exposed.x, r.x); int x2=Math.max(exposed.x+exposed.width, r.x+r.width); int y1=Math.min(exposed.y, r.y); int y2=Math.max(exposed.y+exposed.height, r.y+r.height); exposed.setBounds(x1, y1, x2-x1, y2-y1); } private final boolean expcontains(int X, int Y, int W, int H) { int ww=exposed.width; int hh=exposed.height; if (ww<=0 || hh<=0 || W<=0 || H<=0) { return false; } int xx=exposed.x; int yy=exposed.y; return (X>=xx && Y>=yy && X+W<=xx+ww && Y+H<=yy+hh); } public void update(Graphics g){ System.out.println("update: "); } public void paint(Graphics g){ try{ // ????? super.paint(g); }catch(Exception e){ return; } Client client=window.client; if(client==null || client==serverClient) return; Rectangle r=g.getClip().getBounds(); if(exposed.width==0){ exposed.setBounds(r); } else if(expcontains(r.x, r.y, r.width, r.height)){ return; } else{ expunion(r); } event.mkExpose(window.id, r.x, r.y, r.width, r.height, 0); try{ window.sendEvent(event, 1, null); } catch(Exception ee){} } public void setBorderPixmap(Pixmap p){ } public void mouseClicked(MouseEvent e){ } public void mouseEntered(MouseEvent e){ String str=CopyPaste.getString(); if(!CopyPaste.isOwner() && str!=null){ synchronized(window.screen.root){ Property p=window.screen.root.getProperty(); while(p!=null){ if(p.propertyName==9)break; p=p.next; } if(p!=null){ p.data=str.getBytes(); p.size=(p.data.length<256 ? p.data.length : 256); } } Selection sel=Selection.getSelection(1); // PRIMARY if(sel!=null && sel.client!=null){ int time=(int)System.currentTimeMillis(); Event event=new Event(); event.mkSelectionClear(time, sel.wid, sel.selection); try{ sel.client.sendEvent(event, 1, Event.NoEventMask, Event.NoEventMask, null); } catch(Exception ee){ //System.out.println(ee); }; sel.window=window.screen.root; sel.wid=window.screen.root.id; sel.lastTimeChanged=time; sel.client=null; } CopyPaste.setString(str); } if(window.id==window.screen.rootId){ return; } if(window.isMapped()){ requestFocus(); Window.focus.win=window.id; } int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Client client=window.client; if(client==null || client==serverClient) return; event.mkEnterNotify(0, // Ancestor window.screen.rootId, window.id, 0, x, y, e.getX(), e.getY(), state, 0, // Normal 0x1|0x02 // focus|same-screen ); try{ Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mouseExited(MouseEvent e){ if(window.id==window.screen.rootId){ return; } int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Client client=window.client; if(client==null || client==serverClient) return; event.mkLeaveNotify(0, // Ancestor window.screen.rootId, window.id, 0, x, y, e.getX(), e.getY(), state, 0, // Normal 0x1|0x02 // focus|same-screen ); try{ Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mousePressed(MouseEvent e){ if(threeButton){ if(threeBstate==s){ threeBPressed=e; threeBstate=sp; return; } if(threeBstate==sp // || threeBstate==sppr ){ threeBPressed=null; threeBstate=spp; e=new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), (e.getModifiers()&(~(InputEvent.BUTTON1_MASK|InputEvent.BUTTON3_MASK)))|InputEvent.BUTTON2_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); } } procPressed(e); } private void procPressed(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); if(mod==0){ mod|=InputEvent.BUTTON1_MASK; } // ????? int state=0; int detail=1; if((mod & InputEvent.BUTTON1_MASK)!=0) detail=1; if((mod & InputEvent.BUTTON2_MASK)!=0) detail=2; if((mod & InputEvent.BUTTON3_MASK)!=0) detail=3; if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Event.filters[Event.MotionNotify]=Event.PointerMotionMask| Event.ButtonMotionMask | ((Event.Button1Mask>>1)< state|=8; Window.sprite.hot.state=state; } public void mouseReleased(MouseEvent e){ if(threeButton){ if(threeBstate==sppr){ threeBPressed=null; threeBstate=s; return; } if(threeBstate==sp){ procPressed(threeBPressed); threeBPressed=null; threeBstate=s; } else if(threeBstate==spp){ threeBPressed=null; threeBstate=sppr; e=new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(), (e.getModifiers()&(~(InputEvent.BUTTON1_MASK|InputEvent.BUTTON3_MASK)))|InputEvent.BUTTON2_MASK, e.getX(), e.getY(), e.getClickCount(), e.isPopupTrigger()); } } procReleased(e); } private void procReleased(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; int detail=0; if((mod & InputEvent.BUTTON1_MASK)!=0){ state|=(1<<8); detail=1;} if((mod & InputEvent.BUTTON2_MASK)!=0){ state|=(1<<9); detail=2;} if((mod & InputEvent.BUTTON3_MASK)!=0){ state|=(1<<10); detail=3;} if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=0; // ????? Event.filters[Event.MotionNotify]=Event.PointerMotionMask/*| ((Event.Button1Mask>>1)< 16 // button 2 -> 8 // button 3 -> 4 // shift -> 1 // control -> 2 // alt -> 12 ?? int state=0; int detail=0; if((mod & InputEvent.BUTTON1_MASK)!=0){ state|=(1<<8); detail=1;} if((mod & InputEvent.BUTTON2_MASK)!=0){ state|=(1<<9); detail=2;} if((mod & InputEvent.BUTTON3_MASK)!=0){ state|=(1<<10); detail=3;} if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=state; px=x; py=y; event.mkMotionNotify(1, window.screen.rootId, /*window.id,*/ Window.sprite.win.id, 0, px, py, e.getX(), e.getY(), state, 1); try{ if(!Window.checkMotion(event, window)){ return; } event.mkMotionNotify(1, window.screen.rootId, /*window.id,*/ Window.sprite.win.id, 0, px, py, px-Window.sprite.win.x, py-Window.sprite.win.y, //e.getX(), //e.getY(), state, 1); if(Window.grab!=null) Window.sendGrabbedEvent(event, false, 1); else Window.sendDeviceEvent(Window.sprite.win, event, Window.grab, null, 1); } catch(Exception ee){ } } public void mouseMoved(MouseEvent e){ int x=e.getX()+window.x; int y=e.getY()+window.y; Window.sprite.hot.x=x; Window.sprite.hot.y=y; int mod=e.getModifiers(); int state=0; px=x; py=y; if((mod & InputEvent.BUTTON1_MASK)!=0) state|=(1<<8); if((mod & InputEvent.BUTTON2_MASK)!=0) state|=(1<<9); if((mod & InputEvent.BUTTON3_MASK)!=0) state|=(1<<10); if((mod & InputEvent.SHIFT_MASK)!=0) state|=1; if((mod & InputEvent.CTRL_MASK)!=0) state|=4; // alt -> state|=8; Window.sprite.hot.state=state; event.mkMotionNotify(0, window.screen.rootId, window.id, 0, x, y, x-window.x, y-window.y, state, 1); try{ if(!Window.checkMotion(event, window)){ return; } if(Window.grab!=null) Window.sendGrabbedEvent(event, false, 1); else Window.sendDeviceEvent(window, event, Window.grab, null, 1); } catch(Exception ee){ } } public void processKeyEvent(KeyEvent e){ int id=e.getID(); if(id==KeyEvent.KEY_PRESSED) { keyPressed(e); } else if(id==KeyEvent.KEY_RELEASED) { keyReleased(e); } else if(id==KeyEvent.KEY_TYPED) { keyTyped(e); } e.consume(); // ?? } public void keyPressed(KeyEvent e){ if(!window.isMapped()) return; // Easter Egg... if(window==window.screen.root && 0 "+e); } Image getImage(){ if(offi==null) allocImage(); return offi; } Image getImage(GC gc, int x, int y, int w, int h){ Image i=getImage(); if(gc!=null && gc.clip_mask!=null && gc.clip_mask instanceof ClipPixmap){ TransparentFilter tf=new TransparentFilter(0, 0, (Pixmap)(gc.clip_mask.getMask())); i=Toolkit.getDefaultToolkit(). createImage(new FilteredImageSource(i.getSource(), tf)); } return i; } Graphics getGraphics2(){ if(window.clss==InputOnly){ return getGraphics(); } if(!isVisible()){ return null; } // Graphics g=getGraphics(); if(offg==null) allocImage(); Graphics g=offg; return g; } final Graphics getGraphics(GC gc, int mask){ if(!isVisible()){ return null; } if(offg==null) allocImage(); Graphics graphics=offg; if((mask&GC.GCSubwindowMode)!=0 && (gc.attr&GC.IncludeInferiors)!=0){ graphics=getGraphics(); window.currentGC=null; } else{ if(gc==window.currentGC && gc.time==window.gctime && (mask&~window.gmask)==0){ //System.out.println("DDXWindow skip"); return graphics; } window.gctime=gc.time; window.currentGC=gc; window.gmask=mask; } if(gc.clip_mask!=null && gc.clip_mask instanceof ClipRectangles){ java.awt.Rectangle rec=(Rectangle)(gc.clip_mask.getMask()); if(rec!=null){ graphics=offg; } if(rec==null || (rec.x==0 && rec.y==0 && rec.width==window.width && rec.height==window.height)){ // return graphics; } else{ graphics.setClip(rec.x, rec.y, rec.width, rec.height); } } if((mask&GC.GCFunction)!=0){ Color color=window.getColormap().getColor(gc.fgPixel); if(gc.function==GC.GXxor){ window.gmask&=~GC.GCFunction; graphics.setXORMode(new Color((color.getRGB() ^ graphics.getColor().getRGB())&0xffffff)); } else if(gc.function==GC.GXinvert){ window.gmask&=~GC.GCFunction; graphics.setXORMode(window.screen.defaultColormap.getColor(window.background.pixel)); } else{ graphics.setColor(color); } } if((mask&GC.GCFont)!=0){ Font font=gc.font; graphics.setFont(font.getFont()); } if((mask&GC.GCLineWidth)!=0 || (mask&GC.GCLineStyle)!=0 || (mask&GC.GCCapStyle)!=0 || (mask&GC.GCJoinStyle)!=0 ){ } return graphics; } void drawImage(Clip clip, Image img, int dx, int dy, int w, int h) { if(clip==null || (clip instanceof ClipPixmap)){ drawImage(img, dx, dy, w, h); return; } ClipRectangles rclip=(ClipRectangles)clip; java.awt.Rectangle rec=rclip.masks[0]; if(offg==null) allocImage(); java.awt.Shape tmp=offg.getClip(); if(tmp==null) { tmp=new Rectangle(0, 0, window.width, window.height); } offg.clipRect(rec.x, rec.y, rec.width, rec.height); drawImage(img, dx, dy, w, h); for(int i=1; i0){ try{ port=Integer.parseInt(host.substring(host.indexOf(':')+1)); host=host.substring(0, host.indexOf(':')); } catch(Exception ee){ System.err.println(ee); return; } } if(user.length()==0 || host.length()==0){ return; } try { String key=user+"@"+host+":"+port; Session session=(Session)pool.get(key); if(session!=null && !session.isConnected()){ session=null; } if(session==null){ session=jsch.getSession(user, host, port); session.setX11Host(xhost); session.setX11Port(displaynum+6000); UserInfo ui=new MyUserInfo(); session.setUserInfo(ui); session.connect(); pool.put(key, session); } Channel channel=session.openChannel("exec"); ((ChannelExec)channel).setCommand(command.getText()); channel.setXForwarding(true); channel.setOutputStream(null); channel.connect(); } catch(Exception ee) { System.out.println(ee); } } public static class MyUserInfo implements UserInfo{ public String getPassword(){ return passwd; } public boolean promptYesNo(String str){ Object[] options={ "yes", "no" }; int foo=JOptionPane.showOptionDialog(null, str, "Warning", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); return foo==0; } String passwd; JTextField passwordField=(JTextField)new JPasswordField(20); public String getPassphrase(){ return null; } public boolean promptPassphrase(String message){ return true; } public boolean promptPassword(String message){ Object[] ob={passwordField}; int result= JOptionPane.showConfirmDialog(null, ob, message, JOptionPane.OK_CANCEL_OPTION); if(result==JOptionPane.OK_OPTION){ passwd=passwordField.getText(); return true; } else{ return false; } } public void showMessage(String message){ JOptionPane.showMessageDialog(null, message); } } } weirdx-1.0.32/com/jcraft/weirdx/WeirdX.java0000644000175000017500000007610710751060545017163 0ustar mjj29mjj29/* -*-mode:java; c-basic-offset:2; -*- */ /* WeirdX - start point. * * Copyright (C) 1999-2004 JCraft, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package com.jcraft.weirdx; import java.net.*; import java.io.*; import java.util.*; import java.text.*; import java.awt.*; import java.awt.event.*; import java.applet.*; //import com.sun.java.swing.*; //import javax.swing.*; public final class WeirdX extends Applet { static final Object LOCK=WeirdX.class; static final int major=11; static final int minor=0; static final int releaseNumber=1032; // 1.0.32 static final int motionBufferSize=0; static final int maxRequestLength=65535; static final byte[] vendor="JCraft,Inc.".getBytes(); static Screen[] screen=null; static Format[] format=null; static int imageByteOrder=1; // 0=LSB, 1=MSB static int bitmapBitOrder=1; // 0=LSB, 1=MSB static final int bitmapScanUnit=32; //32 static final int bitmapScanPad=32; //32 static short width=768; static short height=576; static String visuals="PseudoColor8"; static String keymap="101"; private int displaynum=2; static String myAddress=null; static boolean threeButton=false; static boolean copypaste=false; static Client serverClient=null; String mode="InBrowser"; // String logo="weirdx.jpg"; String logo=null; //static String extension=null; static String extension="DummySHAPE"; static String charset=null; static XRexec xrexec=null; static String jesd=null; static String sxrexec=null; static String ssshrexec=null; static String jdxpc=null; static int jdxpcport=4000; static String jdxpcsocket=null; static String jdxpcserverproxy="com.jcraft.jdxpc.ServerProxy"; static String alphaBackground=null; static AppletContext acontext=null; //static ServerSocket displaysocket=null; static DisplaySocket displaysocket=null; static Class displaySocketClass=com.jcraft.weirdx.DisplaySocket6k.class; static XDMCP xdmcp=null; static String xdmcpmode=null; static String xdmcpaddr=null; static WeirdX weirdx=null; static final int InBrowser=0; static final int Rootless=1; static final int RootlessWM=2; void weirdx_init(Container container){ // try{ displaysocket=new ServerSocket(6000+weirdx.displaynum); } // catch(Exception ee){ // System.out.println(ee+" bye"); // return; // } try{ displaysocket=(DisplaySocket)displaySocketClass.newInstance(); displaysocket.init(weirdx.displaynum); } catch(Exception ee){ System.out.println(ee+" bye"); displaysocket=null; return; } Class c=null; try{ c=Class.forName("com.jcraft.weirdx.Keymap_"+keymap);} catch(Exception e){ try{ c=Class.forName("com.jcraft.weirdx.Keymap_101"); } catch(Exception ee){ } } try{ if(c!=null) Keymap.km=(Keymap)c.newInstance(); } catch(Exception e){ } c=null; if(!keymap.equals("101")){ try{ c=Class.forName("com.jcraft.weirdx.Keymodifier_"+keymap); } catch(Exception e){ } } if(c==null){ try{ c=Class.forName("com.jcraft.weirdx.Keymodifier_gen"); } catch(Exception e){ } } try{ if(c!=null) Keymodifier.kmod=(Keymodifier)c.newInstance(); } catch(Exception e){ } if(Keymap.km!=null){ Keyboard.keyboard=new Keyboard(Keymap.km.start, Keymap.km.start+Keymap.km.count-1); } Client.releaseNumber=releaseNumber; Client.vendor=vendor; serverClient=new Client(); serverClient.index=0; Client.clients[0]=serverClient; Resource.initClientResource(serverClient); screen=Screen.init(); Colormap.init(); Extension.init(extension); Depth[] depth=null; Visual[] visual=null; Visual defaultv=null; { Vector depthv=new Vector(); if(visuals.indexOf("TrueColor16")!=-1){ visual=Visual.getTrueColor16(serverClient); defaultv=visual[0]; depthv.addElement(new Depth(16, visual)); imageByteOrder=0; bitmapBitOrder=0; } if(defaultv==null && visuals.indexOf("PseudoColor8")!=-1){ visual=Visual.getPseudoColor8(serverClient); defaultv=visual[0]; depthv.addElement(new Depth(8, visual)); } if(defaultv==null && visuals.indexOf("StaticGray8")!=-1){ visual=Visual.getStaticGray8(serverClient); defaultv=visual[0]; depthv.addElement(new Depth(8, visual)); } if(defaultv==null){ visual=Visual.getStaticGray1(serverClient); defaultv=visual[0]; depthv.addElement(new Depth(1, visual)); } depth=new Depth[depthv.size()]; for(int i=0; i0){ keymap=s; } s=getParameter("weirdx.display.charset"); if(s!=null){ charset=s; } s=getParameter("weirdx.display.acl"); if(s!=null){ Acl.parse(s); } s=getParameter("weirdx.display.threebutton"); if(s!=null){ if(s.equals("yes")){ threeButton=true; } } s=getParameter("weirdx.display.copypaste"); if(s!=null){ if(s.equals("yes")){ copypaste=true; } } xdmcpmode=getParameter("weirdx.xdmcp.mode"); xdmcpaddr=getParameter("weirdx.xdmcp.address"); /* s=getParameter("weirdx.xdmcp.mode"); if(s!=null){ String ss=getParameter("weirdx.xdmcp.address"); if(s.equals("query")){ xdmcp=new XDMCP(ss, myAddress, displaynum); } else if(s.equals("broadcast")){ xdmcp=new XDMCP(XDMCP.BroadcastQuery, ss, myAddress, displaynum); } else if(s.equals("indirect")){ xdmcp=new XDMCP(XDMCP.IndirectQuery, ss, myAddress, displaynum); } } */ s=getParameter("weirdx.xrexec"); if(s!=null)sxrexec=s; s=getParameter("weirdx.sshrexec"); if(s!=null)ssshrexec=s; s=getParameter("weirdx.jesd"); if(s!=null && s.equals("yes")){ jesd=s; } s=getParameter("weirdx.jdxpc"); if(s!=null && s.length()!=0 && !s.equals("no")){ jdxpc=s; } s=getParameter("weirdx.jdxpcport"); if(s!=null){ try{ jdxpcport=Integer.parseInt(s); } catch(Exception e){ } } s=getParameter("weirdx.jdxpc.socket"); if(s!=null && s.length()!=0 && !s.equals("no")){ jdxpcsocket=s; } s=getParameter("weirdx.jdxpc.serverproxy"); if(s!=null && s.length()!=0 && !s.equals("no")){ jdxpcserverproxy=s; } s=getParameter("weirdx.extension"); if(s!=null)extension=s; s=getParameter("weirdx.display.background.alpha"); if(s!=null){alphaBackground=s;} /* s=getParameter("weirdx.display.background.alpha"); if(s!=null){ try{ // int balpha=Integer.parseInt(s); // balpha&=0xff; // if(balpha!=255){ String ss=getParameter("weirdx.display.background.alpha.class"); if(ss!=null && ss.equals("com.jcraft.weirdx.DDXWindowAlphaBackground2D")){ int balpha=Integer.parseInt(s); balpha&=0xff; if(balpha!=255){ Window.dDXWindow=DDXWindowAlphaBackground2D.class; DDXWindowAlphaBackground2D.setAlpha(balpha); } } else{ Window.dDXWindow=DDXWindowAlphaBackground.class; DDXWindowAlphaBackground.setAlpha(s); } // } } catch(Exception ee){System.err.println(ee);} } */ s=getParameter("weirdx.logo"); if(s!=null)logo=s; s=getParameter("weirdx.displaysocket"); if(s!=null){ try{ displaySocketClass=Class.forName(s); if(!s.equals("com.jcraft.weirdx.DisplaySocket6k")) System.out.println(s+" is used for DisplaySocket"); } catch(Exception e){ System.err.println(e); displaySocketClass=com.jcraft.weirdx.DisplaySocket6k.class; } } else{ displaySocketClass=com.jcraft.weirdx.DisplaySocket6k.class; } } public void start(){ if(weirdx==null){ return; } (new Spawn(this)).start(); } public static void main(String args[]) { String s; WeirdX weirdx=new WeirdX(); Properties props=new Properties(); try{ InputStream rs = null; /* accept a command line argument of a URL from which to get properties. This is required because of a bug in netscape, where it refuses to properly load resources in certain cases */ if (args!=null && args.length >= 2 && args[1]!=null) { URL propsurl=new URL(args[1]); rs=propsurl.openStream(); } else{ rs = weirdx.getClass().getResourceAsStream("/props"); } if(rs!=null) props.load(rs); } catch(Exception e){ //System.err.println(e); } try{ String root=props.getProperty("user.dir", null); File guess=new File(new File(root, "config"), "props"); props.load(new FileInputStream(guess)); } catch(Exception e){ //System.err.println(e); } Properties sprops=null; try{ sprops=System.getProperties(); } catch (Exception e) { System.err.println("Unable to read system properties: "+e); sprops=new Properties(); } for(Enumeration e=props.keys() ; e.hasMoreElements() ;) { String key=(String)(e.nextElement()); //if(key.startsWith("weirdx.") && sprops.get(key)==null){ // System.setProperty(key, (String)(props.get(key))); //} if(key.startsWith("weirdx.") && sprops.get(key)==null){ sprops.put(key, (String)(props.get(key))); } } try{ System.setProperties(sprops); props=System.getProperties(); } catch (Exception e) { System.err.println("Error updating system properties: "+e); } try{ try{ s=(String)props.get("weirdx.ddxwindow"); if(s!=null){ Window.installDDXWindow(s); } } catch(Exception ee){ System.err.println(ee); } try{ s=(String)props.get("weirdx.display.width"); if(s!=null){ width=Short.parseShort(s); } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.height"); if(s!=null){ height=Short.parseShort(s); } } catch(Exception ee){ //System.err.println(ee); } /* support for autodetect of screen size */ try{ s=(String)props.get("weirdx.display.autosize"); if(s!=null){ if (Boolean.valueOf(s).booleanValue()) { /* auto-calculate screen size */ Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension ScrSize= toolkit.getScreenSize(); int widthreduce=20; int heightreduce=60; try{ s=(String)props.get("weirdx.display.autosize.widthreduce"); if(s!=null){ widthreduce=Short.parseShort(s); } } catch(Exception ee){ } try{ s=(String)props.get("weirdx.display.autosize.heightreduce"); if(s!=null){ heightreduce=Short.parseShort(s); } } catch(Exception ee){ } width=(short)(ScrSize.width-widthreduce); height=(short)(ScrSize.height-heightreduce); } } } catch(Exception ee){ System.err.println(ee); } try{ s=(String)props.get("weirdx.display.visual"); if(s!=null){ visuals=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.windowmode"); if(s!=null){ weirdx.mode=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.myaddress"); if(s!=null){ myAddress=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.displaynum"); if(s!=null){ weirdx.displaynum=Integer.parseInt(s);} } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.acl"); if(s!=null){ Acl.parse(s); } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.threebutton"); if(s.equals("yes")){ threeButton=true;} } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.copypaste"); if(s.equals("yes")){ copypaste=true;} } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.keymap"); if(s!=null){ keymap=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.charset"); if(s!=null&&s.length()>0){ charset=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.xdmcp.mode"); if(s!=null){ String ss=(String)props.get("weirdx.xdmcp.address"); if(s.equals("query")){ xdmcp=new XDMCP(ss, myAddress, weirdx.displaynum); } else if(s.equals("broadcast")){ xdmcp=new XDMCP(XDMCP.BroadcastQuery, ss, myAddress, weirdx.displaynum); } else if(s.equals("indirect")){ xdmcp=new XDMCP(XDMCP.IndirectQuery, ss, myAddress, weirdx.displaynum); } } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.xrexec"); if(s.equals("yes")){ xrexec=new XRexec(myAddress, weirdx.displaynum); } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.sshrexec"); ssshrexec=s; } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.jesd"); if(s!=null && s.equals("yes")){ jesd=s; } } catch(Exception ee){} try{ s=(String)props.get("weirdx.jdxpc"); if(s!=null && s.length()!=0 && !s.equals("no")){ jdxpc=s; } } catch(Exception ee){} try{ s=(String)props.get("weirdx.jdxpcport"); if(s!=null){ jdxpcport=Integer.parseInt(s);} } catch(Exception ee){} try{ s=(String)props.get("weirdx.jdxpc.socket"); if(s!=null){ jdxpcsocket=s;} } catch(Exception ee){} try{ s=(String)props.get("weirdx.jdxpc.serverproxy"); if(s!=null){ jdxpcserverproxy=s;} } catch(Exception ee){} try{ s=(String)props.get("weirdx.extension"); if(s!=null){ weirdx.extension=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.display.background.alpha"); if(s!=null){ alphaBackground=s;} } catch(Exception ee){ //System.err.println(ee); } /* try{ s=(String)props.get("weirdx.display.background.alpha"); if(s!=null){ try{ // int balpha=Integer.parseInt(s); // balpha&=0xff; // if(balpha!=255){ String ss=(String)props.get("weirdx.display.background.alpha.class"); if(ss!=null && ss.equals("com.jcraft.weirdx.DDXWindowAlphaBackground2D")){ int balpha=Integer.parseInt(s); balpha&=0xff; if(balpha!=255){ Window.dDXWindow=DDXWindowAlphaBackground2D.class; DDXWindowAlphaBackground2D.setAlpha(balpha); } } else{ Window.dDXWindow=DDXWindowAlphaBackground.class; DDXWindowAlphaBackground.setAlpha(s); } // } } catch(Exception ee){System.err.println(ee);} } } catch(Exception ee){ //System.err.println(ee); } */ try{ s=(String)props.get("weirdx.logo"); if(s!=null){ weirdx.logo=s; } } catch(Exception ee){ //System.err.println(ee); } try{ s=(String)props.get("weirdx.displaysocket"); if(s!=null){ try{ displaySocketClass=Class.forName(s); if(!s.equals("com.jcraft.weirdx.DisplaySocket6k")) System.out.println(s+" is used for DisplaySocket"); } catch(Exception e){ System.err.println(e); displaySocketClass=com.jcraft.weirdx.DisplaySocket6k.class; } } } catch(Exception ee){ //System.err.println(ee); } } catch(Exception e){System.err.println(e);} weirdx.weirdx=weirdx; Container container=new Frame("WeirdX"); ((Frame)container).addWindowListener( new WindowAdapter() { public void windowClosed(WindowEvent e){ System.exit(0); } public void windowClosing(WindowEvent e){ ((Frame)e.getWindow()).dispose(); System.exit(0); } } ); try{ weirdx.weirdx_start(container); } catch(Exception e){ System.out.println("main: "+e); } } static void resetScreen(int scrn){ Client.closeDownAll(); Colormap cmap=screen[0].defaultColormap; if((cmap.visual.clss & 1/*DynamicClass*/)!=0){ cmap.flags|=4/*Colormap.BeingCreated*/; cmap.freeAll(); try{ cmap.allocColor(serverClient, 0, 0, 0); cmap.allocColor(serverClient, 255, 255, 255); } catch(Exception e){} cmap.mkIcm(); cmap.flags&=~4/*Colormap.BeingCreated*/; } screen[0].root.initAttr(); } void kill(){ weirdx=null; } class Spawn extends Thread{ WeirdX weirdx; Spawn(WeirdX j){ super(); weirdx=j; } public void run(){ try{ Container container=weirdx; weirdx_start(container); } catch(Exception e){} } } class SpawnJDxpc extends Thread{ WeirdX weirdx; SpawnJDxpc(WeirdX weirdx){ super(); this.weirdx=weirdx; } public void run(){ try{ Class[] params=new Class[1]; Object[] args=new Object[1]; Object foo=null; java.lang.reflect.Constructor constructor; Class c=Class.forName(jdxpcserverproxy); params[0]=int.class; // get the constructor (int) constructor = c.getConstructor(params); args[0]=new Integer(weirdx.jdxpcport); try{ foo = constructor.newInstance(args); } catch(java.lang.reflect.InvocationTargetException eee){ System.err.println("fail to set jdxpcport="+weirdx.jdxpcport); foo=c.newInstance(); } java.lang.reflect.Method method; params[0]=int.class; method=c.getMethod("setServerPort", params); args[0]=new Integer(6000+weirdx.displaynum); method.invoke(foo, args); params[0]=String.class; method=c.getMethod("setServerHost", params); args[0]="localhost"; method.invoke(foo, args); if(jdxpcsocket!=null){ params[0]=String.class; method=c.getMethod("setSocketClass", params); args[0]=jdxpcsocket; method.invoke(foo, args); } ((Thread)foo).run(); } catch(Exception e){ System.err.println(e); } } } class SpawnSSHRexec extends Thread{ WeirdX weirdx; SpawnSSHRexec(WeirdX weirdx){ super(); this.weirdx=weirdx; } public void run(){ try{ Class[] params=new Class[1]; Object[] args=new Object[1]; Object foo=null; java.lang.reflect.Constructor constructor; Class c=Class.forName("com.jcraft.weirdx.SSHRexec"); params[0]=int.class; constructor=c.getConstructor(params); args[0]=new Integer(weirdx.displaynum); try{ foo = constructor.newInstance(args); } catch(java.lang.reflect.InvocationTargetException eee){ System.err.println("fail to set displaynumber="+weirdx.displaynum); foo=c.newInstance(); } } catch(Exception e){ System.err.println(e); } } } } class DisplaySocket6k implements DisplaySocket{ ServerSocket sock=null; public void init(int displaynumber) throws java.io.IOException{ sock=new ServerSocket(6000+displaynumber); } public java.net.Socket accept() throws java.io.IOException{ return sock.accept(); } public void close() throws java.io.IOException{ sock.close(); sock=null; } } weirdx-1.0.32/com/jcraft/util/0000751000175000017500000000000010037130272014542 5ustar mjj29mjj29weirdx-1.0.32/com/jcraft/util/JRexec.java0000644000175000017500000000674007053224303016603 0ustar mjj29mjj29package com.jcraft.util; import java.io.*; import java.net.*; import java.lang.*; public class JRexec implements Runnable { private Thread thread=null; private InputStream data=null; private InputStream in=null; private OutputStream out=null; private boolean devnull=true; private Socket socket=null; String user=null; String host=null; String passwd=null; String command=null; public JRexec(String user, String host, String passwd, String command) throws JRexecException { this.user=user; this.host=host; this.passwd=passwd; this.command=command; try{ socket = new Socket(host, 512); in = socket.getInputStream(); out = socket.getOutputStream(); } catch(java.net.UnknownHostException e){ throw new JRexecException(e.toString()); } catch(java.io.IOException e) { throw new JRexecException(e.toString()); } } public JRexec(String user, String host, String passwd, String command, InputStream data) throws JRexecException { this(user, host, passwd, command); this.data=data; } public JRexec(String user, String host, String passwd, String command, String data) throws JRexecException { this(user, host, passwd, command); this.data=new ByteArrayInputStream(data.getBytes()); } public synchronized InputStream getResult(){ if(thread!=null || !devnull) return null; devnull=false; return in; } public synchronized void doit(){ if(thread==null){ thread=new Thread(this); thread.start(); } } public void run() { try { // port out.write(0); int chop=8; if(user.length() | at com.apple.mrj.internal.awt.VClipboard.setContents(VClipboard.java:163) | at com.jcraft.weirdx.CopyPaste.setString(CopyPaste.java:48) | at com.jcraft.weirdx.DDXWindowImp.mouseEntered(DDXWindowImp.java:496) |kbhend% java -version |java version "1.2.2" |Java HotSpot(TM) Client VM (1.3.0, mixed mode, internal release build) So the copy/paste functionality has not been available on this environment. Please don't enable that functionality.