VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxFB/Framebuffer.h@ 74942

Last change on this file since 74942 was 71651, checked in by vboxsync, 6 years ago

DevVGA,VBoxC,++: Code cleanup in progress. bugref:9094

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/** @file
2 * VBoxFB - Declaration of VBoxDirectFB class.
3 */
4
5/*
6 * Copyright (C) 2006-2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef __H_FRAMEBUFFER
18#define __H_FRAMEBUFFER
19
20#include "VBoxFB.h"
21
22class VBoxDirectFB : public IFramebuffer
23{
24public:
25 VBoxDirectFB(IDirectFB *aDFB, IDirectFBSurface *aSurface);
26 virtual ~VBoxDirectFB();
27
28 NS_DECL_ISUPPORTS
29
30 NS_IMETHOD GetWidth(PRUint32 *width);
31 NS_IMETHOD GetHeight(PRUint32 *height);
32 NS_IMETHOD Lock();
33 NS_IMETHOD Unlock();
34 NS_IMETHOD GetAddress(PRUint8 **address);
35 NS_IMETHOD GetBitsPerPixel(PRUint32 *bitsPerPixel);
36 NS_IMETHOD GetBytesPerLine(PRUint32 *bytesPerLine);
37 NS_IMETHOD GetPixelFormat(PRUint32 *pixelFormat);
38 NS_IMETHOD GetUsesGuestVRAM(PRBool *usesGuestVRAM);
39 NS_IMETHOD GetHeightReduction(PRUint32 *heightReduction);
40 NS_IMETHOD GetOverlay(IFramebufferOverlay **aOverlay);
41 NS_IMETHOD GetWinId(PRUint64 *winId);
42 NS_IMETHOD NotifyUpdate(PRUint32 x, PRUint32 y, PRUint32 w, PRUint32 h);
43 NS_IMETHOD RequestResize(PRUint32 aScreenId, PRUint32 pixelFormat, PRUint8 *vram,
44 PRUint32 bitsPerPixel, PRUint32 bytesPerLine,
45 PRUint32 w, PRUint32 h,
46 PRBool *finished);
47 NS_IMETHOD VideoModeSupported(PRUint32 width, PRUint32 height, PRUint32 bpp, PRBool *supported);
48 NS_IMETHOD GetVisibleRegion(PRUint8 *aRectangles, PRUint32 aCount, PRUint32 *aCountCopied);
49 NS_IMETHOD SetVisibleRegion(PRUint8 *aRectangles, PRUint32 aCount);
50
51 NS_IMETHOD ProcessVHWACommand(PRUint8 *pCommand, LONG enmCmd, BOOL fGuestCmd);
52
53 NS_IMETHOD Notify3DEvent(PRUint32 type, PRUint8 *reserved);
54private:
55 int createSurface(uint32_t w, uint32_t h);
56
57 IDirectFB *dfb;
58 IDirectFBSurface *surface;
59 uint32_t screenWidth;
60 uint32_t screenHeight;
61 IDirectFBSurface *fbInternalSurface;
62 void *fbBufferAddress;
63 uint32_t fbWidth;
64 uint32_t fbHeight;
65 uint32_t fbPitch;
66 int fbSurfaceLocked;
67};
68
69
70#endif // !__H_FRAMEBUFFER
71
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use