コード例 #1
0
ファイル: VncCanvas.java プロジェクト: mzhou/bVNC
 /** Invalidates (to redraw) the location of the remote pointer. */
 public void invalidateMousePosition() {
   if (bitmapData != null) {
     bitmapData.moveCursorRect(pointer.mouseX, pointer.mouseY);
     Rect r = bitmapData.getCursorRect();
     reDraw(r.left, r.top, r.width(), r.height());
   }
 }
コード例 #2
0
ファイル: VncCanvas.java プロジェクト: mzhou/bVNC
  /**
   * Moves soft cursor into a particular location.
   *
   * @param x
   * @param y
   */
  synchronized void softCursorMove(int x, int y) {
    if (bitmapData.isNotInitSoftCursor()) {
      initializeSoftCursor();
    }

    if (!inScrolling) {
      pointer.mouseX = x;
      pointer.mouseY = y;
      Rect pCRect = new Rect(bitmapData.getCursorRect());
      // Move the cursor.
      bitmapData.moveCursorRect(x, y);
      // Show the cursor.
      Rect r = bitmapData.getCursorRect();
      reDraw(r.left, r.top, r.width(), r.height());
      reDraw(pCRect.left, pCRect.top, pCRect.width(), pCRect.height());
    }
  }