org.virtualbox_6_0
Class IMouse

java.lang.Object
  extended by org.virtualbox_6_0.IUnknown
      extended by org.virtualbox_6_0.IMouse

public class IMouse
extends IUnknown

The IMouse interface represents the virtual machine's mouse. Used inIConsole.getMouse(). Through this interface, the virtual machine's virtual mouse can be controlled. Interface ID: {10CD08D0-E8B8-4838-B10C-45BA193734C1}


Field Summary
 
Fields inherited from class org.virtualbox_6_0.IUnknown
obj, objMgr, port
 
Constructor Summary
IMouse(java.lang.String wrapped, org.virtualbox_6_0.ObjectRefManager objMgr, org.virtualbox_6_0.jaxws.VboxPortType port)
           
 
Method Summary
 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)
           
 
Methods inherited from class org.virtualbox_6_0.IUnknown
getObjMgr, getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMouse

public IMouse(java.lang.String wrapped,
              org.virtualbox_6_0.ObjectRefManager objMgr,
              org.virtualbox_6_0.jaxws.VboxPortType port)
Method Detail

getAbsoluteSupported

public java.lang.Boolean getAbsoluteSupported()
Whether the guest OS supports absolute mouse pointer positioning or not. NOTE: You can use theIMouseCapabilityChangedEventevent to be instantly informed about changes of this attribute during virtual machine execution.

Returns:
Boolean
See Also:
putMouseEventAbsolute(Integer,Integer,Integer,Integer,Integer)

getRelativeSupported

public java.lang.Boolean getRelativeSupported()
Whether the guest OS supports relative mouse pointer positioning or not. NOTE: You can use theIMouseCapabilityChangedEventevent to be instantly informed about changes of this attribute during virtual machine execution.

Returns:
Boolean
See Also:
putMouseEvent(Integer,Integer,Integer,Integer,Integer)

getMultiTouchSupported

public java.lang.Boolean getMultiTouchSupported()
Whether the guest OS has enabled the multi-touch reporting device. NOTE: You can use theIMouseCapabilityChangedEventevent to be instantly informed about changes of this attribute during virtual machine execution.

Returns:
Boolean
See Also:
putMouseEvent(Integer,Integer,Integer,Integer,Integer)

getNeedsHostCursor

public java.lang.Boolean getNeedsHostCursor()
Whether the guest OS can currently switch to drawing it's own mouse cursor on demand. NOTE: You can use theIMouseCapabilityChangedEventevent to be instantly informed about changes of this attribute during virtual machine execution.

Returns:
Boolean
See Also:
putMouseEvent(Integer,Integer,Integer,Integer,Integer)

getPointerShape

public IMousePointerShape getPointerShape()
The current mouse pointer used by the guest.

Returns:
org.virtualbox_6_0.IMousePointerShape

getEventSource

public IEventSource getEventSource()
Event source for mouse events.

Returns:
org.virtualbox_6_0.IEventSource

queryInterface

public static IMouse queryInterface(IUnknown obj)

putMouseEvent

public 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.

Parameters:
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
A value of1means the corresponding button is pressed. otherwise it is released. Expected result codes:
E_ACCESSDENIEDConsole not powered up.
VBOX_E_IPRT_ERRORCould not send mouse event to virtual mouse.

putMouseEventAbsolute

public 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. These coordinates are expressed in pixels and start from[1,1]which corresponds to the top left corner of the virtual display. The values[-1,-1]and[0x7fffffff,0x7fffffff]have special meanings as respectively "no data" (to signal that the host wishes to report absolute pointer data in future) and "out of range" (the host pointer is outside of all guest windows).

Parameters:
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
A value of 1 means the corresponding button is pressed. otherwise it is released. Expected result codes:
E_ACCESSDENIEDConsole not powered up.
VBOX_E_IPRT_ERRORCould not send mouse event to virtual mouse.
NOTE: This method will have effect only if absolute mouse positioning is supported by the guest OS.
See Also:
getAbsoluteSupported()

putEventMultiTouch

public void putEventMultiTouch(java.lang.Integer count,
                               java.util.List<java.lang.Long> contacts,
                               java.lang.Long scanTime)
Sends a multi-touch pointer event. The coordinates are expressed in pixels and start from[1,1]which corresponds to the top left corner of the virtual display.

Parameters:
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_ACCESSDENIEDConsole not powered up.
VBOX_E_IPRT_ERRORCould not send event to virtual device.
NOTE: The guest may not understand or may choose to ignore this event.
See Also:
getMultiTouchSupported()

putEventMultiTouchString

public void putEventMultiTouchString(java.lang.Integer count,
                                     java.lang.String contacts,
                                     java.lang.Long scanTime)
Parameters:
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"
See Also:
putEventMultiTouch(Integer,List,Long)