3
* VBox frontends: Qt GUI ("VirtualBox"):
4
* Header with common definitions and global functions
8
* Copyright (C) 2006-2011 Oracle Corporation
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.
19
#ifndef __VBoxDefs_h__
20
#define __VBoxDefs_h__
27
#define LOG_GROUP LOG_GROUP_GUI
29
#include <iprt/assert.h>
30
#include <iprt/alloc.h>
34
#define AssertWrapperOk(w) \
35
AssertMsg (w.isOk(), (#w " is not okay (RC=0x%08X)", w.lastRC()))
36
#define AssertWrapperOkMsg(w, m) \
37
AssertMsg (w.isOk(), (#w ": " m " (RC=0x%08X)", w.lastRC()))
39
#else /* #ifdef DEBUG */
41
#define AssertWrapperOk(w) do {} while (0)
42
#define AssertWrapperOkMsg(w, m) do {} while (0)
44
#endif /* #ifdef DEBUG */
47
#define SIZEOF_ARRAY(a) (sizeof(a) / sizeof(a[0]))
51
* Common global VBox namespace.
52
* Later it will replace VBoxDefs struct used as global VBox namespace.
54
namespace VBoxGlobalDefs
56
extern const char *UI_ExtPackName;
59
/** Common namespace for all enums */
72
/** VM display rendering mode. */
75
InvalidRenderMode, TimerMode, QImageMode, SDLMode, DDRAWMode, Quartz2DMode
76
#ifdef VBOX_GUI_USE_QGLFB
81
/** Additional Qt event types. */
84
ResizeEventType = QEvent::User + 101
87
, ModifierKeyChangeEventType
89
#if defined (Q_WS_WIN)
90
, ShellExecuteEventType
92
, ActivateActionEventType
93
#if defined (Q_WS_MAC)
97
#ifdef VBOX_GUI_USE_QGL
98
, VHWACommandProcessType
102
/** Size formatting types. */
106
FormatSize_RoundDown,
110
static const char* GUI_LastWindowPosition;
111
static const char* GUI_LastNormalWindowPosition;
112
static const char* GUI_LastScaleWindowPosition;
113
static const char* GUI_LastWindowState_Max;
114
static const char* GUI_SplitterSizes;
115
static const char* GUI_Toolbar;
116
static const char* GUI_Statusbar;
117
static const char* GUI_LastGuestSizeHint;
118
static const char* GUI_Fullscreen;
119
static const char* GUI_Seamless;
120
static const char* GUI_Scale;
121
static const char* GUI_VirtualScreenToHostScreen;
122
static const char* GUI_AutoresizeGuest;
123
static const char* GUI_FirstRun;
124
static const char* GUI_SaveMountedAtRuntime;
125
static const char* GUI_ShowMiniToolBar;
126
static const char* GUI_MiniToolBarAlignment;
127
static const char* GUI_MiniToolBarAutoHide;
128
static const char* GUI_LastCloseAction;
129
static const char* GUI_RestrictedCloseActions;
130
static const char* GUI_CloseActionHook;
131
static const char* GUI_SuppressMessages;
132
static const char* GUI_PermanentSharedFoldersAtRuntime;
133
static const char* GUI_LanguageId;
134
static const char* GUI_PreviewUpdate;
135
static const char* GUI_DetailsPageBoxes;
136
static const char* GUI_SelectorVMPositions;
137
static const char* GUI_Input_MachineShortcuts;
138
static const char* GUI_Input_SelectorShortcuts;
140
static const char* GUI_LicenseKey;
142
static const char* GUI_RegistrationDlgWinID;
143
static const char* GUI_RegistrationData;
144
static const char* GUI_UpdateDate;
145
static const char* GUI_UpdateCheckCount;
146
static const char* GUI_LastVMSelected;
147
static const char* GUI_InfoDlgState;
148
static const char* GUI_RenderMode;
149
#ifdef VBOX_GUI_WITH_SYSTRAY
150
static const char* GUI_TrayIconWinID;
151
static const char* GUI_TrayIconEnabled;
152
static const char* GUI_MainWindowCount;
155
static const char* GUI_RealtimeDockIconUpdateEnabled;
156
static const char* GUI_RealtimeDockIconUpdateMonitor;
157
static const char* GUI_PresentationModeEnabled;
158
#endif /* Q_WS_MAC */
159
static const char* GUI_PassCAD;
160
static const char* GUI_Export_StorageType;
161
static const char* GUI_Export_Username;
162
static const char* GUI_Export_Hostname;
163
static const char* GUI_Export_Bucket;
164
static const char* GUI_PreventBetaWarning;
166
static const char* GUI_RecentFolderHD;
167
static const char* GUI_RecentFolderCD;
168
static const char* GUI_RecentFolderFD;
169
static const char* GUI_RecentListHD;
170
static const char* GUI_RecentListCD;
171
static const char* GUI_RecentListFD;
173
#ifdef VBOX_WITH_VIDEOHWACCEL
174
static const char* GUI_Accelerate2D_StretchLinear;
175
static const char* GUI_Accelerate2D_PixformatYV12;
176
static const char* GUI_Accelerate2D_PixformatUYVY;
177
static const char* GUI_Accelerate2D_PixformatYUY2;
178
static const char* GUI_Accelerate2D_PixformatAYUV;
181
#ifdef VBOX_WITH_DEBUGGER_GUI
182
static const char* GUI_DbgEnabled;
183
static const char* GUI_DbgAutoShow;
186
static QStringList VBoxFileExts;
187
static QStringList VBoxExtPackFileExts;
188
static QStringList OVFFileExts;
191
Q_DECLARE_METATYPE(VBoxDefs::MediumType);
193
#define MAC_LEOPARD_STYLE defined(Q_WS_MAC) && (QT_VERSION >= 0x040300)
195
#endif /* __VBoxDefs_h__ */