VirtualBox

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

Last change on this file since 41852 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

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