/** @file * * VBox frontends: Basic Frontend (BFE): * Declaration of Framebuffer class */ /* * 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; * you can redistribute it and/or modify it under the terms of the GNU * 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_FRAMEBUFFER #define __H_FRAMEBUFFER #ifdef VBOXBFE_WITHOUT_COM # include "COMDefs.h" #else # include #endif #include "VBoxBFE.h" class Framebuffer { public: virtual ~Framebuffer() {} virtual HRESULT getWidth(ULONG *width) = 0; virtual HRESULT getHeight(ULONG *height) = 0; virtual HRESULT Lock() = 0; virtual HRESULT Unlock() = 0; virtual HRESULT getAddress(uintptr_t *address) = 0; virtual HRESULT getColorDepth(ULONG *colorDepth) = 0; virtual HRESULT getLineSize(ULONG *lineSize) = 0; virtual HRESULT NotifyUpdate(ULONG x, ULONG y, ULONG w, ULONG h, BOOL *finished) = 0; virtual HRESULT RequestResize(ULONG w, ULONG h, BOOL *finished) = 0; virtual HRESULT SolidFill(ULONG x, ULONG y, ULONG width, ULONG height, ULONG color, BOOL *handled) = 0; virtual HRESULT CopyScreenBits(ULONG xDst, ULONG yDst, ULONG xSrc, ULONG ySrc, ULONG width, ULONG height, BOOL *handled) = 0; virtual void repaint() = 0; virtual void resize() = 0; virtual void update(int x, int y, int w, int h) = 0; virtual bool getFullscreen() = 0; virtual void setFullscreen(bool fFullscreen) = 0; virtual int getYOffset() = 0; virtual int getHostXres() = 0; virtual int getHostYres() = 0; virtual int getHostBitsPerPixel() = 0; #ifdef VBOX_SECURELABEL virtual int initSecureLabel(uint32_t height, char *font, uint32_t pointsize) = 0; virtual void setSecureLabelText(const char *text) = 0; virtual void paintSecureLabel(int x, int y, int w, int h, bool fForce) = 0; #endif private: }; extern Framebuffer *gFramebuffer; #endif // __H_FRAMEBUFFER