UISession.h revision 83fd17a3a00dc7bf6a36e23bbd2393dfc953da06
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * VBox frontends: Qt GUI ("VirtualBox"):
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * UISession class declaration
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * Copyright (C) 2010 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync * additional information or have any questions.
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* Global includes */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* Local includes */
0ae258e7d0d2520036514d896a9eea58bf285f03vboxsync/* Global forwards */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* Local forwards */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync/* CConsole callback event types: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync UIConsoleEventType_MousePointerShapeChange = QEvent::User + 1,
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync /* Machine uisession constructor/destructor: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync KMachineState machineState() const { return m_machineState; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isSaved() const { return machineState() == KMachineState_Saved; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isTurnedOff() const { return machineState() == KMachineState_PoweredOff ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isPaused() const { return machineState() == KMachineState_Paused ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_TeleportingPausedVM; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isRunning() const { return machineState() == KMachineState_Running ||
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync machineState() == KMachineState_LiveSnapshotting; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isFirstTimeStarted() const { return m_fIsFirstTimeStarted; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isIgnoreRuntimeMediumsChanging() const { return m_fIsIgnoreRutimeMediumsChanging; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Guest additions state getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestAdditionsActive() const { return m_fIsGuestAdditionsActive; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestSupportsGraphics() const { return m_fIsGuestSupportsGraphics; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isGuestSupportsSeamless() const { return m_fIsGuestSupportsSeamless; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Keyboard getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isScrollLock() const { return m_fScrollLock; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* 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; }
08640b1dc58f26140fca6525ced3dbdef4ce45f7vboxsync bool isValidPointerShapePresent() const { return m_fIsValidPointerShapePresent; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync bool isHidingHostPointer() const { return m_fIsMouseCaptured || (m_fIsMouseSupportsAbsolute && m_fIsHideHostPointer); }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common setters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setGuestResizeIgnored(bool fIsGuestResizeIgnored) { m_fIsGuestResizeIgnored = fIsGuestResizeIgnored; }
9508848aea94fe052556767bbf87e1c212380a66vboxsync void setGuestSizeHint(ulong uScreenId, QSize size);
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Keyboard setters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setNumLockAdaptionCnt(uint uNumLockAdaptionCnt) { m_uNumLockAdaptionCnt = uNumLockAdaptionCnt; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setCapsLockAdaptionCnt(uint uCapsLockAdaptionCnt) { m_uCapsLockAdaptionCnt = uCapsLockAdaptionCnt; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Mouse setters: */
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync void setMouseCaptured(bool fIsMouseCaptured) { m_fIsMouseCaptured = fIsMouseCaptured; emit sigMouseCapturedStatusChanged(); }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setMouseIntegrated(bool fIsMouseIntegrated) { m_fIsMouseIntegrated = fIsMouseIntegrated; }
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Console callback signals: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigNetworkAdapterChange(const CNetworkAdapter &networkAdapter);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigSerialPortChange(const CSerialPort &serialPort);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigParallelPortChange(const CParallelPort ¶llelPort);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigMediumChange(const CMediumAttachment &mediumAttachment);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error);
374979da4e9440f386798bce28aa9165f3fb5e3avboxsync void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
24ecfcc82c2eecb44373198021e69229e1c66490vboxsync /* Session signals: */
7e77c8f54449be6f28ccbf32f7e651554d9f4060vboxsync /* Close uisession handler: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Private getters: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync UIMachine* uimachine() const { return m_pMachine; }
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Event handlers: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Prepare helpers: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Cleanup helpers: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common helpers: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync void setPointerShape(const uchar *pShapeData, bool fHasAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight);
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Private variables: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common variables: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Common flags: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Guest additions flags: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Keyboard flags: */
0de1998ac52682bb5322df476e45f237265ea9b7vboxsync /* Mouse flags: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync /* Friend classes: */
085bc29163eb87e345acaae02789e4c233d51f3bvboxsync#endif // !___UIConsole_h___