VirtualBox

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

Last change on this file since 96562 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/** @file
2 * VBoxFB - Declaration of VBoxDirectFB class.
3 */
4
5/*
6 * Copyright (C) 2006-2022 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.virtualbox.org.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * SPDX-License-Identifier: GPL-3.0-only
25 */
26
27#ifndef VBOX_INCLUDED_SRC_VBoxFB_Framebuffer_h
28#define VBOX_INCLUDED_SRC_VBoxFB_Framebuffer_h
29#ifndef RT_WITHOUT_PRAGMA_ONCE
30# pragma once
31#endif
32
33#include "VBoxFB.h"
34
35class VBoxDirectFB : public IFramebuffer
36{
37public:
38 VBoxDirectFB(IDirectFB *aDFB, IDirectFBSurface *aSurface);
39 virtual ~VBoxDirectFB();
40
41 NS_DECL_ISUPPORTS
42
43 NS_IMETHOD GetWidth(PRUint32 *width);
44 NS_IMETHOD GetHeight(PRUint32 *height);
45 NS_IMETHOD Lock();
46 NS_IMETHOD Unlock();
47 NS_IMETHOD GetAddress(PRUint8 **address);
48 NS_IMETHOD GetBitsPerPixel(PRUint32 *bitsPerPixel);
49 NS_IMETHOD GetBytesPerLine(PRUint32 *bytesPerLine);
50 NS_IMETHOD GetPixelFormat(PRUint32 *pixelFormat);
51 NS_IMETHOD GetUsesGuestVRAM(PRBool *usesGuestVRAM);
52 NS_IMETHOD GetHeightReduction(PRUint32 *heightReduction);
53 NS_IMETHOD GetOverlay(IFramebufferOverlay **aOverlay);
54 NS_IMETHOD GetWinId(PRUint64 *winId);
55 NS_IMETHOD NotifyUpdate(PRUint32 x, PRUint32 y, PRUint32 w, PRUint32 h);
56 NS_IMETHOD RequestResize(PRUint32 aScreenId, PRUint32 pixelFormat, PRUint8 *vram,
57 PRUint32 bitsPerPixel, PRUint32 bytesPerLine,
58 PRUint32 w, PRUint32 h,
59 PRBool *finished);
60 NS_IMETHOD VideoModeSupported(PRUint32 width, PRUint32 height, PRUint32 bpp, PRBool *supported);
61 NS_IMETHOD GetVisibleRegion(PRUint8 *aRectangles, PRUint32 aCount, PRUint32 *aCountCopied);
62 NS_IMETHOD SetVisibleRegion(PRUint8 *aRectangles, PRUint32 aCount);
63
64 NS_IMETHOD ProcessVHWACommand(PRUint8 *pCommand, LONG enmCmd, BOOL fGuestCmd);
65
66 NS_IMETHOD Notify3DEvent(PRUint32 type, PRUint8 *reserved);
67private:
68 int createSurface(uint32_t w, uint32_t h);
69
70 IDirectFB *dfb;
71 IDirectFBSurface *surface;
72 uint32_t screenWidth;
73 uint32_t screenHeight;
74 IDirectFBSurface *fbInternalSurface;
75 void *fbBufferAddress;
76 uint32_t fbWidth;
77 uint32_t fbHeight;
78 uint32_t fbPitch;
79 int fbSurfaceLocked;
80};
81
82
83#endif /* !VBOX_INCLUDED_SRC_VBoxFB_Framebuffer_h */
84
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette