DisplayImpl.h revision fcaa906e2e3e46e90a3ad3964c628ec73359d155
/* $Id$ */
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2008 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.
*/
#ifndef ____H_DISPLAYIMPL
#define ____H_DISPLAYIMPL
#include "VirtualBoxBase.h"
#include "SchemaDefs.h"
#include <iprt/semaphore.h>
#include <VBox/VBoxVideo.h>
enum {
};
typedef struct _DISPLAYFBINFO
{
ULONG w;
ULONG h;
volatile uint32_t u32ResizeStatus;
/* The Framebuffer has default format and must be updates immediately. */
bool fDefaultFormat;
struct {
/* The rectangle that includes all dirty rectangles. */
} dirtyRect;
struct {
bool fPending;
void *pvVRAM;
int w;
int h;
#ifdef VBOX_WITH_HGSMI
bool fVBVAEnabled;
struct {
#endif /* VBOX_WITH_HGSMI */
{
void FinalRelease();
// public initializer/uninitializer for internal purposes only
void uninit();
// public methods only for internal purposes
int handleDisplayResize (unsigned uScreenId, uint32_t bpp, void *pvVRAM, uint32_t cbLine, int w, int h);
#ifdef VBOX_WITH_VIDEOHWACCEL
#endif
{
}
void VideoAccelFlush (void);
bool VideoAccelAllowed (void);
#ifdef VBOX_WITH_VRDP
void VideoAccelVRDP (bool fEnable);
#endif /* VBOX_WITH_VRDP */
// IConsoleCallback methods
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
if (canShow)
return S_OK;
}
{
if (winId)
*winId = 0;
return S_OK;
}
// IDisplay properties
// IDisplay methods
STDMETHOD(GetFramebuffer)(ULONG aScreenId, IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin);
// for VirtualBoxSupportErrorInfoImpl
void updateDisplayData (bool aCheckParams = false);
unsigned uScreenId);
static DECLCALLBACK(int) displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy);
static DECLCALLBACK(void) displayLFBModeChangeCallback(PPDMIDISPLAYCONNECTOR pInterface, bool fEnabled);
static DECLCALLBACK(void) displayProcessAdapterDataCallback(PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, uint32_t u32VRAMSize);
static DECLCALLBACK(void) displayProcessDisplayDataCallback(PPDMIDISPLAYCONNECTOR pInterface, void *pvVRAM, unsigned uScreenId);
#ifdef VBOX_WITH_VIDEOHWACCEL
static DECLCALLBACK(void) displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVHWACMD pCommand);
#endif
#ifdef VBOX_WITH_HGSMI
static DECLCALLBACK(void) displayVBVAUpdateBegin(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId);
static DECLCALLBACK(void) displayVBVAUpdateProcess(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, const PVBVACMDHDR pCmd, size_t cbCmd);
static DECLCALLBACK(void) displayVBVAUpdateEnd(PPDMIDISPLAYCONNECTOR pInterface, unsigned uScreenId, int32_t x, int32_t y, uint32_t cx, uint32_t cy);
static DECLCALLBACK(int) displayVBVAResize(PPDMIDISPLAYCONNECTOR pInterface, const PVBVAINFOVIEW pView, const PVBVAINFOSCREEN pScreen, void *pvVRAM);
static DECLCALLBACK(int) displayVBVAMousePointerShape(PPDMIDISPLAYCONNECTOR pInterface, bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy, const void *pvShape);
#endif
static DECLCALLBACK(int) displaySSMLoad(PSSMHANDLE pSSM, void *pvUser, uint32_t uVersion, uint32_t uPass);
/** Pointer to the associated display driver. */
struct DRVMAINDISPLAY *mpDrv;
/** Pointer to the device instance for the VMM Device. */
/** Set after the first attempt to find the VMM Device. */
bool mfVMMDevInited;
unsigned mcMonitors;
bool mFramebufferOpened;
/* arguments of the last handleDisplayResize() call */
void *mLastAddress;
int mLastWidth;
int mLastHeight;
bool mfVideoAccelEnabled;
bool mfVideoAccelVRDP;
int32_t volatile mcVideoAccelVRDPRefs;
bool mfMachineRunning;
void handleResizeCompletedEMT (void);
};
#endif // ____H_DISPLAYIMPL
/* vi: set tabstop=4 shiftwidth=4 expandtab: */