UISession.h revision 8bf8c6b1914c9e7e60b1547888400668f1774497
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/** @file
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync *
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * VBox frontends: Qt GUI ("VirtualBox"):
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * UISession class declaration
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/*
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * Copyright (C) 2010-2012 Oracle Corporation
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync *
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * available from http://www.virtualbox.org. This file is free software;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * you can redistribute it and/or modify it under the terms of the GNU
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * General Public License (GPL) as published by the Free Software
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#ifndef ___UIConsole_h___
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#define ___UIConsole_h___
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* Qt includes: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#include <QObject>
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#include <QCursor>
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* GUI includes: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#include "UIMachineDefs.h"
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* COM includes: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#include "COMEnums.h"
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
af62929dce3cc5e14c75438cd2b893f82ae6dbc8vboxsync/* Forward declarations: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass QMenu;
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsyncclass QMenuBar;
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync#ifdef VBOX_GUI_WITH_KEYS_RESET_HANDLER
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsync# ifdef Q_WS_MAC
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsyncstruct __siginfo;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsynctypedef struct __siginfo siginfo_t;
04e845ee9ef813501cd2570a4188cb852d170408vboxsync# else /* Q_WS_MAC */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncstruct siginfo;
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsynctypedef struct siginfo siginfo_t;
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync# endif /* !Q_WS_MAC */
9161d9a8318db73b2848c1feaef3880980474e64vboxsync#endif /* VBOX_GUI_WITH_KEYS_RESET_HANDLER */
04e845ee9ef813501cd2570a4188cb852d170408vboxsyncclass UIFrameBuffer;
04e845ee9ef813501cd2570a4188cb852d170408vboxsyncclass UIMachine;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass UIMachineLogic;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass UIMachineMenuBar;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass CSession;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass CUSBDevice;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass CNetworkAdapter;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncclass CMediumAttachment;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* CConsole callback event types: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncenum UIConsoleEventType
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync{
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_MousePointerShapeChange = QEvent::User + 1,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_MouseCapabilityChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_KeyboardLedsChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_StateChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_AdditionsStateChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_NetworkAdapterChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Not used: UIConsoleEventType_SerialPortChange, */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Not used: UIConsoleEventType_ParallelPortChange, */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Not used: UIConsoleEventType_StorageControllerChange, */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_MediumChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Not used: UIConsoleEventType_CPUChange, */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_VRDEServerChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_VRDEServerInfoChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_USBControllerChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_USBDeviceStateChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_SharedFolderChange,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_RuntimeError,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_CanShowWindow,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_ShowWindow,
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_MAX
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync};
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsyncclass UISession : public QObject
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync{
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync Q_OBJECT;
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsyncpublic:
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Machine uisession constructor/destructor: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UISession(UIMachine *pMachine, CSession &session);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync virtual ~UISession();
04e845ee9ef813501cd2570a4188cb852d170408vboxsync
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync /* Common members: */
9161d9a8318db73b2848c1feaef3880980474e64vboxsync void powerUp();
af62929dce3cc5e14c75438cd2b893f82ae6dbc8vboxsync
af62929dce3cc5e14c75438cd2b893f82ae6dbc8vboxsync /* Common getters: */
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync CSession& session() { return m_session; }
04e845ee9ef813501cd2570a4188cb852d170408vboxsync KMachineState machineState() const { return m_machineState; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync UIMachineLogic* machineLogic() const;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QWidget* mainMachineWindow() const;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QMenu* newMenu(UIMainMenuType fOptions = UIMainMenuType_All);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QMenuBar* newMenuBar(UIMainMenuType fOptions = UIMainMenuType_All);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QCursor cursor() const { return m_cursor; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isSaved() const { return machineState() == KMachineState_Saved; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isTurnedOff() const { return machineState() == KMachineState_PoweredOff ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_Saved ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_Teleported ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_Aborted; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isPaused() const { return machineState() == KMachineState_Paused ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_TeleportingPausedVM; }
83ee0b9fd6aa227bf4276f9d41af7ef59c03e8eevboxsync bool isRunning() const { return machineState() == KMachineState_Running ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_Teleporting ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_LiveSnapshotting; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isFirstTimeStarted() const { return m_fIsFirstTimeStarted; }
e99106e1706f8e87456f34b22c40becae61e1ed0vboxsync bool isIgnoreRuntimeMediumsChanging() const { return m_fIsIgnoreRuntimeMediumsChanging; }
e99106e1706f8e87456f34b22c40becae61e1ed0vboxsync bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isSeamlessModeRequested() const { return m_fIsSeamlessModeRequested; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Guest additions state getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestAdditionsActive() const { return (m_ulGuestAdditionsRunLevel > AdditionsRunLevelType_None); }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestSupportsGraphics() const { return isGuestAdditionsActive() && m_fIsGuestSupportsGraphics; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestSupportsSeamless() const { return isGuestSupportsGraphics() && m_fIsGuestSupportsSeamless; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Keyboard getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isNumLock() const { return m_fNumLock; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isCapsLock() const { return m_fCapsLock; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isScrollLock() const { return m_fScrollLock; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; }
08640b1dc58f26140fca6525ced3dbdef4ce45f7vboxsync
770da3dbb247278c98d1b21d2e11a0a7769131a4vboxsync /* Mouse getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isMouseSupportsAbsolute() const { return m_fIsMouseSupportsAbsolute; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isMouseSupportsRelative() const { return m_fIsMouseSupportsRelative; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isMouseHostCursorNeeded() const { return m_fIsMouseHostCursorNeeded; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isMouseCaptured() const { return m_fIsMouseCaptured; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isMouseIntegrated() const { return m_fIsMouseIntegrated; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isValidPointerShapePresent() const { return m_fIsValidPointerShapePresent; }
83ee0b9fd6aa227bf4276f9d41af7ef59c03e8eevboxsync bool isHidingHostPointer() const { return m_fIsHidingHostPointer; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common setters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool pause() { return setPause(true); }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool unpause() { return setPause(false); }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool setPause(bool fOn);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setGuestResizeIgnored(bool fIsGuestResizeIgnored) { m_fIsGuestResizeIgnored = fIsGuestResizeIgnored; }
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync void setSeamlessModeRequested(bool fIsSeamlessModeRequested) { m_fIsSeamlessModeRequested = fIsSeamlessModeRequested; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setAutoCaptureDisabled(bool fIsAutoCaptureDisabled) { m_fIsAutoCaptureDisabled = fIsAutoCaptureDisabled; }
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync /* Keyboard setters: */
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync void setNumLockAdaptionCnt(uint uNumLockAdaptionCnt) { m_uNumLockAdaptionCnt = uNumLockAdaptionCnt; }
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync void setCapsLockAdaptionCnt(uint uCapsLockAdaptionCnt) { m_uCapsLockAdaptionCnt = uCapsLockAdaptionCnt; }
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync /* Mouse setters: */
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync void setMouseCaptured(bool fIsMouseCaptured) { m_fIsMouseCaptured = fIsMouseCaptured; }
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync void setMouseIntegrated(bool fIsMouseIntegrated) { m_fIsMouseIntegrated = fIsMouseIntegrated; }
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync /* Screen visibility status: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync bool isScreenVisible(ulong uScreenId) const;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void setScreenVisible(ulong uScreenId, bool fIsMonitorVisible);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Returns existing framebuffer for the given screen-number;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync * Returns 0 (asserts) if screen-number attribute is out of bounds: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync UIFrameBuffer* frameBuffer(ulong uScreenId) const;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Sets framebuffer for the given screen-number;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * Ignores (asserts) if screen-number attribute is out of bounds: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void setFrameBuffer(ulong uScreenId, UIFrameBuffer* pFrameBuffer);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncsignals:
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Console callback signals: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigMousePointerShapeChange();
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigMouseCapabilityChange();
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigKeyboardLedsChange();
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigMachineStateChange();
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigAdditionsStateChange();
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigNetworkAdapterChange(const CNetworkAdapter &networkAdapter);
374979da4e9440f386798bce28aa9165f3fb5e3avboxsync void sigMediumChange(const CMediumAttachment &mediumAttachment);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigVRDEChange();
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync void sigUSBControllerChange();
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error);
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync void sigSharedFolderChange();
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync#ifdef RT_OS_DARWIN
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync void sigShowWindows();
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync#endif /* RT_OS_DARWIN */
0019a5195e700f7380e64717fcb10e1ce0fcfd91vboxsync void sigCPUExecutionCapChange();
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync void sigGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync /* Session signals: */
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync void sigMachineStarted();
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncpublic slots:
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sltInstallGuestAdditionsFrom(const QString &strSource);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsyncprivate slots:
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Close uisession handler: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sltCloseVirtualSession();
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync /* Console events slots */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void sltMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void sltMouseCapabilityChange(bool fSupportsAbsolute, bool fSupportsRelative, bool fNeedsHostCursor);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void sltKeyboardLedsChangeEvent(bool fNumLock, bool fCapsLock, bool fScrollLock);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void sltStateChange(KMachineState state);
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync void sltAdditionsChange();
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void sltVRDEChange();
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
224edf755dff839a1896d3930ea7627f69eb0d9fvboxsyncprivate:
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync /* Private getters: */
d9d070cfd2c99624fe6974842b7ad4a30d5b71e7vboxsync UIMachine* uimachine() const { return m_pMachine; }
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Prepare helpers: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void prepareConsoleEventHandlers();
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync void prepareScreens();
45cc469795c8872b9a6e0200b624ec9740ea6093vboxsync void prepareFramebuffers();
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void prepareMenuPool();
83fd17a3a00dc7bf6a36e23bbd2393dfc953da06vboxsync void loadSessionSettings();
04e845ee9ef813501cd2570a4188cb852d170408vboxsync
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync /* Cleanup helpers: */
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync void saveSessionSettings();
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync void cleanupMenuPool();
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync void cleanupFramebuffers();
72bb582308f9b6953c65b8b8807597dbef848b16vboxsync //void cleanupSession() {}
40b38a663dc0fd3003f7cdb0a69a01959d79b1f0vboxsync void cleanupConsoleEventHandlers();
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync
ddfcbd0a2ee61ce75ecc10a6001d5d834893bf8fvboxsync /* Common helpers: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync WId winId() const;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setPointerShape(const uchar *pShapeData, bool fHasAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void reinitMenuPool();
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void preparePowerUp();
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#ifdef VBOX_GUI_WITH_KEYS_RESET_HANDLER
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync static void signalHandlerSIGUSR1(int sig, siginfo_t *pInfo, void *pSecret);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#endif /* VBOX_GUI_WITH_KEYS_RESET_HANDLER */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Private variables: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync UIMachine *m_pMachine;
83ee0b9fd6aa227bf4276f9d41af7ef59c03e8eevboxsync CSession &m_session;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync UIMachineMenuBar *m_pMenuPool;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Screen visibility vector: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QVector<bool> m_monitorVisibilityVector;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Frame-buffers vector: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QVector<UIFrameBuffer*> m_frameBufferVector;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common variables: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync KMachineState m_machineState;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync QCursor m_cursor;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#if defined(Q_WS_WIN)
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync HCURSOR m_alphaCursor;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync#endif
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common flags: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool m_fIsFirstTimeStarted : 1;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool m_fIsIgnoreRuntimeMediumsChanging : 1;
08640b1dc58f26140fca6525ced3dbdef4ce45f7vboxsync bool m_fIsGuestResizeIgnored : 1;
770da3dbb247278c98d1b21d2e11a0a7769131a4vboxsync bool m_fIsSeamlessModeRequested : 1;
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool m_fIsAutoCaptureDisabled : 1;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Guest additions flags: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync ULONG m_ulGuestAdditionsRunLevel;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync bool m_fIsGuestSupportsGraphics : 1;
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync bool m_fIsGuestSupportsSeamless : 1;
3488e51e244adfc756837287fbfbcc03eca8bf7avboxsync
/* Keyboard flags: */
bool m_fNumLock : 1;
bool m_fCapsLock : 1;
bool m_fScrollLock : 1;
uint m_uNumLockAdaptionCnt;
uint m_uCapsLockAdaptionCnt;
/* Mouse flags: */
bool m_fIsMouseSupportsAbsolute : 1;
bool m_fIsMouseSupportsRelative : 1;
bool m_fIsMouseHostCursorNeeded : 1;
bool m_fIsMouseCaptured : 1;
bool m_fIsMouseIntegrated : 1;
bool m_fIsValidPointerShapePresent : 1;
bool m_fIsHidingHostPointer : 1;
/* Friend classes: */
friend class UIConsoleEventHandler;
};
#endif // !___UIConsole_h___