UIConsoleEventHandler.h revision 1e55c91541549682278f13c784f4ecc57bd9a2b3
346af0930020342df40a1ca8d13eb185ad48067evboxsync/** @file
346af0930020342df40a1ca8d13eb185ad48067evboxsync *
346af0930020342df40a1ca8d13eb185ad48067evboxsync * VBox frontends: Qt GUI ("VirtualBox"):
346af0930020342df40a1ca8d13eb185ad48067evboxsync * UIConsoleEventHandler class declaration
346af0930020342df40a1ca8d13eb185ad48067evboxsync */
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsync/*
4feb9880954f5fcb0c98feb110721798baccf992vboxsync * Copyright (C) 2010-2013 Oracle Corporation
346af0930020342df40a1ca8d13eb185ad48067evboxsync *
346af0930020342df40a1ca8d13eb185ad48067evboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
346af0930020342df40a1ca8d13eb185ad48067evboxsync * available from http://www.virtualbox.org. This file is free software;
346af0930020342df40a1ca8d13eb185ad48067evboxsync * you can redistribute it and/or modify it under the terms of the GNU
346af0930020342df40a1ca8d13eb185ad48067evboxsync * General Public License (GPL) as published by the Free Software
346af0930020342df40a1ca8d13eb185ad48067evboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
346af0930020342df40a1ca8d13eb185ad48067evboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
346af0930020342df40a1ca8d13eb185ad48067evboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
346af0930020342df40a1ca8d13eb185ad48067evboxsync */
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsync#ifndef __UIConsoleEventHandler_h__
346af0930020342df40a1ca8d13eb185ad48067evboxsync#define __UIConsoleEventHandler_h__
346af0930020342df40a1ca8d13eb185ad48067evboxsync
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync/* COM includes: */
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#include "COMEnums.h"
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#include "CVirtualBoxErrorInfo.h"
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#include "CEventListener.h"
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#include "CMediumAttachment.h"
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#include "CNetworkAdapter.h"
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync#include "CUSBDevice.h"
346af0930020342df40a1ca8d13eb185ad48067evboxsync
8bf8c6b1914c9e7e60b1547888400668f1774497vboxsync/* Forward declarations: */
346af0930020342df40a1ca8d13eb185ad48067evboxsyncclass UISession;
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsyncclass UIConsoleEventHandler: public QObject
346af0930020342df40a1ca8d13eb185ad48067evboxsync{
346af0930020342df40a1ca8d13eb185ad48067evboxsync Q_OBJECT;
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsyncpublic:
346af0930020342df40a1ca8d13eb185ad48067evboxsync static UIConsoleEventHandler* instance(UISession *pSession = 0);
346af0930020342df40a1ca8d13eb185ad48067evboxsync static void destroy();
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsyncsignals:
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape);
1e55c91541549682278f13c784f4ecc57bd9a2b3vboxsync void sigMouseCapabilityChange(bool fSupportsAbsolute, bool fSupportsRelative, bool fSupportsMultiTouch, bool fNeedsHostCursor);
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigKeyboardLedsChangeEvent(bool fNumLock, bool fCapsLock, bool fScrollLock);
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigStateChange(KMachineState state);
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigAdditionsChange();
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigNetworkAdapterChange(CNetworkAdapter adapter);
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigMediumChange(CMediumAttachment attachment);
5d96aa0d3ade93ae2970f61342432246c9842466vboxsync void sigVRDEChange();
4feb9880954f5fcb0c98feb110721798baccf992vboxsync void sigVideoCaptureChange();
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigUSBControllerChange();
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigUSBDeviceStateChange(CUSBDevice device, bool fAttached, CVirtualBoxErrorInfo error);
9a0c48116de3ffe1123a662b0c72fb1029a3b587vboxsync void sigSharedFolderChange();
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigRuntimeError(bool fFatal, QString strId, QString strMessage);
346af0930020342df40a1ca8d13eb185ad48067evboxsync#ifdef RT_OS_DARWIN
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sigShowWindow();
346af0930020342df40a1ca8d13eb185ad48067evboxsync#endif /* RT_OS_DARWIN */
103b0154d1ec1325cacf0cabaedab9581a317ce2vboxsync void sigCPUExecutionCapChange();
19a29c5b8ea65c618ae3825b6cf84bc3688a36b0vboxsync void sigGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsyncprivate slots:
346af0930020342df40a1ca8d13eb185ad48067evboxsync void sltCanShowWindow(bool &fVeto, QString &strReason);
25a96221cadefde67ab6689c5f1c5a6799438ad6vboxsync void sltShowWindow(LONG64 &winId);
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsyncprivate:
346af0930020342df40a1ca8d13eb185ad48067evboxsync UIConsoleEventHandler(UISession *pSession);
346af0930020342df40a1ca8d13eb185ad48067evboxsync ~UIConsoleEventHandler();
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsync static UIConsoleEventHandler *m_pInstance;
346af0930020342df40a1ca8d13eb185ad48067evboxsync UISession *m_pSession;
346af0930020342df40a1ca8d13eb185ad48067evboxsync CEventListener m_mainEventListener;
346af0930020342df40a1ca8d13eb185ad48067evboxsync};
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsync#define gConsoleEvents UIConsoleEventHandler::instance()
346af0930020342df40a1ca8d13eb185ad48067evboxsync
346af0930020342df40a1ca8d13eb185ad48067evboxsync#endif /* !__UIConsoleEventHandler_h__ */
346af0930020342df40a1ca8d13eb185ad48067evboxsync