VirtualBox

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

Last change on this file since 106061 was 106061, checked in by vboxsync, 2 months ago

Copyright year updates by scm.

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