gnu.vnc.pixels
Class VNCPixels

java.lang.Object
  extended by gnu.vnc.pixels.VNCPixels
All Implemented Interfaces:
RFBServer, PixelsOwner

public class VNCPixels
extends java.lang.Object
implements RFBServer, PixelsOwner

Author:
Tal Liron

Constructor Summary
VNCPixels(java.lang.String name, int width, int height)
           
 
Method Summary
 void addClient(RFBClient client)
           
 boolean allowShared()
           
 void clientCutText(RFBClient client, java.lang.String text)
           
 void dispose()
           
 void fixColourMapEntries(RFBClient client, int firstColour, Colour[] colourMap)
           
 void frameBufferUpdateRequest(RFBClient client, boolean incremental, int x, int y, int w, int h)
           
 RFBClients getClients()
           
 java.lang.String getDesktopName(RFBClient client)
           
 int getFrameBufferHeight(RFBClient client)
           
 int getFrameBufferWidth(RFBClient client)
           
 int getPixelHeight()
           
 int[] getPixels()
           
 int getPixelWidth()
           
 PixelFormat getPreferredPixelFormat(RFBClient client)
           
 VNCQueue getQueue()
          externalize queue to manually add entries
 VNCEvents getVNCEventsHandler()
           
 void keyEvent(RFBClient client, boolean down, int key)
           
 void pointerEvent(RFBClient client, int buttonMask, int x, int y)
           
 void removeClient(RFBClient client)
           
 void setClientProtocolVersionMsg(RFBClient client, java.lang.String protocolVersionMsg)
           
 void setEncodings(RFBClient client, int[] encodings)
           
 void setPixelArray(int[] pixelArray, int pixelWidth, int pixelHeight)
           
 void setPixelFormat(RFBClient client, PixelFormat pixelFormat)
           
 void setShared(RFBClient client, boolean shared)
           
 void setVNCEventsHandler(VNCEvents events)
           
 void updateAll()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VNCPixels

public VNCPixels(java.lang.String name,
                 int width,
                 int height)
Parameters:
name -
width -
height -
Method Detail

setVNCEventsHandler

public void setVNCEventsHandler(VNCEvents events)

getVNCEventsHandler

public VNCEvents getVNCEventsHandler()
Returns:

getQueue

public VNCQueue getQueue()
externalize queue to manually add entries

Returns:

dispose

public void dispose()

addClient

public void addClient(RFBClient client)
Specified by:
addClient in interface RFBServer

getClients

public RFBClients getClients()
Returns:

removeClient

public void removeClient(RFBClient client)
Specified by:
removeClient in interface RFBServer

getDesktopName

public java.lang.String getDesktopName(RFBClient client)
Specified by:
getDesktopName in interface RFBServer

getFrameBufferWidth

public int getFrameBufferWidth(RFBClient client)
Specified by:
getFrameBufferWidth in interface RFBServer

getFrameBufferHeight

public int getFrameBufferHeight(RFBClient client)
Specified by:
getFrameBufferHeight in interface RFBServer

getPreferredPixelFormat

public PixelFormat getPreferredPixelFormat(RFBClient client)
Specified by:
getPreferredPixelFormat in interface RFBServer

allowShared

public boolean allowShared()
Specified by:
allowShared in interface RFBServer

setClientProtocolVersionMsg

public void setClientProtocolVersionMsg(RFBClient client,
                                        java.lang.String protocolVersionMsg)
                                 throws java.io.IOException
Specified by:
setClientProtocolVersionMsg in interface RFBServer
Throws:
java.io.IOException

setShared

public void setShared(RFBClient client,
                      boolean shared)
               throws java.io.IOException
Specified by:
setShared in interface RFBServer
Throws:
java.io.IOException

setPixelFormat

public void setPixelFormat(RFBClient client,
                           PixelFormat pixelFormat)
                    throws java.io.IOException
Specified by:
setPixelFormat in interface RFBServer
Throws:
java.io.IOException

setEncodings

public void setEncodings(RFBClient client,
                         int[] encodings)
                  throws java.io.IOException
Specified by:
setEncodings in interface RFBServer
Throws:
java.io.IOException

fixColourMapEntries

public void fixColourMapEntries(RFBClient client,
                                int firstColour,
                                Colour[] colourMap)
                         throws java.io.IOException
Specified by:
fixColourMapEntries in interface RFBServer
Throws:
java.io.IOException

frameBufferUpdateRequest

public void frameBufferUpdateRequest(RFBClient client,
                                     boolean incremental,
                                     int x,
                                     int y,
                                     int w,
                                     int h)
                              throws java.io.IOException
Specified by:
frameBufferUpdateRequest in interface RFBServer
Throws:
java.io.IOException

keyEvent

public void keyEvent(RFBClient client,
                     boolean down,
                     int key)
              throws java.io.IOException
Specified by:
keyEvent in interface RFBServer
Throws:
java.io.IOException

pointerEvent

public void pointerEvent(RFBClient client,
                         int buttonMask,
                         int x,
                         int y)
                  throws java.io.IOException
Specified by:
pointerEvent in interface RFBServer
Throws:
java.io.IOException

clientCutText

public void clientCutText(RFBClient client,
                          java.lang.String text)
                   throws java.io.IOException
Specified by:
clientCutText in interface RFBServer
Throws:
java.io.IOException

getPixels

public int[] getPixels()
Specified by:
getPixels in interface PixelsOwner

setPixelArray

public void setPixelArray(int[] pixelArray,
                          int pixelWidth,
                          int pixelHeight)
Specified by:
setPixelArray in interface PixelsOwner

getPixelWidth

public int getPixelWidth()
Specified by:
getPixelWidth in interface PixelsOwner

getPixelHeight

public int getPixelHeight()
Specified by:
getPixelHeight in interface PixelsOwner

updateAll

public void updateAll()
               throws java.io.IOException
Throws:
java.io.IOException