1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Basic Frontend (BFE):
|
---|
4 | * Declaration of Framebuffer class
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2007 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef __H_FRAMEBUFFER
|
---|
20 | #define __H_FRAMEBUFFER
|
---|
21 |
|
---|
22 | #ifdef VBOXBFE_WITHOUT_COM
|
---|
23 | # include "COMDefs.h"
|
---|
24 | #else
|
---|
25 | # include <VBox/com/defs.h>
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #include "VBoxBFE.h"
|
---|
29 |
|
---|
30 | class Framebuffer
|
---|
31 | {
|
---|
32 | public:
|
---|
33 | virtual ~Framebuffer() {}
|
---|
34 |
|
---|
35 | virtual HRESULT getWidth(ULONG *width) = 0;
|
---|
36 | virtual HRESULT getHeight(ULONG *height) = 0;
|
---|
37 | virtual HRESULT Lock() = 0;
|
---|
38 | virtual HRESULT Unlock() = 0;
|
---|
39 | virtual HRESULT getAddress(uintptr_t *address) = 0;
|
---|
40 | virtual HRESULT getBitsPerPixel(ULONG *bitsPerPixel) = 0;
|
---|
41 | virtual HRESULT getLineSize(ULONG *lineSize) = 0;
|
---|
42 | virtual HRESULT NotifyUpdate(ULONG x, ULONG y, ULONG w, ULONG h) = 0;
|
---|
43 | virtual HRESULT RequestResize(ULONG w, ULONG h, BOOL *finished) = 0;
|
---|
44 |
|
---|
45 | virtual HRESULT GetVisibleRegion(BYTE *aRectangles, ULONG aCount, ULONG *aCountCopied) = 0;
|
---|
46 | virtual HRESULT SetVisibleRegion(BYTE *aRectangles, ULONG aCount) = 0;
|
---|
47 |
|
---|
48 | virtual HRESULT ProcessVHWACommand(BYTE *pCommand) = 0;
|
---|
49 |
|
---|
50 | virtual void repaint() = 0;
|
---|
51 | virtual void resize() = 0;
|
---|
52 |
|
---|
53 | virtual void update(int x, int y, int w, int h) = 0;
|
---|
54 | virtual bool getFullscreen() = 0;
|
---|
55 | virtual void setFullscreen(bool fFullscreen) = 0;
|
---|
56 | virtual int getYOffset() = 0;
|
---|
57 | virtual int getHostXres() = 0;
|
---|
58 | virtual int getHostYres() = 0;
|
---|
59 | virtual int getHostBitsPerPixel() = 0;
|
---|
60 |
|
---|
61 | #ifdef VBOX_SECURELABEL
|
---|
62 | virtual int initSecureLabel(uint32_t height, char *font, uint32_t pointsize) = 0;
|
---|
63 | virtual void setSecureLabelText(const char *text) = 0;
|
---|
64 | virtual void paintSecureLabel(int x, int y, int w, int h, bool fForce) = 0;
|
---|
65 | #endif
|
---|
66 |
|
---|
67 |
|
---|
68 | private:
|
---|
69 | };
|
---|
70 |
|
---|
71 | extern Framebuffer *gFramebuffer;
|
---|
72 |
|
---|
73 | #endif // __H_FRAMEBUFFER
|
---|