nn.pp.rccore

## Interface SingleCursorHelper

-     public interface SingleCursorHelper

  Helper interface for Single Mouse Cursor Mode. Users of RCCore can set an implementation of this interface to have better UI support for Single Mouse, e.g. native implementations of hiding or locking the mouse cursor.
  See Also:
    `RCCore.isSingleCursorMode()`, `RCCore.setSingleCursorMode(boolean)`, `RCCore.setSingleCursorHelper(SingleCursorHelper)`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `SingleCursorHelper.MouseEventListener` Listener for mouse events.

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default boolean` | `canHideCursor()` Has this implementation support for hiding/showing the mouse cursor? If yes, then this implementation's version for hiding/showing the cursor is used.
    `default boolean` | `canMoveCursor()` Has this implementation support for moving the mouse cursor? This is required to center the cursor in the middle of the KVM console in Single Mouse Mode.
    `default void` | `hideCursor()` Hide the mouse cursor.
    `default void` | `lockCursor(SingleCursorHelper.MouseEventListener mouseListener)` Lock the mouse cursor.
    `default void` | `moveCursor(int x, int y)` Move the cursor to a given position on the screen.
    `default void` | `restoreCursor()` Restore the mouse cursor.
    `default void` | `unlockCursor()` Unlock the mouse cursor

- - ### Method Detail

    - #### canHideCursor

          default boolean canHideCursor()

      Has this implementation support for hiding/showing the mouse cursor? If yes, then this implementation's version for hiding/showing the cursor is used. Otherwise, RCCore uses its internal implementation for this.
      Returns:
        `true` if hiding/showing the mouse cursor is implemented, `false` otherwise.
      See Also:
        `hideCursor()`, `restoreCursor()`

    - #### hideCursor

          default void hideCursor()

      Hide the mouse cursor. This method is only used if `canHideCursor()` returns `true`.
      See Also:
        `restoreCursor()`, `canHideCursor()`

    - #### restoreCursor

          default void restoreCursor()

      Restore the mouse cursor. This method is only used if `canHideCursor()` returns `true`.
      See Also:
        `hideCursor()`, `canHideCursor()`

    - #### lockCursor

          default void lockCursor(SingleCursorHelper.MouseEventListener mouseListener)

      Lock the mouse cursor. This usually locks the cursor inside the current window, if implemented.
      Parameters:
        `mouseListener` - A listener to dispatch mouse events in case the pointer locking prevents mouse events from getting to the KVM console. May be `null`.
      See Also:
        `unlockCursor()`

    - #### unlockCursor

          default void unlockCursor()

      Unlock the mouse cursor
      See Also:
        `lockCursor(MouseEventListener)`

    - #### canMoveCursor

          default boolean canMoveCursor()

      Has this implementation support for moving the mouse cursor? This is required to center the cursor in the middle of the KVM console in Single Mouse Mode.

      If yes, then this implementation's version for moving the cursor is used. Otherwise, RCCore uses its internal implementation for this.

      Returns:
        `true` if centering the mouse cursor is implemented, `false` otherwise.
      See Also:
        `moveCursor(int, int)`

    - #### moveCursor

          default void moveCursor(int x,
                                  int y)

      Move the cursor to a given position on the screen.
      Parameters:
        `x` - the X coordinate on the screen
        `y` - the Y coordinate on the screen
      See Also:
        `canMoveCursor()`

Copyright © 2025 Raritan Inc. All Rights Reserved.