All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.xml.ws.commons.virtualbox.IMouse Maven / Gradle / Ivy

The newest version!

package com.sun.xml.ws.commons.virtualbox;

import javax.xml.ws.WebServiceException;


/**
 * The IMouse interface represents the virtual machine's mouse. Used in {@link IConsole#mouse}.
 * 
 *       Through this interface, the virtual machine's virtual mouse can be
 *       controlled.
 * 
 */
public class IMouse
    extends VBoxObject
{


    public IMouse(String _this, VboxPortType port) {
        
        super(_this,port);
    
    }

    /**
     * Whether the guest OS supports absolute mouse pointer positioning
     *         or not.
VirtualBox Guest Tools need to be installed to the guest OS * in order to enable absolute mouse positioning support. * You can use the {@link IConsoleCallback#onMouseCapabilityChange} callback to be instantly informed about changes of this attribute * during virtual machine execution.
* @see * */ public boolean getAbsoluteSupported() { try { boolean retVal = port.iMouseGetAbsoluteSupported(_this); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Initiates a mouse event using relative pointer movements * along x and y axis.Console not powered up.Could not send mouse event to virtual mouse. * * @param dz * Amount of mouse wheel moves. * Positive values describe clockwise wheel rotations, * negative values describe counterclockwise rotations. * @param dx * Amount of pixels the mouse should move to the right. * Negative values move the mouse to the left. * @param buttonState * The current state of mouse buttons. Every bit represents * a mouse button as follows:A value ofmeans the corresponding button is pressed. * otherwise it is released. * @param dy * Amount of pixels the mouse should move downwards. * Negative values move the mouse upwards. */ public void putMouseEvent(int dx, int dy, int dz, int buttonState) { try { port.iMousePutMouseEvent(_this, dx, dy, dz, buttonState); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * 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.Console not powered up.Could not send mouse event to virtual mouse.
This method will have effect only if absolute mouse * positioning is supported by the guest OS.
* @see * * @param dz * Amount of mouse wheel moves. * Positive values describe clockwise wheel rotations, * negative values describe counterclockwise rotations. * @param buttonState * The current state of mouse buttons. Every bit represents * a mouse button as follows:A value ofmeans the corresponding button is pressed. * otherwise it is released. * @param y * Y coordinate of the pointer in pixels, starting from. * @param x * X coordinate of the pointer in pixels, starting from. */ public void putMouseEventAbsolute(int x, int y, int dz, int buttonState) { try { port.iMousePutMouseEventAbsolute(_this, x, y, dz, buttonState); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy