1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt GUI ("VirtualBox"):
|
---|
4 | * UIFrameBufferDirectDraw class declarations
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2010 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 ___UIFrameBufferDirectDraw_h___
|
---|
20 | #define ___UIFrameBufferDirectDraw_h___
|
---|
21 |
|
---|
22 | #ifdef VBOX_GUI_USE_DDRAW
|
---|
23 |
|
---|
24 | /* Local includes */
|
---|
25 | #include "UIFrameBuffer.h"
|
---|
26 |
|
---|
27 | /* VBox/cdefs.h defines these: */
|
---|
28 | #undef LOWORD
|
---|
29 | #undef HIWORD
|
---|
30 | #undef LOBYTE
|
---|
31 | #undef HIBYTE
|
---|
32 | #include <ddraw.h>
|
---|
33 |
|
---|
34 | /* TODO_NEW_CORE */
|
---|
35 | #if 0
|
---|
36 | class UIFrameBufferDDRAW : public UIFrameBuffer
|
---|
37 | {
|
---|
38 | public:
|
---|
39 |
|
---|
40 | UIFrameBufferDDRAW(UIMachineView *pMachineView);
|
---|
41 | virtual ~UIFrameBufferDDRAW();
|
---|
42 |
|
---|
43 | STDMETHOD(NotifyUpdate) (ULONG uX, ULONG uY, ULONG uW, ULONG uH);
|
---|
44 |
|
---|
45 | uchar* address() { return (uchar*) m_surfaceDesc.lpSurface; }
|
---|
46 | ulong bitsPerPixel() { return m_surfaceDesc.ddpfPixelFormat.dwRGBBitCount; }
|
---|
47 | ulong bytesPerLine() { return (ulong) m_surfaceDesc.lPitch; }
|
---|
48 |
|
---|
49 | ulong pixelFormat() { return m_uPixelFormat; };
|
---|
50 |
|
---|
51 | bool usesGuestVRAM() { return m_bUsesGuestVRAM; }
|
---|
52 |
|
---|
53 | void paintEvent(QPaintEvent *pEvent);
|
---|
54 | void resizeEvent(UIResizeEvent *pEvent);
|
---|
55 | void moveEvent(QMoveEvent *pEvent);
|
---|
56 |
|
---|
57 | private:
|
---|
58 |
|
---|
59 | void releaseObjects();
|
---|
60 |
|
---|
61 | bool createSurface(ULONG uPixelFormat, uchar *pvVRAM,
|
---|
62 | ULONG uBitsPerPixel, ULONG uBytesPerLine,
|
---|
63 | ULONG uWidth, ULONG uHeight);
|
---|
64 | void deleteSurface();
|
---|
65 | void drawRect(ULONG uX, ULONG uY, ULONG uW, ULONG uH);
|
---|
66 | void getWindowPosition(void);
|
---|
67 |
|
---|
68 | LPDIRECTDRAW7 m_DDRAW;
|
---|
69 | LPDIRECTDRAWCLIPPER m_clipper;
|
---|
70 | LPDIRECTDRAWSURFACE7 m_surface;
|
---|
71 | DDSURFACEDESC2 m_surfaceDesc;
|
---|
72 | LPDIRECTDRAWSURFACE7 m_primarySurface;
|
---|
73 |
|
---|
74 | ulong m_uPixelFormat;
|
---|
75 |
|
---|
76 | bool m_bUsesGuestVRAM;
|
---|
77 |
|
---|
78 | int m_iWndX;
|
---|
79 | int m_iWndY;
|
---|
80 |
|
---|
81 | bool m_bSynchronousUpdates;
|
---|
82 | };
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | #endif /* VBOX_GUI_USE_DDRAW */
|
---|
86 |
|
---|
87 | #endif /* !___UIFrameBufferDirectDraw_h___ */
|
---|
88 |
|
---|