]> source.dussan.org Git - tigervnc.git/commitdiff
Rename CMsgWriter functions to match C++ code
authorBrian P. Hinz <bphinz@users.sf.net>
Sun, 12 Nov 2017 16:03:25 +0000 (11:03 -0500)
committerBrian P. Hinz <bphinz@users.sf.net>
Mon, 13 Nov 2017 23:20:50 +0000 (18:20 -0500)
java/com/tigervnc/rfb/CMsgWriter.java
java/com/tigervnc/vncviewer/CConn.java
java/com/tigervnc/vncviewer/Viewport.java

index ea2b7c919e3da42a6c9ae2d9bf7040d291edf693..164fa293467d95290f2ff7302b165e955c093f77 100644 (file)
@@ -211,16 +211,16 @@ public class CMsgWriter {
     endMsg();
   }
 
-  synchronized public void writeKeyEvent(int key, boolean down)
+  synchronized public void keyEvent(int keysym, boolean down)
   {
     startMsg(MsgTypes.msgTypeKeyEvent);
     os.writeU8(down?1:0);
     os.pad(2);
-    os.writeU32(key);
+    os.writeU32(keysym);
     endMsg();
   }
 
-  synchronized public void writePointerEvent(Point pos, int buttonMask)
+  synchronized public void pointerEvent(Point pos, int buttonMask)
   {
     Point p = new Point(pos.x,pos.y);
     if (p.x < 0) p.x = 0;
index 85bdcb6964a0bed2896da86565cfe52fa8dba4b9..398ba9d01c008e8b9b4dadeafcb49935d0aab56a 100644 (file)
@@ -757,7 +757,7 @@ public class CConn extends CConnection implements
   public void writeKeyEvent(int keysym, boolean down) {
     if (state() != RFBSTATE_NORMAL || shuttingDown)
       return;
-    writer().writeKeyEvent(keysym, down);
+    writer().keyEvent(keysym, down);
   }
 
   public void writeKeyEvent(KeyEvent ev) {
@@ -866,7 +866,7 @@ public class CConn extends CConnection implements
       break;
     }
 
-    writer().writePointerEvent(new Point(ev.getX(), ev.getY()), buttonMask);
+    writer().pointerEvent(new Point(ev.getX(), ev.getY()), buttonMask);
   }
 
   public void writeWheelEvent(MouseWheelEvent ev) {
@@ -882,9 +882,9 @@ public class CConn extends CConnection implements
     for (int i = 0; i < Math.abs(clicks); i++) {
       x = ev.getX();
       y = ev.getY();
-      writer().writePointerEvent(new Point(x, y), buttonMask);
+      writer().pointerEvent(new Point(x, y), buttonMask);
       buttonMask = 0;
-      writer().writePointerEvent(new Point(x, y), buttonMask);
+      writer().pointerEvent(new Point(x, y), buttonMask);
     }
 
   }
index 01d46cafd6ce2518cdfa688dec0ec929456b0f61..62b027f79301ed3a0819c7f6f725dd22d3b7ed4f 100644 (file)
@@ -87,7 +87,7 @@ class Viewport extends JPanel implements MouseListener,
     // a server-side cursor. Ideally we'd like to send the actual pointer
     // position, but we can't really tell when the window manager is done
     // placing us so we don't have a good time for that.
-    cc.writer().writePointerEvent(new Point(w/2, h/2), 0);
+    cc.writer().pointerEvent(new Point(w/2, h/2), 0);
   }
 
   // Most efficient format (from Viewport's point of view)