DisplayImpl.h revision 0f81af4fd686345d90193074d4e2cbcb58d3c6e4
/* $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/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;
struct {
bool fPending;
void *pvVRAM;
int w;
int h;
{
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
/** 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: */