Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  /*
   *  Copyright (C) 2010-2011 Oracle Corporation
   *
   *  This file is part of the VirtualBox SDK, as available from
   *  http://www.virtualbox.org.  This library is free software; you can
   *  redistribute it and/or modify it under the terms of the GNU Lesser General
   *  Public License as published by the Free Software Foundation, in version 2.1
   *  as it comes in the "COPYING.LIB" file of the VirtualBox SDK distribution.
  *  This library is distributed in the hope that it will be useful, but WITHOUT
  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  *  License for more details.
  *
  * IDisplay.java
  *
  * DO NOT EDIT! This is a generated file.
  * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
  * Generator: src/VBox/Main/glue/glue-java.xsl
  */
 
 package org.virtualbox_4_2;
 
 import javax.xml.ws.*;
 import java.util.List;

The IDisplay interface represents the virtual machine's display. The object implementing this interface is contained in each IConsole.getDisplay() attribute and represents the visual output of the virtual machine. The virtual display supports pluggable output targets represented by the IFramebuffer interface. Examples of the output target are a window on the host computer or an RDP session's display on a remote computer. Interface ID: {B83EE395-8679-40CA-8D60-1A0CBE724930}
 
 public class IDisplay extends IUnknown {
 
     public IDisplay(String wrappedVboxPortType port) {
           super(wrappedport);
     }
     public static IDisplay queryInterface(IUnknown obj) {
        return obj == null ?  null : new IDisplay(obj.getWrapped(), obj.getRemoteWSPort());
     }
Queries display width, height and color depth for given screen.
 
     public void getScreenResolution(Long screenIdHolder<LongwidthHolder<LongheightHolder<LongbitsPerPixel) {
       try {
         javax.xml.ws.Holder<Long>   tmp_width = new  javax.xml.ws.Holder<Long>();
         javax.xml.ws.Holder<Long>   tmp_height = new  javax.xml.ws.Holder<Long>();
         javax.xml.ws.Holder<Long>   tmp_bitsPerPixel = new  javax.xml.ws.Holder<Long>();
         .iDisplayGetScreenResolution(screenIdtmp_widthtmp_heighttmp_bitsPerPixel);
         width.value = tmp_width.value;
         height.value = tmp_height.value;
         bitsPerPixel.value = tmp_bitsPerPixel.value;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Asks VirtualBox to request the given video mode from the guest. This is just a hint and it cannot be guaranteed that the requested resolution will be used. Guest Additions are required for the request to be seen by guests. The caller should issue the request and wait for a resolution change and after a timeout retry. Specifying 0 for either width, height or bitsPerPixel parameters means that the corresponding values should be taken from the current video mode (i.e. left unchanged). If the guest OS supports multi-monitor configuration then the display parameter specifies the number of the guest display to send the hint to: 0 is the primary display, 1 is the first secondary and so on. If the multi-monitor configuration is not supported, display must be 0.

Parameters:
display The number of the guest display to send the hint to.
enabled True, if this guest screen is enabled, False otherwise.
changeOrigin True, if the origin of the guest screen should be changed, False otherwise.
originX The X origin of the guest screen.
originY The Y origin of the guest screen. Expected result codes:
E_INVALIDARG The display is not associated with any monitor.
    public void setVideoModeHint(Long displayBoolean enabledBoolean changeOriginInteger originXInteger originYLong widthLong heightLong bitsPerPixel) {
      try {
        .iDisplaySetVideoModeHint(displayenabledchangeOriginoriginXoriginYwidthheightbitsPerPixel);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Enables or disables seamless guest display rendering (seamless desktop integration) mode. NOTE: Calling this method has no effect if IGuest.getFacilityStatus(org.virtualbox_4_2.AdditionsFacilityType,org.virtualbox_4_2.Holder) with facility Seamless does not return Active.
    public void setSeamlessMode(Boolean enabled) {
      try {
        .iDisplaySetSeamlessMode(enabled);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Takes a guest screen shot of the requested size and returns it as an array of bytes in uncompressed 32-bit RGBA format. A pixel consists of 4 bytes in order: R, G, B, 0xFF. This API is slow, but could be the only option to get guest screenshot for scriptable languages not allowed to manipulate with addresses directly.

Parameters:
screenId Monitor to take screenshot from.
width Desired image width.
height Desired image height.
Returns:
Array with resulting screen data. Expected result codes:
E_NOTIMPL Feature not implemented.
@link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR Could not take a screenshot.
    public byte[] takeScreenShotToArray(Long screenIdLong widthLong height) {
      try {
        /*base64*/String     retVal;
        retVal = .iDisplayTakeScreenShotToArray(screenIdwidthheight);
        return Helper.decodeBase64(retVal);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Takes a guest screen shot of the requested size and returns it as PNG image in array.

Parameters:
screenId Monitor to take the screenshot from.
width Desired image width.
height Desired image height.
Returns:
Array with resulting screen data. Expected result codes:
E_NOTIMPL Feature not implemented.
@link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR Could not take a screenshot.
    public byte[] takeScreenShotPNGToArray(Long screenIdLong widthLong height) {
      try {
        /*base64*/String     retVal;
        retVal = .iDisplayTakeScreenShotPNGToArray(screenIdwidthheight);
        return Helper.decodeBase64(retVal);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Does a full invalidation of the VM display and instructs the VM to update it. Expected result codes:
@link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR Could not invalidate and update screen.
    public void invalidateAndUpdate() {
      try {
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Signals that a framebuffer has completed the resize operation. Expected result codes:
@link ::VBOX_E_NOT_SUPPORTED VBOX_E_NOT_SUPPORTED Operation only valid for external frame buffers.
    public void resizeCompleted(Long screenId) {
      try {
        .iDisplayResizeCompleted(screenId);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Signals that framebuffer window viewport has changed.

Parameters:
screenId Monitor to take the screenshot from.
x Framebuffer x offset.
y Framebuffer y offset.
width Viewport width.
height Viewport height. Expected result codes:
E_INVALIDARG The specified viewport data is invalid.
    public void viewportChanged(Long screenIdLong xLong yLong widthLong height) {
      try {
        .iDisplayViewportChanged(screenIdxywidthheight);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
New to GrepCode? Check out our FAQ X