UIDefs.h revision 878731e72e401b7e2a0434e5ab36ca633c7f2586
/** @file
* VBox Qt GUI - UIDefs namespace and other global declarations.
*/
/*
* Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___UIDefs_h___
#define ___UIDefs_h___
/* Qt includes: */
#include <QEvent>
#include <QStringList>
/* COM includes: */
#include "COMEnums.h"
/* Other VBox defines: */
#define LOG_GROUP LOG_GROUP_GUI
/* Other VBox includes: */
/* Defines: */
#ifdef DEBUG
# define AssertWrapperOk(w) \
# define AssertWrapperOkMsg(w, m) \
#else /* !DEBUG */
# define AssertWrapperOk(w) do {} while (0)
# define AssertWrapperOkMsg(w, m) do {} while (0)
#endif /* DEBUG */
#ifndef SIZEOF_ARRAY
# define SIZEOF_ARRAY(a) (sizeof(a) / sizeof(a[0]))
#endif /* SIZEOF_ARRAY */
/* Global UI namespace: */
{
/* VM display rendering mode: */
enum RenderMode
{
#ifdef VBOX_GUI_USE_QUARTZ2D
#endif /* VBOX_GUI_USE_QUARTZ2D */
};
/* Additional Qt event types: */
enum UIEventType
{
#ifdef Q_WS_WIN
#endif /* Q_WS_WIN */
#ifdef Q_WS_MAC
#endif /* Q_WS_MAC */
#ifdef VBOX_GUI_USE_QGL
#endif /* VBOX_GUI_USE_QGL */
};
/* Size formatting types: */
enum FormatSize
{
};
/* Global declarations: */
extern const char* GUI_RenderMode;
extern const char* GUI_LanguageId;
extern const char* GUI_ExtPackName;
extern const char* GUI_PreventBetaWarning;
extern const char* GUI_RecentFolderHD;
extern const char* GUI_RecentFolderCD;
extern const char* GUI_RecentFolderFD;
extern const char* GUI_RecentListHD;
extern const char* GUI_RecentListCD;
extern const char* GUI_RecentListFD;
/* Selector-window declarations: */
extern const char* GUI_Input_SelectorShortcuts;
extern const char* GUI_LastSelectorWindowPosition;
extern const char* GUI_SplitterSizes;
extern const char* GUI_Toolbar;
extern const char* GUI_Statusbar;
extern const char* GUI_PreviewUpdate;
extern const char* GUI_DetailsPageBoxes;
extern const char* GUI_SelectorVMPositions;
extern const char* GUI_LastVMSelected;
extern const char* GUI_LastItemSelected;
extern const char* GUI_GroupDefinitions;
extern const char* GUI_HideFromManager;
extern const char* GUI_PreventReconfiguration;
extern const char* GUI_PreventSnapshotOperations;
extern const char* GUI_HideDetails;
/* Machine-window declarations: */
extern const char* GUI_RestrictedRuntimeMenus;
#ifdef Q_WS_MAC
extern const char* GUI_RestrictedRuntimeApplicationMenuActions;
#endif /* Q_WS_MAC */
extern const char* GUI_RestrictedRuntimeMachineMenuActions;
extern const char* GUI_RestrictedRuntimeViewMenuActions;
extern const char* GUI_RestrictedRuntimeDevicesMenuActions;
#ifdef VBOX_WITH_DEBUGGER_GUI
extern const char* GUI_RestrictedRuntimeDebuggerMenuActions;
#endif /* VBOX_WITH_DEBUGGER_GUI */
extern const char* GUI_RestrictedRuntimeHelpMenuActions;
extern const char* GUI_RestrictedVisualStates;
extern const char* GUI_Input_MachineShortcuts;
extern const char* GUI_LastNormalWindowPosition;
extern const char* GUI_LastScaleWindowPosition;
extern const char* GUI_LastWindowState_Max;
extern const char* GUI_LastGuestSizeHint;
extern const char* GUI_LastGuestSizeHintWasFullscreen;
extern const char* GUI_Fullscreen;
extern const char* GUI_Seamless;
extern const char* GUI_Scale;
extern const char* GUI_VirtualScreenToHostScreen;
extern const char* GUI_AutoresizeGuest;
extern const char* GUI_AutomountGuestScreens;
extern const char* GUI_SaveMountedAtRuntime;
extern const char* GUI_PassCAD;
extern const char* GUI_DefaultCloseAction;
extern const char* GUI_RestrictedStatusBarIndicators;
/* Settings dialogs stuff: */
extern const char* GUI_RestrictedGlobalSettingsPages;
extern const char* GUI_RestrictedMachineSettingsPages;
/* Mini tool-bar declarations: */
extern const char* GUI_ShowMiniToolBar;
extern const char* GUI_MiniToolBarAlignment;
extern const char* GUI_MiniToolBarAutoHide;
/* Close-dialog declarations: */
extern const char* GUI_RestrictedCloseActions;
extern const char* GUI_LastCloseAction;
extern const char* GUI_CloseActionHook;
/* Wizards declarations: */
extern const char* GUI_FirstRun;
extern const char* GUI_HideDescriptionForWizards;
extern const char* GUI_Export_StorageType;
extern const char* GUI_Export_Username;
extern const char* GUI_Export_Hostname;
extern const char* GUI_Export_Bucket;
/* Message-center declarations: */
extern const char* GUI_SuppressMessages;
extern const char* GUI_InvertMessageOption;
/* Update manager declarations: */
extern const char* GUI_PreventApplicationUpdate;
extern const char* GUI_UpdateDate;
extern const char* GUI_UpdateCheckCount;
#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
/* Information dialog declarations: */
extern const char* GUI_InfoDlgState;
#ifdef VBOX_WITH_DEBUGGER_GUI
/* Debugger GUI declarations: */
extern const char* GUI_DbgEnabled;
extern const char* GUI_DbgAutoShow;
#endif /* VBOX_WITH_DEBUGGER_GUI */
#ifdef Q_WS_X11
/* License GUI declarations: */
extern const char* GUI_LicenseKey;
#endif /* Q_WS_X11 */
#ifdef Q_WS_MAC
/* Mac dock declarations: */
extern const char* GUI_RealtimeDockIconUpdateEnabled;
extern const char* GUI_RealtimeDockIconUpdateMonitor;
extern const char* GUI_PresentationModeEnabled;
#endif /* Q_WS_MAC */
#ifdef VBOX_WITH_VIDEOHWACCEL
/* Video-acceleration declarations: */
extern const char* GUI_Accelerate2D_StretchLinear;
extern const char* GUI_Accelerate2D_PixformatYV12;
extern const char* GUI_Accelerate2D_PixformatUYVY;
extern const char* GUI_Accelerate2D_PixformatYUY2;
extern const char* GUI_Accelerate2D_PixformatAYUV;
#endif /* VBOX_WITH_VIDEOHWACCEL */
/* File extensions declarations: */
extern QStringList VBoxFileExts;
extern QStringList VBoxExtPackFileExts;
extern QStringList OVFFileExts;
}
#ifdef Q_WS_MAC
/** Known MacOS X releases. */
enum MacOSXRelease
{
};
#endif /* Q_WS_MAC */
struct StorageSlot
{
StorageSlot(KStorageBus otherBus, LONG iPort, LONG iDevice) : bus(otherBus), port(iPort), device(iDevice) {}
StorageSlot& operator=(const StorageSlot &other) { bus = other.bus; port = other.port; device = other.device; return *this; }
bool operator==(const StorageSlot &other) const { return bus == other.bus && port == other.port && device == other.device; }
bool operator!=(const StorageSlot &other) const { return bus != other.bus || port != other.port || device != other.device; }
};
/* Common UI size suffixes: */
enum SizeSuffix
{
SizeSuffix_Byte = 0,
};
/* Runtime UI menu types: */
enum RuntimeMenuType
{
RuntimeMenuType_All = 0xFF
};
#ifdef Q_WS_MAC
/** Runtime UI: Application menu: Action types. */
{
RuntimeMenuApplicationActionType_All = 0xFFFF
};
#endif /* Q_WS_MAC */
/** Runtime UI: Machine menu: Action types. */
{
#ifdef Q_WS_X11
#endif /* Q_WS_X11 */
#ifndef Q_WS_MAC
#endif /* !Q_WS_MAC */
RuntimeMenuMachineActionType_All = 0xFFFF
};
/** Runtime UI: View menu: Action types. */
{
RuntimeMenuViewActionType_All = 0xFFFF
};
/** Runtime UI: Devices menu: Action types. */
{
RuntimeMenuDevicesActionType_All = 0xFFFF
};
#ifdef VBOX_WITH_DEBUGGER_GUI
/** Runtime UI: Debugger menu: Action types. */
{
RuntimeMenuDebuggerActionType_All = 0xFFFF
};
#endif /* VBOX_WITH_DEBUGGER_GUI */
/** Runtime UI: Help menu: Action types. */
{
#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
#ifndef Q_WS_MAC
#endif /* !Q_WS_MAC */
RuntimeMenuHelpActionType_All = 0xFFFF
};
/* Runtime UI visual-state types: */
enum UIVisualStateType
{
UIVisualStateType_All = 0xFF
};
/* Details element type: */
enum DetailsElementType
{
#ifdef VBOX_WITH_PARALLEL_PORTS
#endif /* VBOX_WITH_PARALLEL_PORTS */
};
/* Global settings page type: */
{
#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
};
/* Machine settings page type: */
{
};
/* Indicator type: */
enum IndicatorType
{
};
/* Machine close action: */
enum MachineCloseAction
{
MachineCloseAction_All = 0xFF
};
#endif /* !___UIDefs_h___ */