1 | /* $Id: FramebufferImpl.h 30714 2010-07-07 16:20:03Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * Frame buffer COM class implementation
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2009 Oracle Corporation
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | */
|
---|
19 |
|
---|
20 | #ifndef ____H_H_FRAMEBUFFERIMPL
|
---|
21 | #define ____H_H_FRAMEBUFFERIMPL
|
---|
22 |
|
---|
23 | #include "VirtualBoxBase.h"
|
---|
24 | #include "VirtualBoxImpl.h"
|
---|
25 |
|
---|
26 | class ATL_NO_VTABLE Framebuffer :
|
---|
27 | public VirtualBoxBase,
|
---|
28 | public VirtualBoxSupportErrorInfoImpl<Framebuffer, IFramebuffer>,
|
---|
29 | public VirtualBoxSupportTranslation<Framebuffer>,
|
---|
30 | VBOX_SCRIPTABLE_IMPL(IFramebuffer)
|
---|
31 | {
|
---|
32 | public:
|
---|
33 |
|
---|
34 | VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(Framebuffer, IFramebuffer)
|
---|
35 |
|
---|
36 | DECLARE_NOT_AGGREGATABLE (Framebuffer)
|
---|
37 |
|
---|
38 | DECLARE_PROTECT_FINAL_CONSTRUCT()
|
---|
39 |
|
---|
40 | BEGIN_COM_MAP (Framebuffer)
|
---|
41 | COM_INTERFACE_ENTRY (ISupportErrorInfo)
|
---|
42 | COM_INTERFACE_ENTRY (IFramebuffer)
|
---|
43 | COM_INTERFACE_ENTRY (IDispatch)
|
---|
44 | END_COM_MAP()
|
---|
45 |
|
---|
46 | DECLARE_EMPTY_CTOR_DTOR (Framebuffer)
|
---|
47 |
|
---|
48 | /* IFramebuffer properties */
|
---|
49 | STDMETHOD(COMGETTER(Address)) (BYTE **aAddress) = 0;
|
---|
50 | STDMETHOD(COMGETTER(Width)) (ULONG *aWidth) = 0;
|
---|
51 | STDMETHOD(COMGETTER(Height)) (ULONG *aHeight) = 0;
|
---|
52 | STDMETHOD(COMGETTER(BitsPerPixel)) (ULONG *aBitsPerPixel) = 0;
|
---|
53 | STDMETHOD(COMGETTER(BytesPerLine)) (ULONG *aBytesPerLine) = 0;
|
---|
54 | STDMETHOD(COMGETTER(PixelFormat)) (ULONG *aPixelFormat) = 0;
|
---|
55 | STDMETHOD(COMGETTER(UsesGuestVRAM)) (BOOL *aUsesGuestVRAM) = 0;
|
---|
56 | STDMETHOD(COMGETTER(HeightReduction)) (ULONG *aHeightReduction) = 0;
|
---|
57 | STDMETHOD(COMGETTER(Overlay)) (IFramebufferOverlay **aOverlay) = 0;
|
---|
58 | STDMETHOD(COMGETTER(WinId)) (ULONG64 *winId) = 0;
|
---|
59 |
|
---|
60 | /* IFramebuffer methods */
|
---|
61 | STDMETHOD(Lock)() = 0;
|
---|
62 | STDMETHOD(Unlock)() = 0;
|
---|
63 |
|
---|
64 | STDMETHOD(RequestResize) (ULONG aScreenId, ULONG aPixelFormat,
|
---|
65 | BYTE *aVRAM, ULONG aBitsPerPixel, ULONG aBytesPerLine,
|
---|
66 | ULONG aWidth, ULONG aHeight,
|
---|
67 | BOOL *aFinished) = 0;
|
---|
68 |
|
---|
69 | STDMETHOD(VideoModeSupported) (ULONG aWidth, ULONG aHeight, ULONG aBPP,
|
---|
70 | BOOL *aSupported) = 0;
|
---|
71 |
|
---|
72 | STDMETHOD(GetVisibleRegion)(BYTE *aRectangles, ULONG aCount,
|
---|
73 | ULONG *aCountCopied) = 0;
|
---|
74 | STDMETHOD(SetVisibleRegion)(BYTE *aRectangles, ULONG aCount) = 0;
|
---|
75 |
|
---|
76 | STDMETHOD(ProcessVHWACommand)(BYTE *pCommand) = 0;
|
---|
77 |
|
---|
78 | // for VirtualBoxSupportErrorInfoImpl
|
---|
79 | static const wchar_t *getComponentName() { return L"Framebuffer"; }
|
---|
80 |
|
---|
81 | };
|
---|
82 |
|
---|
83 | #endif // ____H_H_FRAMEBUFFERIMPL
|
---|
84 | /* vi: set tabstop=4 shiftwidth=4 expandtab: */
|
---|