Mouse Emulation API module

Contents

These functions allow any tracker target to emulate a mouse.

Enums

enum ZCMouseButton { ZC_MOUSE_BUTTON_UNKNOWN = -1, ZC_MOUSE_BUTTON_LEFT = 0, ZC_MOUSE_BUTTON_RIGHT = 1, ZC_MOUSE_BUTTON_CENTER = 2 }
enum ZCMouseMovementMode { ZC_MOUSE_MOVEMENT_MODE_ABSOLUTE = 0, ZC_MOUSE_MOVEMENT_MODE_RELATIVE = 1 }

Typedefs

using ZCMouseButton = enum ZCMouseButton
using ZCMouseMovementMode = enum ZCMouseMovementMode

Functions

auto zcSetMouseEmulationEnabled(ZCContext context, ZSBool isEnabled) -> ZCError
auto zcIsMouseEmulationEnabled(ZCContext context, ZSBool* isEnabled) -> ZCError
auto zcSetMouseEmulationTarget(ZCContext context, ZCHandle targetHandle) -> ZCError
auto zcGetMouseEmulationTarget(ZCContext context, ZCHandle* targetHandle) -> ZCError
auto zcSetMouseEmulationMovementMode(ZCContext context, ZCMouseMovementMode movementMode) -> ZCError
auto zcGetMouseEmulationMovementMode(ZCContext context, ZCMouseMovementMode* movementMode) -> ZCError
auto zcSetMouseEmulationMaxDistance(ZCContext context, ZSFloat maxDistance) -> ZCError
auto zcGetMouseEmulationMaxDistance(ZCContext context, ZSFloat* maxDistance) -> ZCError
auto zcSetMouseEmulationButtonMapping(ZCContext context, ZSInt32 buttonId, ZCMouseButton mouseButton) -> ZCError
auto zcGetMouseEmulationButtonMapping(ZCContext context, ZSInt32 buttonId, ZCMouseButton* mouseButton) -> ZCError

Enum documentation

enum ZCMouseButton

Defines mouse buttons to be used when mapping a tracker target's buttons to a mouse.

Enumerators
ZC_MOUSE_BUTTON_UNKNOWN
ZC_MOUSE_BUTTON_LEFT
ZC_MOUSE_BUTTON_RIGHT
ZC_MOUSE_BUTTON_CENTER

enum ZCMouseMovementMode

Determines how the stylus and mouse control the cursor when both are used.

Enumerators
ZC_MOUSE_MOVEMENT_MODE_ABSOLUTE

The stylus uses absolute positions. In this mode, the mouse and stylus can fight for control of the cursor if both are in use. This is the default mode.

ZC_MOUSE_MOVEMENT_MODE_RELATIVE

The stylus applies delta positions to the mouse cursor's current position. Movements by the mouse and stylus are compounded without fighting.

Typedef documentation

typedef enum ZCMouseButton ZCMouseButton

Defines mouse buttons to be used when mapping a tracker target's buttons to a mouse.

typedef enum ZCMouseMovementMode ZCMouseMovementMode

Determines how the stylus and mouse control the cursor when both are used.

Function documentation

ZCError zcSetMouseEmulationEnabled(ZCContext context, ZSBool isEnabled)

Parameters
context in A handle to the internal state of the zSpace SDK.
isEnabled in True to enable emulation, false otherwise.

Enables or disables mouse emulation.

ZCError zcIsMouseEmulationEnabled(ZCContext context, ZSBool* isEnabled)

Parameters
context in A handle to the internal state of the zSpace SDK.
isEnabled out True if enabled, false otherwise.

Checks whether mouse emulation is enabled.

ZCError zcSetMouseEmulationTarget(ZCContext context, ZCHandle targetHandle)

Parameters
context in A handle to the internal state of the zSpace SDK.
targetHandle in A handle to the tracker target.

Assigns a tracker target that will emulate the mouse.

ZCError zcGetMouseEmulationTarget(ZCContext context, ZCHandle* targetHandle)

Parameters
context in A handle to the internal state of the zSpace SDK.
targetHandle out A handle to the tracker target.

Gets the tracker target that is responsible for emulating the mouse.

ZCError zcSetMouseEmulationMovementMode(ZCContext context, ZCMouseMovementMode movementMode)

Parameters
context in A handle to the internal state of the zSpace SDK.
movementMode in Movement is either absolute or relative to the mouse's current position.

Sets the mouse emulation's movement mode to absolute or relative. This function determines how mouse emulation behaves when both the mouse and stylus are used. Refer to ZCMouseMovementMode for details.

ZCError zcGetMouseEmulationMovementMode(ZCContext context, ZCMouseMovementMode* movementMode)

Parameters
context in A handle to the internal state of the zSpace SDK.
movementMode out The current setting for mouse movement.

Gets the mouse emulation's current movement mode.

ZCError zcSetMouseEmulationMaxDistance(ZCContext context, ZSFloat maxDistance)

Parameters
context in A handle to the internal state of the zSpace SDK.
maxDistance in The maximum distance in meters.

Sets the maximum distance that the tracker target can be from the display while emulating the mouse.

ZCError zcGetMouseEmulationMaxDistance(ZCContext context, ZSFloat* maxDistance)

Parameters
context in A handle to the internal state of the zSpace SDK.
maxDistance out The maximum distance in meters.

Gets the maximum distance that the tracker target can be from the display while emulating the mouse.

ZCError zcSetMouseEmulationButtonMapping(ZCContext context, ZSInt32 buttonId, ZCMouseButton mouseButton)

Parameters
context in A handle to the internal state of the zSpace SDK.
buttonId in The button on the tracker target.
mouseButton in The corresponding button on a mouse.

Maps a button on the tracker target to a mouse button.

ZCError zcGetMouseEmulationButtonMapping(ZCContext context, ZSInt32 buttonId, ZCMouseButton* mouseButton)

Parameters
context in A handle to the internal state of the zSpace SDK.
buttonId in The button on the tracker target.
mouseButton out The currently mapped button on a mouse.

Gets the currently mapped mouse button for the specified tracker target button.