org.xwt.plat
Class X11

java.lang.Object
  extended byorg.xwt.Platform
      extended byorg.xwt.plat.GCJ
          extended byorg.xwt.plat.POSIX
              extended byorg.xwt.plat.X11
Direct Known Subclasses:
Linux, Solaris

public class X11
extends POSIX

Platform implementation for POSIX compliant operating systems with an X11 Server


Nested Class Summary
static class X11.X11Picture
          Implements a Picture.
static class X11.X11PixelBuffer
          An X11PixelBuffer is implemented as an X11 pixmap.
static class X11.X11Surface
          Implements a Surface as an X11 Window
 
Nested classes inherited from class org.xwt.plat.GCJ
GCJ.Retainer
 
Field Summary
static java.lang.String clipboard
          our local (in-process) copy of the clipboard
static Semaphore waiting_for_selection_event
          When the user reads from the clipboard, the main thread blocks on this semaphore until we get an X11 SelectionNotify.
static java.util.Hashtable windowToSurfaceMap
          map from Window's (casted to jlong, wrapped in java.lang.Long) to X11Surface objects
 
Fields inherited from class org.xwt.Platform
build
 
Constructor Summary
X11()
           
 
Method Summary
protected  Picture _createPicture(int[] data, int w, int h)
           
protected  PixelBuffer _createPixelBuffer(int w, int h, Surface owner)
           
protected  Surface _createSurface(Box b, boolean framed)
          this method invokes the platform _createSurface() method and then enforces a few post-call invariants
protected  java.lang.String _getAltKeyName()
           
protected  java.lang.String _getClipBoard()
           
protected  int _getScreenHeight()
           
protected  int _getScreenWidth()
           
protected  boolean _needsAutoClick()
           
protected  boolean _needsAutoDoubleClick()
           
protected  void _setClipBoard(java.lang.String s)
           
protected  void eventThread()
           
 void init()
          this initializes the platform; code in here can invoke methods on Platform since Platform.platform has already been set
 
Methods inherited from class org.xwt.plat.POSIX
_getEnv, _newBrowserWindow, getDescriptiveName
 
Methods inherited from class org.xwt.plat.GCJ
_decodeJPEG, _getBuiltinInputStream
 
Methods inherited from class org.xwt.Platform
_altKeyName, _createAlphaOnlyPicture, _criticalAbort, _detectProxy, _fileDialog, _getScheduler, _getSocket, _inputStreamToByteArray, _isCaseSensitive, _maxThreads, _running, _supressDirtyOnResize, altKeyName, createAlphaOnlyPicture, createPicture, createPixelBuffer, createSurface, criticalAbort, decodeJPEG, detectProxy, fileDialog, forceLoad, getBuiltinInputStream, getClipBoard, getEnv, getScheduler, getScreenHeight, getScreenWidth, getSocket, inputStreamToByteArray, isCaseSensitive, maxThreads, needsAutoClick, needsAutoDoubleClick, newBrowserWindow, postInit, running, setClipBoard, supressDirtyOnResize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waiting_for_selection_event

public static Semaphore waiting_for_selection_event
When the user reads from the clipboard, the main thread blocks on this semaphore until we get an X11 SelectionNotify. Crude, but effective. We know that only one thread will ever block on this, since only one thread can ever be running JavaScript.


clipboard

public static java.lang.String clipboard
our local (in-process) copy of the clipboard


windowToSurfaceMap

public static java.util.Hashtable windowToSurfaceMap
map from Window's (casted to jlong, wrapped in java.lang.Long) to X11Surface objects

Constructor Detail

X11

public X11()
Method Detail

_getAltKeyName

protected java.lang.String _getAltKeyName()

_createPicture

protected Picture _createPicture(int[] data,
                                 int w,
                                 int h)
Overrides:
_createPicture in class Platform

_createPixelBuffer

protected PixelBuffer _createPixelBuffer(int w,
                                         int h,
                                         Surface owner)
Overrides:
_createPixelBuffer in class Platform

_createSurface

protected Surface _createSurface(Box b,
                                 boolean framed)
Description copied from class: Platform
this method invokes the platform _createSurface() method and then enforces a few post-call invariants

Overrides:
_createSurface in class Platform

_needsAutoClick

protected boolean _needsAutoClick()
Overrides:
_needsAutoClick in class Platform

_getScreenWidth

protected int _getScreenWidth()
Overrides:
_getScreenWidth in class Platform

_getScreenHeight

protected int _getScreenHeight()
Overrides:
_getScreenHeight in class Platform

_getClipBoard

protected java.lang.String _getClipBoard()
Overrides:
_getClipBoard in class Platform

_setClipBoard

protected void _setClipBoard(java.lang.String s)
Overrides:
_setClipBoard in class Platform

_needsAutoDoubleClick

protected boolean _needsAutoDoubleClick()
Overrides:
_needsAutoDoubleClick in class Platform

eventThread

protected void eventThread()

init

public void init()
Description copied from class: Platform
this initializes the platform; code in here can invoke methods on Platform since Platform.platform has already been set

Overrides:
init in class Platform