VirtualBox

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

Last change on this file since 54933 was 54649, checked in by vboxsync, 10 years ago

build fix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 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
38class ISession;
39
40/** Pointer to the debugger GUI instance structure. */
41typedef struct DBGGUI *PDBGGUI;
42
43/** Virtual method table for the debugger GUI. */
44typedef struct DBGGUIVT
45{
46 /** The version. (DBGGUIVT_VERSION) */
47 uint32_t u32Version;
48 /** @copydoc DBGGuiDestroy */
49 DECLCALLBACKMEMBER(int, pfnDestroy)(PDBGGUI pGui);
50 /** @copydoc DBGGuiAdjustRelativePos */
51 DECLCALLBACKMEMBER(void, pfnAdjustRelativePos)(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy);
52 /** @copydoc DBGGuiShowStatistics */
53 DECLCALLBACKMEMBER(int, pfnShowStatistics)(PDBGGUI pGui);
54 /** @copydoc DBGGuiShowCommandLine */
55 DECLCALLBACKMEMBER(int, pfnShowCommandLine)(PDBGGUI pGui);
56 /** @copydoc DBGGuiSetParent */
57 DECLCALLBACKMEMBER(void, pfnSetParent)(PDBGGUI pGui, void *pvParent);
58 /** @copydoc DBGGuiSetMenu */
59 DECLCALLBACKMEMBER(void, pfnSetMenu)(PDBGGUI pGui, void *pvMenu);
60 /** The end version. (DBGGUIVT_VERSION) */
61 uint32_t u32EndVersion;
62} DBGGUIVT;
63/** Pointer to the virtual method table for the debugger GUI. */
64typedef DBGGUIVT const *PCDBGGUIVT;
65/** The u32Version value.
66 * The first byte is the minor version, the 2nd byte is major version number.
67 * The high 16-bit word is a magic. */
68#define DBGGUIVT_VERSION UINT32_C(0xbead0100)
69/** Macro for determining whether two versions are compatible or not.
70 * @returns boolean result.
71 * @param uVer1 The first version number.
72 * @param uVer2 The second version number.
73 */
74#define DBGGUIVT_ARE_VERSIONS_COMPATIBLE(uVer1, uVer2) \
75 ( ((uVer1) & UINT32_C(0xffffff00)) == ((uVer2) & UINT32_C(0xffffff00)) )
76
77
78/**
79 * Creates the debugger GUI.
80 *
81 * @returns VBox status code.
82 * @param pSession The VirtualBox session.
83 * @param ppGui Where to store the pointer to the debugger instance.
84 * @param ppGuiVT Where to store the virtual method table pointer.
85 * Optional.
86 */
87DBGDECL(int) DBGGuiCreate(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
88/** @copydoc DBGGuiCreate. */
89typedef DECLCALLBACK(int) FNDBGGUICREATE(ISession *pSession, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
90/** Pointer to DBGGuiCreate. */
91typedef FNDBGGUICREATE *PFNDBGGUICREATE;
92
93/**
94 * Creates the debugger GUI given a VM handle.
95 *
96 * @returns VBox status code.
97 * @param pUVM The VM handle.
98 * @param ppGui Where to store the pointer to the debugger instance.
99 * @param ppGuiVT Where to store the virtual method table pointer.
100 * Optional.
101 */
102DBGDECL(int) DBGGuiCreateForVM(PUVM pUVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
103/** @copydoc DBGGuiCreateForVM. */
104typedef DECLCALLBACK(int) FNDBGGUICREATEFORVM(PUVM pUVM, PDBGGUI *ppGui, PCDBGGUIVT *ppGuiVT);
105/** Pointer to DBGGuiCreateForVM. */
106typedef FNDBGGUICREATEFORVM *PFNDBGGUICREATEFORVM;
107
108/**
109 * Destroys the debugger GUI.
110 *
111 * @returns VBox status code.
112 * @param pGui The instance returned by DBGGuiCreate().
113 */
114DBGDECL(int) DBGGuiDestroy(PDBGGUI pGui);
115
116/**
117 * Notifies the debugger GUI that the console window (or whatever) has changed
118 * size or position.
119 *
120 * @param pGui The instance returned by DBGGuiCreate().
121 * @param x The x-coordinate of the window the debugger is relative to.
122 * @param y The y-coordinate of the window the debugger is relative to.
123 * @param cx The width of the window the debugger is relative to.
124 * @param cy The height of the window the debugger is relative to.
125 */
126DBGDECL(void) DBGGuiAdjustRelativePos(PDBGGUI pGui, int x, int y, unsigned cx, unsigned cy);
127
128/**
129 * Shows the default statistics window.
130 *
131 * @returns VBox status code.
132 * @param pGui The instance returned by DBGGuiCreate().
133 */
134DBGDECL(int) DBGGuiShowStatistics(PDBGGUI pGui);
135
136/**
137 * Shows the default command line window.
138 *
139 * @returns VBox status code.
140 * @param pGui The instance returned by DBGGuiCreate().
141 */
142DBGDECL(int) DBGGuiShowCommandLine(PDBGGUI pGui);
143
144/**
145 * Sets the parent windows.
146 *
147 * @param pGui The instance returned by DBGGuiCreate().
148 * @param pvParent Pointer to a QWidget object.
149 *
150 * @remarks This will no affect any existing windows, so call it right after
151 * creating the thing.
152 */
153DBGDECL(void) DBGGuiSetParent(PDBGGUI pGui, void *pvParent);
154
155/**
156 * Sets the debug menu object.
157 *
158 * @param pGui The instance returned by DBGGuiCreate().
159 * @param pvMenu Pointer to a QMenu object.
160 *
161 * @remarks Call right after creation or risk losing menu item.
162 */
163DBGDECL(void) DBGGuiSetMenu(PDBGGUI pGui, void *pvMenu);
164
165/** @} */
166
167RT_C_DECLS_END
168
169#endif
170
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