DisplayImpl.h revision e181ad11aba72065bded993cb187ceebea1d1991
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef ____H_DISPLAYIMPL
#define ____H_DISPLAYIMPL
#include "VirtualBoxBase.h"
#include "SchemaDefs.h"
#include <iprt/semaphore.h>
#include <VBox/VBoxGuest.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;
{
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);
{
}
void VideoAccelFlush (void);
bool VideoAccelAllowed (void);
#ifdef VBOX_VRDP
void VideoAccelVRDP (bool fEnable);
#endif /* VBOX_VRDP */
// IConsoleCallback methods
{
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(QueryFramebuffer)(ULONG aScreenId, IFramebuffer * * aFramebuffer, LONG * aXOrigin, LONG * aYOrigin);
// for VirtualBoxSupportErrorInfoImpl
void updateDisplayData (bool aCheckParams = false);
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);
/** 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;
bool mInternalFramebuffer;
// ComPtr<IFramebuffer> mFramebuffer;
unsigned mcMonitors;
bool mFramebufferOpened;
/** bitmask of acceleration operations supported by current framebuffer */
/* 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);
// volatile uint32_t mu32ResizeStatus;
};
#endif // ____H_DISPLAYIMPL