public class IMouse extends IUnknown
IConsole.getMouse()
.
Through this interface, the virtual machine's virtual mouse can be
controlled.
Interface ID: {10CD08D0-E8B8-4838-B10C-45BA193734C1}Constructor and Description |
---|
IMouse(java.lang.String wrapped,
org.virtualbox_6_1.ObjectRefManager objMgr,
org.virtualbox_6_1.jaxws.VboxPortType port) |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
getAbsoluteSupported()
Whether the guest OS supports absolute mouse pointer positioning
or not.
|
IEventSource |
getEventSource()
Event source for mouse events.
|
java.lang.Boolean |
getMultiTouchSupported()
Whether the guest OS has enabled the multi-touch reporting device.
|
java.lang.Boolean |
getNeedsHostCursor()
Whether the guest OS can currently switch to drawing it's own mouse
cursor on demand.
|
IMousePointerShape |
getPointerShape()
The current mouse pointer used by the guest.
|
java.lang.Boolean |
getRelativeSupported()
Whether the guest OS supports relative mouse pointer positioning
or not.
|
void |
putEventMultiTouch(java.lang.Integer count,
java.util.List<java.lang.Long> contacts,
java.lang.Long scanTime)
Sends a multi-touch pointer event.
|
void |
putEventMultiTouchString(java.lang.Integer count,
java.lang.String contacts,
java.lang.Long scanTime) |
void |
putMouseEvent(java.lang.Integer dx,
java.lang.Integer dy,
java.lang.Integer dz,
java.lang.Integer dw,
java.lang.Integer buttonState)
Initiates a mouse event using relative pointer movements
along x and y axis.
|
void |
putMouseEventAbsolute(java.lang.Integer x,
java.lang.Integer y,
java.lang.Integer dz,
java.lang.Integer dw,
java.lang.Integer buttonState)
Positions the mouse pointer using absolute x and y coordinates.
|
static IMouse |
queryInterface(IUnknown obj) |
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
public IMouse(java.lang.String wrapped, org.virtualbox_6_1.ObjectRefManager objMgr, org.virtualbox_6_1.jaxws.VboxPortType port)
public java.lang.Boolean getAbsoluteSupported()
IMouseCapabilityChangedEvent
event to be instantly informed about changes of this attribute
during virtual machine execution.putMouseEventAbsolute(Integer,Integer,Integer,Integer,Integer)
public java.lang.Boolean getRelativeSupported()
IMouseCapabilityChangedEvent
event to be instantly informed about changes of this attribute
during virtual machine execution.putMouseEvent(Integer,Integer,Integer,Integer,Integer)
public java.lang.Boolean getMultiTouchSupported()
IMouseCapabilityChangedEvent
event to be instantly informed about changes of this attribute
during virtual machine execution.putMouseEvent(Integer,Integer,Integer,Integer,Integer)
public java.lang.Boolean getNeedsHostCursor()
IMouseCapabilityChangedEvent
event to be instantly informed about changes of this attribute
during virtual machine execution.putMouseEvent(Integer,Integer,Integer,Integer,Integer)
public IMousePointerShape getPointerShape()
public IEventSource getEventSource()
public void putMouseEvent(java.lang.Integer dx, java.lang.Integer dy, java.lang.Integer dz, java.lang.Integer dw, java.lang.Integer buttonState)
dx
- Amount of pixels the mouse should move to the right.
Negative values move the mouse to the left.dy
- Amount of pixels the mouse should move downwards.
Negative values move the mouse upwards.dz
- Amount of mouse wheel moves.
Positive values describe clockwise wheel rotations,
negative values describe counterclockwise rotations.dw
- Amount of horizontal mouse wheel moves.
Positive values describe a movement to the left,
negative values describe a movement to the right.buttonState
- The current state of mouse buttons. Every bit represents
a mouse button as follows:Bit 0 (0x01) | left mouse button |
Bit 1 (0x02) | right mouse button |
Bit 2 (0x04) | middle mouse button |
E_ACCESSDENIED | Console not powered up. |
VBOX_E_IPRT_ERROR | Could not send mouse event to virtual mouse. |
public void putMouseEventAbsolute(java.lang.Integer x, java.lang.Integer y, java.lang.Integer dz, java.lang.Integer dw, java.lang.Integer buttonState)
x
- X coordinate of the pointer in pixels, starting from 1.y
- Y coordinate of the pointer in pixels, starting from 1.dz
- Amount of mouse wheel moves.
Positive values describe clockwise wheel rotations,
negative values describe counterclockwise rotations.dw
- Amount of horizontal mouse wheel moves.
Positive values describe a movement to the left,
negative values describe a movement to the right.buttonState
- The current state of mouse buttons. Every bit represents
a mouse button as follows:Bit 0 (0x01) | left mouse button |
Bit 1 (0x02) | right mouse button |
Bit 2 (0x04) | middle mouse button |
E_ACCESSDENIED | Console not powered up. |
VBOX_E_IPRT_ERROR | Could not send mouse event to virtual mouse. |
getAbsoluteSupported()
public void putEventMultiTouch(java.lang.Integer count, java.util.List<java.lang.Long> contacts, java.lang.Long scanTime)
count
- Number of contacts in the event.contacts
- Each array element contains packed information about one contact.
Bits 0..15: X coordinate in pixels.
Bits 16..31: Y coordinate in pixels.
Bits 32..39: contact identifier.
Bit 40: "in contact" flag, which indicates that there is a contact with the touch surface.
Bit 41: "in range" flag, the contact is close enough to the touch surface.
All other bits are reserved for future use and must be set to 0.scanTime
- Timestamp of the event in milliseconds. Only relative time between events is important.
Expected result codes:
E_ACCESSDENIED | Console not powered up. |
VBOX_E_IPRT_ERROR | Could not send event to virtual device. |
getMultiTouchSupported()
public void putEventMultiTouchString(java.lang.Integer count, java.lang.String contacts, java.lang.Long scanTime)
contacts
- Contains information about all contacts:
"id1,x1,y1,inContact1,inRange1;...;idN,xN,yN,inContactN,inRangeN".
For example for two contacts: "0,10,20,1,1;1,30,40,1,1"putEventMultiTouch(Integer,List,Long)