()
| 57 | } |
| 58 | |
| 59 | public void readMsg() |
| 60 | { |
| 61 | if (nUpdateRectsLeft == 0) { |
| 62 | int type = is.readU8(); |
| 63 | |
| 64 | switch (type) { |
| 65 | case MsgTypes.msgTypeSetColourMapEntries: |
| 66 | readSetColourMapEntries(); |
| 67 | break; |
| 68 | case MsgTypes.msgTypeBell: |
| 69 | readBell(); |
| 70 | break; |
| 71 | case MsgTypes.msgTypeServerCutText: |
| 72 | readServerCutText(); |
| 73 | break; |
| 74 | case MsgTypes.msgTypeFramebufferUpdate: |
| 75 | readFramebufferUpdate(); |
| 76 | break; |
| 77 | case MsgTypes.msgTypeServerFence: |
| 78 | readFence(); |
| 79 | break; |
| 80 | case MsgTypes.msgTypeEndOfContinuousUpdates: |
| 81 | readEndOfContinuousUpdates(); |
| 82 | break; |
| 83 | default: |
| 84 | vlog.error("Unknown message type "+type); |
| 85 | throw new Exception("Unknown message type"); |
| 86 | } |
| 87 | } else { |
| 88 | int x = is.readU16(); |
| 89 | int y = is.readU16(); |
| 90 | int w = is.readU16(); |
| 91 | int h = is.readU16(); |
| 92 | int encoding = is.readS32(); |
| 93 | |
| 94 | switch (encoding) { |
| 95 | case Encodings.pseudoEncodingLastRect: |
| 96 | nUpdateRectsLeft = 1; // this rectangle is the last one |
| 97 | break; |
| 98 | case Encodings.pseudoEncodingXCursor: |
| 99 | readSetXCursor(w, h, new Point(x,y)); |
| 100 | break; |
| 101 | case Encodings.pseudoEncodingCursor: |
| 102 | readSetCursor(w, h, new Point(x,y)); |
| 103 | break; |
| 104 | case Encodings.pseudoEncodingCursorWithAlpha: |
| 105 | readSetCursorWithAlpha(w, h, new Point(x,y)); |
| 106 | break; |
| 107 | case Encodings.pseudoEncodingVMwareCursor: |
| 108 | readSetVMwareCursor(w, h, new Point(x,y)); |
| 109 | break; |
| 110 | case Encodings.pseudoEncodingDesktopName: |
| 111 | readSetDesktopName(x, y, w, h); |
| 112 | break; |
| 113 | case Encodings.pseudoEncodingDesktopSize: |
| 114 | handler.setDesktopSize(w, h); |
| 115 | break; |
| 116 | case Encodings.pseudoEncodingExtendedDesktopSize: |
no test coverage detected