FramebufferImpl.cpp revision 65a24a6d074ca3422fd58830484323b3fd8096b2
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2007 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#include "FramebufferImpl.h"
#include <iprt/semaphore.h>
// constructor / destructor
/////////////////////////////////////////////////////////////////////////////
{
}
{
if (mData)
delete mData;
}
// public methods only for internal purposes
/////////////////////////////////////////////////////////////////////////////
{
return S_OK;
}
// IFramebuffer properties
/////////////////////////////////////////////////////////////////////////////
{
if (!address)
return E_POINTER;
return S_OK;
}
{
if (!width)
return E_POINTER;
return S_OK;
}
{
if (!height)
return E_POINTER;
return S_OK;
}
{
if (!bitsPerPixel)
return E_POINTER;
return S_OK;
}
{
if (!bytesPerLine)
return E_POINTER;
return S_OK;
}
{
if (!pixelFormat)
return E_POINTER;
return S_OK;
}
{
if (!usesGuestVRAM)
return E_POINTER;
*usesGuestVRAM = FALSE;
return S_OK;
}
{
if (!heightReduction)
return E_POINTER;
/* no reduction */
*heightReduction = 0;
return S_OK;
}
{
if (!aOverlay)
return E_POINTER;
/* no overlay */
*aOverlay = 0;
return S_OK;
}
{
if (!winId)
return E_POINTER;
*winId = 0;
return S_OK;
}
// IFramebuffer methods
/////////////////////////////////////////////////////////////////////////////
{
return S_OK;
}
{
return S_OK;
}
{
if (!finished)
return E_POINTER;
// no need for the caller to wait
*finished = true;
return S_OK;
}
{
if (!finished)
return E_POINTER;
// no need for the caller to wait
*finished = true;
// allocate a new buffer
delete mData;
mWidth = w;
mHeight = h;
return S_OK;
}
{
if (!supported)
return E_POINTER;
/* no acceleration please, we're a slow fallback implementation! */
*supported = false;
return S_OK;
}
{
if (!supported)
return E_POINTER;
/* whatever you want! */
*supported = true;
return S_OK;
}
{
if (!handled)
return E_POINTER;
/* eek, what do you expect from us?! */
*handled = false;
return S_OK;
}
{
if (!handled)
return E_POINTER;
/* eek, what do you expect from us?! */
*handled = false;
return S_OK;
}
{
if (!rects)
return E_POINTER;
/// @todo
return S_OK;
}
{
if (!rects)
return E_POINTER;
/// @todo
return S_OK;
}