1 | /** @file
|
---|
2 | *
|
---|
3 | * VBoxGuest -- VirtualBox Win 2000/XP guest video driver
|
---|
4 | *
|
---|
5 | * Copyright (C) 2006-2007 Oracle Corporation
|
---|
6 | *
|
---|
7 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
8 | * available from http://www.virtualbox.org. This file is free software;
|
---|
9 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
10 | * General Public License (GPL) as published by the Free Software
|
---|
11 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
12 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
13 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
14 | */
|
---|
15 |
|
---|
16 | #ifndef __HELPER_h__
|
---|
17 | #define __HELPER_h__
|
---|
18 |
|
---|
19 | // Windows version identifier
|
---|
20 | typedef enum
|
---|
21 | {
|
---|
22 | UNKNOWN_WINVERSION = 0,
|
---|
23 | WINNT4 = 1,
|
---|
24 | WIN2K = 2,
|
---|
25 | WINXP = 3,
|
---|
26 | WINVISTA = 4,
|
---|
27 | WIN7 = 5
|
---|
28 | } winVersion_t;
|
---|
29 |
|
---|
30 |
|
---|
31 | extern "C"
|
---|
32 | {
|
---|
33 | bool vboxQueryDisplayRequest(uint32_t *xres, uint32_t *yres, uint32_t *bpp, uint32_t *pDisplayId);
|
---|
34 | bool vboxLikesVideoMode(uint32_t display, uint32_t width, uint32_t height, uint32_t bpp);
|
---|
35 | uint32_t vboxGetHeightReduction();
|
---|
36 | bool vboxQueryPointerPos(uint16_t *pointerXPos, uint16_t *pointerYPos);
|
---|
37 | bool vboxQueryHostWantsAbsolute();
|
---|
38 | winVersion_t vboxQueryWinVersion();
|
---|
39 |
|
---|
40 | // #include "vboxioctl.h"
|
---|
41 |
|
---|
42 | // int vboxVbvaEnable (ULONG ulEnable, VBVAENABLERESULT *pVbvaResult);
|
---|
43 | }
|
---|
44 |
|
---|
45 |
|
---|
46 | /* debug printf */
|
---|
47 | /** @todo replace this with normal IPRT guest logging */
|
---|
48 | #ifdef RT_OS_WINDOWS
|
---|
49 | # define OSDBGPRINT(a) DbgPrint a
|
---|
50 | #else
|
---|
51 | # define OSDBGPRINT(a) do { } while(0)
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | #ifdef LOG_TO_BACKDOOR
|
---|
55 | # include <VBox/log.h>
|
---|
56 | # define dDoPrintf(a) RTLogBackdoorPrintf a
|
---|
57 | #else
|
---|
58 | # define dDoPrintf(a) OSDBGPRINT(a)
|
---|
59 | #endif
|
---|
60 |
|
---|
61 | /* release log */
|
---|
62 | # define drprintf dDoPrintf
|
---|
63 | /* flow log */
|
---|
64 | # define dfprintf(a) do {} while (0)
|
---|
65 | /* basic debug log */
|
---|
66 | #if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED)
|
---|
67 | # define dprintf dDoPrintf
|
---|
68 | #else
|
---|
69 | # define dprintf(a) do {} while (0)
|
---|
70 | #endif
|
---|
71 |
|
---|
72 |
|
---|
73 | /* dprintf2 - extended logging. */
|
---|
74 | #if 0
|
---|
75 | # define dprintf2 dprintf
|
---|
76 | #else
|
---|
77 | # define dprintf2(a) do { } while (0)
|
---|
78 | #endif
|
---|
79 |
|
---|
80 | #ifdef DEBUG_misha
|
---|
81 | /* specifies whether the vboxVDbgBreakF should break in the debugger
|
---|
82 | * windbg seems to have some issues when there is a lot ( >~50) of sw breakpoints defined
|
---|
83 | * to simplify things we just insert breaks for the case of intensive debugging WDDM driver*/
|
---|
84 | extern bool g_bVBoxVDbgBreakF;
|
---|
85 | extern bool g_bVBoxVDbgBreakFv;
|
---|
86 | #define vboxVDbgBreakF() do { if (g_bVBoxVDbgBreakF) AssertBreakpoint(); } while (0)
|
---|
87 | #define vboxVDbgBreakFv() do { if (g_bVBoxVDbgBreakFv) AssertBreakpoint(); } while (0)
|
---|
88 | #else
|
---|
89 | #define vboxVDbgBreakF() do { } while (0)
|
---|
90 | #define vboxVDbgBreakFv() do { } while (0)
|
---|
91 | #endif
|
---|
92 |
|
---|
93 | #endif // __HELPER_h__
|
---|