summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-25 07:46:04 +0000
committerenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-25 07:46:04 +0000
commit970eb52477950029395c40df97b6f14020165234 (patch)
tree60bed32295b18fbe87ae9461394cc6435e65d73c
parent49e4a310d8793bc5f23f8c77e4ee25cc55383eed (diff)
downloadtigervnc-970eb52477950029395c40df97b6f14020165234.tar.gz
tigervnc-970eb52477950029395c40df97b6f14020165234.zip
[Layout, developement] Added base copy rect decoder class.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3460 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--java/src/com/tightvnc/decoder/CopyRectDecoder.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/java/src/com/tightvnc/decoder/CopyRectDecoder.java b/java/src/com/tightvnc/decoder/CopyRectDecoder.java
new file mode 100644
index 00000000..3fceb631
--- /dev/null
+++ b/java/src/com/tightvnc/decoder/CopyRectDecoder.java
@@ -0,0 +1,42 @@
+package com.tightvnc.decoder;
+
+import com.tightvnc.vncviewer.RfbInputStream;
+import java.awt.Graphics;
+import java.io.IOException;
+
+//
+// Class that used for decoding CopyRect encoded data.
+//
+
+public class CopyRectDecoder extends RawDecoder {
+
+ final static int EncodingCopyRect = 1;
+
+ public CopyRectDecoder(Graphics g, RfbInputStream is) {
+ super(g, is);
+ }
+
+ public CopyRectDecoder(Graphics g, RfbInputStream is, int frameBufferW,
+ int frameBufferH) {
+ super(g, is, frameBufferW, frameBufferH);
+ }
+
+ //
+ // Override handleRect method handle CopyRect
+ //
+
+ public void handleRect(int x, int y, int w, int h) throws IOException {
+
+ //
+ // Write encoding ID to record output stream
+ //
+
+ if (dos != null) {
+ dos.writeInt(CopyRectDecoder.EncodingCopyRect);
+ }
+
+ //
+ // TODO: Place copy rect handler code here
+ //
+ }
+}