Mercurial > hg > Applications > TreeVNC
comparison src/main/java/jp/ac/u_ryukyu/treevnc/ChangeDesktopSize.java @ 441:cee43ceac9b3
send thatscreen position INIT_DATA
author | one |
---|---|
date | Thu, 16 Jun 2016 21:08:19 +0900 |
parents | eaf6dbcb42dc |
children | 614057b86122 |
comparison
equal
deleted
inserted
replaced
440:eaf6dbcb42dc | 441:cee43ceac9b3 |
---|---|
8 public class ChangeDesktopSize { | 8 public class ChangeDesktopSize { |
9 | 9 |
10 private ByteBuffer msg; | 10 private ByteBuffer msg; |
11 | 11 |
12 public ChangeDesktopSize(int width, int height, | 12 public ChangeDesktopSize(int width, int height, |
13 int x, int y, byte[] initData, EncodingType desktopSize, short id) { | 13 int x, int y, EncodingType desktopSize, byte[] initData, short id) { |
14 msg = ByteBuffer.allocate(16+4+initData.length).order(ByteOrder.BIG_ENDIAN); | 14 msg = ByteBuffer.allocate(16+4+initData.length).order(ByteOrder.BIG_ENDIAN); |
15 msg.put((byte) 0); // FrameBufferUpdate | 15 msg.put((byte) 0); // FrameBufferUpdate |
16 msg.put((byte) 0); // padding | 16 msg.put((byte) 0); // padding |
17 msg.putShort((short) 1); // number of rectangle | 17 msg.putShort((short) 1); // number of rectangle |
18 msg.putShort((short) id); | 18 msg.putShort((short) x); |
19 msg.putShort((short) 0); | 19 msg.putShort((short) y); |
20 msg.putShort((short) width); | 20 msg.putShort((short) width); |
21 msg.putShort((short) height); | 21 msg.putShort((short) height); |
22 msg.putShort((short) x); | |
23 msg.putShort((short) y); | |
24 msg.putInt(desktopSize.getId()); | 22 msg.putInt(desktopSize.getId()); |
25 msg.putInt(initData.length); | 23 msg.putInt(initData.length+2); |
24 msg.putShort(id); | |
26 msg.put(initData); | 25 msg.put(initData); |
27 | |
28 msg.flip(); | 26 msg.flip(); |
29 | 27 |
30 } | 28 } |
31 | 29 |
32 public ByteBuffer getMessage(){ | 30 public ByteBuffer getMessage(){ |