VirtualBox

source: vbox/trunk/include/VBox/dbggui.h@ 55966

Last change on this file since 55966 was 55008, checked in by vboxsync, 10 years ago

include/VBox/dbggui.h: get rid of compiler warning on Windows host

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
Line 
1/** @file
2 * DBGGUI - The VirtualBox Debugger GUI. (VBoxDbg)
3 */
4
5/*
6 * Copyright (C) 2006-2013 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * The contents of this file may alternatively be used under the terms
17 * of the Common Development and Distribution License Version 1.0
18 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
19 * VirtualBox OSE distribution, in which case the provisions of the
20 * CDDL are applicable instead of those of the GPL.
21 *
22 * You may elect to license modified versions of this file under the
23 * terms and conditions of either the GPL or the CDDL or both.
24 */
25
26#ifndef ___VBox_dbggui_h
27#define ___VBox_dbggui_h
28
29#include <VBox/types.h>
30
31
32RT_C_DECLS_BEGIN
33
34/** @defgroup grp_dbggui VirtualBox Debugger GUI
35 * @{
36 */
37
38#ifdef RT_OS_WINDOWS
39struct ISession;
40#else
41class ISession;
42#endif
43
44/** Pointer to the debugger GUI instance structure. */
45typedef struct DBGGUI *PDBGGUI;
46
47/** Virtual method table for the debugger GUI. */
48typedef struct DBGGUIVT
49{
50 /** The version. (DBGGUIVT_VERSION) */
51 uint32_t u32Version;
52 /** @copydoc DBGGuiDestroy */
53 DECLCALLBACKMEMBER(int, pfnDestroy)(PDBGGUI pGui);
54 /** @copydoc DBGGuiAdjustRelativePos */
55 DECLCALLBACKMEMBER(void, pfnAdjustRelativePos)(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy);
56 /** @copydoc DBGGuiShowStatistics */
57 DECLCALLBACKMEMBER(int, pfnShowStatistics)(PDBGGUI pGui);
58 /** @copydoc DBGGuiShowCommandLine */
59 DECLCALLBACKMEMBER(int, pfnShowCommandLine)(PDBGGUI pGui);
60 /** @copydoc DBGGuiSetParent */
61 DECLCALLBACKMEMBER(void, pfnSetParent)(PDBGGUI pGui, void *pvParent);
62 /** @copydoc DBGGuiSetMenu */
63 DECLCALLBACKMEMBER(void, pfnSetMenu)(PDBGGUI pGui, void *pvMenu);
64 /** The end version. (DBGGUIVT_VERSION) */
65 uint32_t u32EndVersion;
66} DBGGUIVT;
67/** Pointer to the virtual method table for the debugger GUI. */
68typedef DBGGUIVT const *PCDBGGUIVT;
69/** The u32Version value.
70 * The first byte is the minor version, the 2nd byte is major version number.
71 * The high 16-bit word is a magic. */
72#define DBGGUIVT_VERSION UINT32_C(0xbead0100)
73/** Macro for determining whether two versions are compatible or not.
74 * @returns boolean result.
75 * @param uVer1 The first version number.
76 * @param uVer2 The second version number.
77 */
78#define DBGGUIVT_ARE_VERSIONS_COMPATIBLE(uVer1, uVer2) \
79 ( ((uVer1) & UINT32_C(0xffffff00)) == ((uVer2) & UINT32_C(0xffffff00)) )
80
81
82/**
83 * Creates the debugger GUI.
84 *
85 * @returns VBox status code.
86 * @param pSession The VirtualBox session.
87 * @param ppGui Where to store the pointer to the debugger instance.
88 * @param ppGuiVT Where to store the virtual method table pointer.
89 * Optional.
90 */
91DBGDECL(int) DBGGuiCreate(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
92/** @copydoc DBGGuiCreate. */
93typedef DECLCALLBACK(int) FNDBGGUICREATE(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
94/** Pointer to DBGGuiCreate. */
95typedef FNDBGGUICREATE *PFNDBGGUICREATE;
96
97/**
98 * Creates the debugger GUI given a VM handle.
99 *
100 * @returns VBox status code.
101 * @param pUVM The VM handle.
102 * @param ppGui Where to store the pointer to the debugger instance.
103 * @param ppGuiVT Where to store the virtual method table pointer.
104 * Optional.
105 */
106DBGDECL(int) DBGGuiCreateForVM(PUVM pUVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
107/** @copydoc DBGGuiCreateForVM. */
108typedef DECLCALLBACK(int) FNDBGGUICREATEFORVM(PUVM pUVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
109/** Pointer to DBGGuiCreateForVM. */
110typedef FNDBGGUICREATEFORVM *PFNDBGGUICREATEFORVM;
111
112/**
113 * Destroys the debugger GUI.
114 *
115 * @returns VBox status code.
116 * @param pGui The instance returned by DBGGuiCreate().
117 */
118DBGDECL(int) DBGGuiDestroy(PDBGGUI pGui);
119
120/**
121 * Notifies the debugger GUI that the console window (or whatever) has changed
122 * size or position.
123 *
124 * @param pGui The instance returned by DBGGuiCreate().
125 * @param x The x-coordinate of the window the debugger is relative to.
126 * @param y The y-coordinate of the window the debugger is relative to.
127 * @param cx The width of the window the debugger is relative to.
128 * @param cy The height of the window the debugger is relative to.
129 */
130DBGDECL(void) DBGGuiAdjustRelativePos(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy);
131
132/**
133 * Shows the default statistics window.
134 *
135 * @returns VBox status code.
136 * @param pGui The instance returned by DBGGuiCreate().
137 */
138DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui);
139
140/**
141 * Shows the default command line window.
142 *
143 * @returns VBox status code.
144 * @param pGui The instance returned by DBGGuiCreate().
145 */
146DBGDECL(int) DBGGuiShowCommandLine(PDBGGUI pGui);
147
148/**
149 * Sets the parent windows.
150 *
151 * @param pGui The instance returned by DBGGuiCreate().
152 * @param pvParent Pointer to a QWidget object.
153 *
154 * @remarks This will no affect any existing windows, so call it right after
155 * creating the thing.
156 */
157DBGDECL(void) DBGGuiSetParent(PDBGGUI pGui, void *pvParent);
158
159/**
160 * Sets the debug menu object.
161 *
162 * @param pGui The instance returned by DBGGuiCreate().
163 * @param pvMenu Pointer to a QMenu object.
164 *
165 * @remarks Call right after creation or risk losing menu item.
166 */
167DBGDECL(void) DBGGuiSetMenu(PDBGGUI pGui, void *pvMenu);
168
169/** @} */
170
171RT_C_DECLS_END
172
173#endif
174
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