org.virtualbox_4_2
Class IMouse
java.lang.Object
org.virtualbox_4_2.IUnknown
org.virtualbox_4_2.IMouse
public class IMouse
- extends IUnknown
The IMouse interface represents the virtual machine's mouse. Used in
IConsole.getMouse()
.
Through this interface, the virtual machine's virtual mouse can be
controlled.
Interface ID: {05044A52-7811-4F00-AE3A-0AB7FF707B10}
Constructor Summary |
IMouse(java.lang.String wrapped,
org.virtualbox_4_2.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 |
getNeedsHostCursor()
Whether the guest OS can currently switch to drawing it's own mouse
cursor on demand. |
java.lang.Boolean |
getRelativeSupported()
Whether the guest OS supports relative mouse pointer positioning
or not. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMouse
public IMouse(java.lang.String wrapped,
org.virtualbox_4_2.jaxws.VboxPortType port)
getAbsoluteSupported
public java.lang.Boolean getAbsoluteSupported()
- Whether the guest OS supports absolute mouse pointer positioning
or not.
NOTE:
You can use the
IMouseCapabilityChangedEvent
event 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 the
IMouseCapabilityChangedEvent
event 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 the
IMouseCapabilityChangedEvent
event to be instantly informed about changes of this attribute
during virtual machine execution.
- Returns:
- Boolean
- See Also:
putMouseEvent(Integer,Integer,Integer,Integer,Integer)
getEventSource
public IEventSource getEventSource()
- Event source for mouse events.
- Returns:
- org.virtualbox_4_2.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 of 1 means the corresponding button is pressed.
otherwise it is released.
Expected result codes:
E_ACCESSDENIED |
Console not powered up.
|
@link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR |
Could 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.
- 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_ACCESSDENIED |
Console not powered up.
|
@link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR |
Could 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()