UIFrameBufferQGL.h revision c1888ea78e20e994aa8ec5780f6af6f5cec53438
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync/** @file
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync *
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * VBox frontends: Qt GUI ("VirtualBox"):
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * UIFrameBuffer class and subclasses declarations
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync */
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync/*
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * Copyright (C) 2010 Sun Microsystems, Inc.
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync *
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * available from http://www.virtualbox.org. This file is free software;
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * you can redistribute it and/or modify it under the terms of the GNU
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * General Public License (GPL) as published by the Free Software
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync *
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync * additional information or have any questions.
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync */
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync#ifndef ___UIFrameBufferQGL_h___
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync#define ___UIFrameBufferQGL_h___
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync/* Global includes */
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync#include "UIFrameBuffer.h"
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync#if defined (VBOX_GUI_USE_QGL)
c29bcf19a2399d4aec000b6aa566583203d78978vboxsync#include "VBoxFBOverlay.h"
class UIFrameBufferQGL : public UIFrameBuffer
{
public:
UIFrameBufferQGL(UIMachineView *pMachineView);
STDMETHOD(NotifyUpdate) (ULONG uX, ULONG uY, ULONG uW, ULONG uH);
#ifdef VBOXQGL_PROF_BASE
STDMETHOD(RequestResize) (ULONG uScreenId, ULONG uPixelFormat,
BYTE *pVRAM, ULONG uBitsPerPixel, ULONG uBytesPerLine,
ULONG uWidth, ULONG uHeight, BOOL *pbFinished);
#endif
#ifdef VBOX_WITH_VIDEOHWACCEL
STDMETHOD(ProcessVHWACommand)(BYTE *pbCommand);
#endif
ulong pixelFormat() { return vboxWidget()->vboxPixelFormat(); }
bool usesGuestVRAM() { return vboxWidget()->vboxUsesGuestVRAM(); }
uchar *address() { return vboxWidget()->vboxAddress(); }
ulong bitsPerPixel() { return vboxWidget()->vboxBitsPerPixel(); }
ulong bytesPerLine() { return vboxWidget()->vboxBytesPerLine(); }
void paintEvent (QPaintEvent *pEvent);
void resizeEvent (UIResizeEvent *pEvent);
void doProcessVHWACommand(QEvent *pEvent);
private:
class VBoxGLWidget* vboxWidget();
class VBoxVHWACommandElementProcessor m_cmdPipe;
};
#endif
#endif // !___UIFrameBufferQGL_h___