VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h@ 100064

Last change on this file since 100064 was 100064, checked in by vboxsync, 13 months ago

FE/Qt: bugref:10421. Replacing VBOX_WS_X11 with VBOX_WS_NIX.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 46.7 KB
Line 
1/* $Id: UIMachine.h 100064 2023-06-04 09:10:01Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMachine class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_runtime_UIMachine_h
29#define FEQT_INCLUDED_SRC_runtime_UIMachine_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QObject>
36#include <QPixmap>
37
38/* GUI includes: */
39#include "UIAddDiskEncryptionPasswordDialog.h"
40#include "UIExtraDataDefs.h"
41#include "UIMachineDefs.h"
42#include "UIMediumDefs.h"
43#include "UIMousePointerShapeData.h"
44#include "UITextTable.h"
45
46/* COM includes: */
47#include "COMEnums.h"
48
49/* Forward declarations: */
50class QWidget;
51class UIActionPool;
52class UIFrameBuffer;
53class UIMachineLogic;
54class UISession;
55class CMediumAttachment;
56class CNetworkAdapter;
57class CUSBDevice;
58class CVirtualBoxErrorInfo;
59#ifdef VBOX_WS_MAC
60 class QMenuBar;
61 class QTimer;
62#endif
63
64/** Singleton QObject extension
65 * used as virtual machine (VM) singleton instance. */
66class UIMachine : public QObject
67{
68 Q_OBJECT;
69
70signals:
71
72 /** Notifies listeners about machine initialized. */
73 void sigInitialized();
74
75 /** Requests async visual-state change. */
76 void sigRequestAsyncVisualStateChange(UIVisualStateType enmVisualStateType);
77
78 /** @name COM events stuff.
79 ** @{ */
80 /** Notifies about additions state change. */
81 void sigAdditionsStateChange();
82 /** Notifies about additions state actually change. */
83 void sigAdditionsStateActualChange();
84 /** Notifies about audio adapter change. */
85 void sigAudioAdapterChange();
86 /** Notifies about clipboard mode change. */
87 void sigClipboardModeChange(KClipboardMode enmMode);
88 /** Notifies about CPU execution cap change. */
89 void sigCPUExecutionCapChange();
90 /** Notifies about DnD mode change. */
91 void sigDnDModeChange(KDnDMode enmMode);
92 /** Notifies about guest monitor change. */
93 void sigGuestMonitorChange(KGuestMonitorChangedEventType emnChangeType, ulong uScreenId, QRect screenGeo);
94 /** Notifies about machine change. */
95 void sigMachineStateChange();
96 /** Notifies about medium change. */
97 void sigMediumChange(const CMediumAttachment &comMediumAttachment);
98 /** Notifies about network adapter change. */
99 void sigNetworkAdapterChange(const CNetworkAdapter &comNetworkAdapter);
100 /** Notifies about recording change. */
101 void sigRecordingChange();
102 /** Notifies about shared folder change. */
103 void sigSharedFolderChange();
104 /** Handles storage device change signal. */
105 void sigStorageDeviceChange(const CMediumAttachment &comAttachment, bool fRemoved, bool fSilent);
106 /** Handles USB controller change signal. */
107 void sigUSBControllerChange();
108 /** Handles USB device state change signal. */
109 void sigUSBDeviceStateChange(const CUSBDevice &comDevice, bool fAttached, const CVirtualBoxErrorInfo &comError);
110 /** Notifies about VRDE change. */
111 void sigVRDEChange();
112
113 /** Notifies about runtime error happened. */
114 void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
115
116#ifdef VBOX_WS_MAC
117 /** macOS X: Notifies about VM window should be shown. */
118 void sigShowWindows();
119#endif
120 /** @} */
121
122 /** @name Keyboard stuff.
123 ** @{ */
124 /** Notifies about keyboard LEDs change. */
125 void sigKeyboardLedsChange();
126
127 /** Notifies listeners about keyboard state-change. */
128 void sigKeyboardStateChange(int iState);
129 /** @} */
130
131 /** @name Mouse stuff.
132 ** @{ */
133 /** Notifies listeners about mouse pointer shape change. */
134 void sigMousePointerShapeChange();
135 /** Notifies listeners about mouse capability change. */
136 void sigMouseCapabilityChange();
137 /** Notifies listeners about cursor position change. */
138 void sigCursorPositionChange();
139
140 /** Notifies listeners about mouse state-change. */
141 void sigMouseStateChange(int iState);
142 /** @} */
143
144 /** @name Host-screen stuff.
145 ** @{ */
146 /** Notifies about host-screen count change. */
147 void sigHostScreenCountChange();
148 /** Notifies about host-screen geometry change. */
149 void sigHostScreenGeometryChange();
150 /** Notifies about host-screen available-area change. */
151 void sigHostScreenAvailableAreaChange();
152 /** @} */
153
154public:
155
156 /** Static factory to start machine. */
157 static bool startMachine();
158 /** Static constructor. */
159 static bool create();
160 /** Static destructor. */
161 static void destroy();
162 /** Static instance. */
163 static UIMachine *instance() { return s_pInstance; }
164
165 /** Returns whether machine is initialized. */
166 bool isInitialized() const { return m_fInitialized; }
167
168 /** Returns session UI instance. */
169 UISession *uisession() const { return m_pSession; }
170 /** Returns machine-logic instance. */
171 UIMachineLogic *machineLogic() const { return m_pMachineLogic; }
172 /** Returns frame-buffer reference for screen with @a uScreenId specified. */
173 UIFrameBuffer *frameBuffer(ulong uScreenId);
174 /** Returns active machine-window reference (if possible). */
175 QWidget *activeWindow() const;
176
177 /** Returns whether session UI is valid. */
178 bool isSessionValid() const;
179
180 /** Returns whether requested visual @a state allowed. */
181 bool isVisualStateAllowed(UIVisualStateType state) const { return m_enmAllowedVisualStates & state; }
182
183 /** Requests async visual-state change. */
184 void asyncChangeVisualState(UIVisualStateType enmVisualStateType);
185
186 /** Requests visual-state to be entered when possible. */
187 void setRequestedVisualState(UIVisualStateType enmVisualStateType);
188 /** Returns requested visual-state to be entered when possible. */
189 UIVisualStateType requestedVisualState() const;
190
191 /** @name General stuff.
192 ** @{ */
193 /** Returns the machine name. */
194 QString machineName() const;
195 /** Returns the OS type id. */
196 QString osTypeId() const;
197
198 /** Acquire machine pixmap. */
199 void acquireMachinePixmap(const QSize &size, QPixmap &pixmap);
200 /** Acquire user machine icon. */
201 void acquireUserMachineIcon(QIcon &icon);
202
203 /** Acquires chipset type. */
204 bool acquireChipsetType(KChipsetType &enmType);
205 /** @} */
206
207 /** @name Branding stuff.
208 ** @{ */
209 /** Returns the cached machine-window icon. */
210 QIcon *machineWindowIcon() const { return m_pMachineWindowIcon; }
211#ifndef VBOX_WS_MAC
212 /** Returns redefined machine-window name postfix. */
213 QString machineWindowNamePostfix() const { return m_strMachineWindowNamePostfix; }
214#endif
215 /** @} */
216
217 /** @name Actions stuff.
218 ** @{ */
219 /** Returns the action-pool instance. */
220 UIActionPool *actionPool() const { return m_pActionPool; }
221
222 /** Updates additions actions state. */
223 void updateStateAdditionsActions();
224 /** Updates Audio action state. */
225 void updateStateAudioActions();
226 /** Updates Recording action state. */
227 void updateStateRecordingAction();
228 /** Updates VRDE server action state. */
229 void updateStateVRDEServerAction();
230 /** @} */
231
232 /** @name Machine-state stuff.
233 ** @{ */
234 /** Returns previous machine state. */
235 KMachineState machineStatePrevious() const;
236 /** Returns cached machine state. */
237 KMachineState machineState() const;
238
239 /** Resets previous state to be the same as current one. */
240 void forgetPreviousMachineState();
241
242 /** Acquire live machine state. */
243 bool acquireLiveMachineState(KMachineState &enmState);
244
245 /** Returns whether VM is in one of turned off states. */
246 bool isTurnedOff() const;
247 /** Returns whether VM is in one of paused states. */
248 bool isPaused() const;
249 /** Returns whether VM was in one of paused states. */
250 bool wasPaused() const;
251 /** Returns whether VM is in one of running states. */
252 bool isRunning() const;
253 /** Returns whether VM is in one of stuck states. */
254 bool isStuck() const;
255 /** Returns whether VM is one of states where guest-screen is undrawable. */
256 bool isGuestScreenUnDrawable() const;
257
258 /** Resets VM. */
259 bool reset();
260 /** Performes VM pausing. */
261 bool pause();
262 /** Performes VM resuming. */
263 bool unpause();
264 /** Performes VM pausing/resuming depending on @a fPause state. */
265 bool setPause(bool fPause);
266 /** @} */
267
268 /** @name Machine-data stuff.
269 ** @{ */
270 /** Acquires settings file path. */
271 bool acquireSettingsFilePath(QString &strPath);
272
273 /** Saves machine data. */
274 bool saveSettings();
275 /** @} */
276
277 /** @name Snapshot stuff.
278 ** @{ */
279 /** Acquires snapshot count. */
280 bool acquireSnapshotCount(ulong &uCount);
281 /** Acquires current snapshot name. */
282 bool acquireCurrentSnapshotName(QString &strName);
283
284 /** Recursively searches for a first snapshot matching name template conditions. */
285 bool acquireMaxSnapshotIndex(const QString &strNameTemplate, ulong &uIndex);
286
287 /** Takes snapshot with name & description specified. */
288 void takeSnapshot(const QString &strName, const QString &strDescription);
289 /** @} */
290
291 /** @name Audio stuff.
292 ** @{ */
293 /** Acquires whether audio adapter is present. */
294 bool acquireWhetherAudioAdapterPresent(bool &fPresent);
295 /** Acquires whether audio adapter is enabled. */
296 bool acquireWhetherAudioAdapterEnabled(bool &fEnabled);
297 /** Acquires whether audio adapter output is enabled. */
298 bool acquireWhetherAudioAdapterOutputEnabled(bool &fEnabled);
299 /** Acquires whether audio adapter input is enabled. */
300 bool acquireWhetherAudioAdapterInputEnabled(bool &fEnabled);
301 /** Defines whether audio adapter output is enabled. */
302 bool setAudioAdapterOutputEnabled(bool fEnabled);
303 /** Defines whether audio adapter input is enabled. */
304 bool setAudioAdapterInputEnabled(bool fEnabled);
305 /** @} */
306
307 /** @name Host-screen stuff.
308 ** @{ */
309 /** Returns the list of host-screen geometries we currently have. */
310 QList<QRect> hostScreens() const { return m_hostScreens; }
311 /** @} */
312
313 /** @name Guest-screen stuff.
314 ** @{ */
315 /** Returns whether guest-screen with @a uScreenId specified is expected to be visible. */
316 bool isScreenVisibleHostDesires(ulong uScreenId) const;
317 /** Defines whether guest-screen with @a uScreenId specified is expected to be @a fVisible. */
318 void setScreenVisibleHostDesires(ulong uScreenId, bool fVisible);
319
320 /** Returns whether guest-screen with @a uScreenId specified is actually visible. */
321 bool isScreenVisible(ulong uScreenId) const;
322 /** Defines whether guest-screen with @a uScreenId specified is actually @a fVisible. */
323 void setScreenVisible(ulong uScreenId, bool fIsMonitorVisible);
324
325 /** Returns a number of visible guest-windows. */
326 int countOfVisibleWindows();
327 /** Returns the list of visible guest-windows. */
328 QList<int> listOfVisibleWindows() const;
329
330 /** Returns size for guest-screen with index @a uScreenId. */
331 QSize guestScreenSize(ulong uScreenId) const;
332
333 /** Returns last full-screen size for guest-screen with index @a uScreenId. */
334 QSize lastFullScreenSize(ulong uScreenId) const;
335 /** Defines last full-screen @a size for guest-screen with index @a uScreenId. */
336 void setLastFullScreenSize(ulong uScreenId, QSize size);
337
338 /** Returns whether guest screen resize should be ignored. */
339 bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
340 /** Defines whether guest screen resize should be @a fIgnored. */
341 void setGuestResizeIgnored(bool fIgnored) { m_fIsGuestResizeIgnored = fIgnored; }
342
343 /** Acquires graphics controller type. */
344 bool acquireGraphicsControllerType(KGraphicsControllerType &enmType);
345 /** Acquires VRAM size. */
346 bool acquireVRAMSize(ulong &uSize);
347 /** Acquires whether accelerate 3D is enabled. */
348 bool acquireWhetherAccelerate3DEnabled(bool &fEnabled);
349 /** Acquires monitor count. */
350 bool acquireMonitorCount(ulong &uCount);
351
352 /** Acquires parameters for guest-screen with passed uScreenId. */
353 bool acquireGuestScreenParameters(ulong uScreenId,
354 ulong &uWidth, ulong &uHeight, ulong &uBitsPerPixel,
355 long &xOrigin, long &yOrigin, KGuestMonitorStatus &enmMonitorStatus);
356 /** Acquires saved info for guest-screen with passed uScreenId. */
357 bool acquireSavedGuestScreenInfo(ulong uScreenId,
358 long &xOrigin, long &yOrigin,
359 ulong &uWidth, ulong &uHeight, bool &fEnabled);
360 /** Defines video mode hint for guest-screen with passed uScreenId. */
361 bool setVideoModeHint(ulong uScreenId, bool fEnabled, bool fChangeOrigin,
362 long xOrigin, long yOrigin, ulong uWidth, ulong uHeight,
363 ulong uBitsPerPixel, bool fNotify);
364 /** Acquires video mode hint for guest-screen with passed uScreenId. */
365 bool acquireVideoModeHint(ulong uScreenId, bool &fEnabled, bool &fChangeOrigin,
366 long &xOrigin, long &yOrigin, ulong &uWidth, ulong &uHeight,
367 ulong &uBitsPerPixel);
368 /** Acquires screen-shot for guest-screen with passed uScreenId. */
369 bool acquireScreenShot(ulong uScreenId, ulong uWidth, ulong uHeight, KBitmapFormat enmFormat, uchar *pBits);
370 /** Acquires saved screen-shot info for guest-screen with passed uScreenId. */
371 bool acquireSavedScreenshotInfo(ulong uScreenId, ulong &uWidth, ulong &uHeight, QVector<KBitmapFormat> &formats);
372 /** Acquires saved screen-shot for guest-screen with passed uScreenId. */
373 bool acquireSavedScreenshot(ulong uScreenId, KBitmapFormat enmFormat,
374 ulong &uWidth, ulong &uHeight, QVector<BYTE> &screenshot);
375 /** Notifies guest-screen with passed uScreenId about scale-factor change. */
376 bool notifyScaleFactorChange(ulong uScreenId, ulong uScaleFactorWMultiplied, ulong uScaleFactorHMultiplied);
377 /** Notifies display about unscaled HiDPI policy change. */
378 bool notifyHiDPIOutputPolicyChange(bool fUnscaledHiDPI);
379 /** Defines whether seamless mode is enabled for display. */
380 bool setSeamlessMode(bool fEnabled);
381 /** Notifies display about viewport changes. */
382 bool viewportChanged(ulong uScreenId, ulong xOrigin, ulong yOrigin, ulong uWidth, ulong uHeight);
383 /** Notifies display about all screens were invalidated. */
384 bool invalidateAndUpdate();
385 /** Notifies display about screen with passed uScreenId was invalidated. */
386 bool invalidateAndUpdateScreen(ulong uScreenId);
387
388 /** Acquires whether VRDE server is present. */
389 bool acquireWhetherVRDEServerPresent(bool &fPresent);
390 /** Acquires whether VRDE server is enabled. */
391 bool acquireWhetherVRDEServerEnabled(bool &fEnabled);
392 /** Defines whether VRDE server is enabled. */
393 bool setVRDEServerEnabled(bool fEnabled);
394 /** Acquires VRDE server port. */
395 bool acquireVRDEServerPort(long &iPort);
396
397 /** Acquires whether recording settings is present. */
398 bool acquireWhetherRecordingSettingsPresent(bool &fPresent);
399 /** Acquires whether recording settings is enabled. */
400 bool acquireWhetherRecordingSettingsEnabled(bool &fEnabled);
401 /** Defines whether recording settings is enabled. */
402 bool setRecordingSettingsEnabled(bool fEnabled);
403 /** @} */
404
405 /** @name Guest additions stuff.
406 ** @{ */
407 /** Returns whether guest additions is active. */
408 bool isGuestAdditionsActive() const;
409 /** Returns whether guest additions supports graphics. */
410 bool isGuestSupportsGraphics() const;
411 /** Returns whether guest additions supports seamless. */
412 bool isGuestSupportsSeamless() const;
413 /** Acquires the guest addition's version. */
414 bool acquireGuestAdditionsVersion(QString &strVersion);
415 /** Acquires the guest addition's revision. */
416 bool acquireGuestAdditionsRevision(ulong &uRevision);
417 /** @} */
418
419 /** @name Keyboard stuff.
420 ** @{ */
421 /** Returns the NUM lock status. */
422 bool isNumLock() const { return m_fNumLock; }
423 /** Returns the CAPS lock status. */
424 bool isCapsLock() const { return m_fCapsLock; }
425 /** Returns the SCROLL lock status. */
426 bool isScrollLock() const { return m_fScrollLock; }
427
428 /** Returns the NUM lock adaption count. */
429 uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; }
430 /** Defines the NUM lock adaption @a uCount. */
431 void setNumLockAdaptionCnt(uint uCount) { m_uNumLockAdaptionCnt = uCount; }
432
433 /** Returns the CAPS lock adaption count. */
434 uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; }
435 /** Defines the CAPS lock adaption @a uCount. */
436 void setCapsLockAdaptionCnt(uint uCount) { m_uCapsLockAdaptionCnt = uCount; }
437
438 /** Returns whether VM should perform HID LEDs synchronization. */
439 bool isHidLedsSyncEnabled() const { return m_fIsHidLedsSyncEnabled; }
440
441 /** Returns whether auto-capture is disabled. */
442 bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; }
443 /** Defines whether auto-capture is @a fDisabled. */
444 void setAutoCaptureDisabled(bool fDisabled) { m_fIsAutoCaptureDisabled = fDisabled; }
445
446 /** Returns the keyboard-state. */
447 int keyboardState() const { return m_iKeyboardState; }
448
449 /** Sends a scan @a iCode to VM's keyboard. */
450 bool putScancode(LONG iCode);
451 /** Sends a list of scan @a codes to VM's keyboard. */
452 bool putScancodes(const QVector<LONG> &codes);
453 /** Sends the CAD sequence to VM's keyboard. */
454 bool putCAD();
455 /** Releases all keys. */
456 bool releaseKeys();
457 /** Sends a USB HID @a iUsageCode and @a iUsagePage to VM's keyboard.
458 * The @a fKeyRelease flag is set when the key is being released. */
459 bool putUsageCode(LONG iUsageCode, LONG iUsagePage, bool fKeyRelease);
460 /** @} */
461
462 /** @name Mouse stuff.
463 ** @{ */
464 /** Returns whether we should hide host mouse pointer. */
465 bool isHidingHostPointer() const { return m_fIsHidingHostPointer; }
466 /** Returns whether there is valid mouse pointer shape present. */
467 bool isValidPointerShapePresent() const { return m_fIsValidPointerShapePresent; }
468 /** Returns whether the @a cursorPosition() is valid and could be used by the GUI now. */
469 bool isValidCursorPositionPresent() const { return m_fIsValidCursorPositionPresent; }
470
471 /** Returns whether mouse supports absolute coordinates. */
472 bool isMouseSupportsAbsolute() const { return m_fIsMouseSupportsAbsolute; }
473 /** Returns whether mouse supports relative coordinates. */
474 bool isMouseSupportsRelative() const { return m_fIsMouseSupportsRelative; }
475 /** Returns whether touch screen is supported. */
476 bool isMouseSupportsTouchScreen() const { return m_fIsMouseSupportsTouchScreen; }
477 /** Returns whether touch pad is supported. */
478 bool isMouseSupportsTouchPad() const { return m_fIsMouseSupportsTouchPad; }
479 /** Returns whether guest requires host cursor to be shown. */
480 bool isMouseHostCursorNeeded() const { return m_fIsMouseHostCursorNeeded; }
481
482 /** Returns whether mouse is captured. */
483 bool isMouseCaptured() const { return m_fIsMouseCaptured; }
484 /** Returns whether mouse is integrated. */
485 bool isMouseIntegrated() const { return m_fIsMouseIntegrated; }
486 /** Defines whether mouse is @a fCaptured. */
487 void setMouseCaptured(bool fCaptured) { m_fIsMouseCaptured = fCaptured; }
488 /** Defines whether mouse is @a fIntegrated. */
489 void setMouseIntegrated(bool fIntegrated) { m_fIsMouseIntegrated = fIntegrated; }
490
491 /** Returns currently cached mouse cursor shape pixmap. */
492 QPixmap cursorShapePixmap() const { return m_cursorShapePixmap; }
493 /** Returns currently cached mouse cursor mask pixmap. */
494 QPixmap cursorMaskPixmap() const { return m_cursorMaskPixmap; }
495 /** Returns currently cached mouse cursor size. */
496 QSize cursorSize() const { return m_cursorSize; }
497 /** Returns currently cached mouse cursor hotspot. */
498 QPoint cursorHotspot() const { return m_cursorHotspot; }
499 /** Returns currently cached mouse cursor position. */
500 QPoint cursorPosition() const { return m_cursorPosition; }
501
502 /** Returns mouse-state. */
503 int mouseState() const { return m_iMouseState; }
504
505 /** Sends relative mouse move event to VM's mouse. */
506 bool putMouseEvent(long iDx, long iDy, long iDz, long iDw, long iButtonState);
507 /** Sends absolute mouse move event to VM's mouse. */
508 bool putMouseEventAbsolute(long iX, long iY, long iDz, long iDw, long iButtonState);
509 /** Sends multi-touch event to VM's mouse. */
510 bool putEventMultiTouch(long iCount, const QVector<LONG64> &contacts, bool fIsTouchScreen, ulong uScanTime);
511
512 /** Acquires clipboard mode. */
513 bool acquireClipboardMode(KClipboardMode &enmMode);
514 /** Defines clipboard mode. */
515 bool setClipboardMode(KClipboardMode enmMode);
516
517 /** Acquires D&D mode. */
518 bool acquireDnDMode(KDnDMode &enmMode);
519 /** Defines D&D mode. */
520 bool setDnDMode(KDnDMode enmMode);
521 /** @} */
522
523 /** @name Storage stuff.
524 ** @{ */
525 /** Enumerates amount of storage devices. */
526 bool acquireAmountOfStorageDevices(ulong &cHardDisks, ulong &cOpticalDrives, ulong &cFloppyDrives);
527
528 /** Returns a list of storage devices. */
529 bool storageDevices(KDeviceType enmDeviceType, QList<StorageDeviceInfo> &guiStorageDevices);
530
531 /** Acquires encrypted media map. */
532 bool acquireEncryptedMedia(EncryptedMediumMap &media);
533 /** Adds encryption password. */
534 bool addEncryptionPassword(const QString &strId, const QString &strPassword, bool fClearOnSuspend);
535
536 /** Calculates @a cAmount of immutable images. */
537 bool acquireAmountOfImmutableImages(ulong &cAmount);
538
539 /** Attempts to mount medium with @p uMediumId to the machine
540 * if it can find an appropriate controller and port. */
541 bool mountBootMedium(const QUuid &uMediumId);
542
543 /** Prepares storage menu. */
544 void prepareStorageMenu(QMenu *pMenu,
545 QObject *pListener, const char *pszSlotName,
546 const QString &strControllerName, const StorageSlot &storageSlot);
547 /** Updates machine storage with data described by target. */
548 void updateMachineStorage(const UIMediumTarget &target, UIActionPool *pActionPool);
549 /** @} */
550
551 /** @name USB stuff.
552 ** @{ */
553 /** Acquires whether USB controller is enabled. */
554 void acquireWhetherUSBControllerEnabled(bool &fEnabled);
555 /** Acquires whether video input devices are enabled. */
556 void acquireWhetherVideoInputDevicesEnabled(bool &fEnabled);
557
558 /** Returns a list of USB devices. */
559 bool usbDevices(QList<USBDeviceInfo> &guiUSBDevices);
560 /** Attaches USB device with passed @a uId. */
561 bool attachUSBDevice(const QUuid &uId);
562 /** Detaches USB device with passed @a uId. */
563 bool detachUSBDevice(const QUuid &uId);
564
565 /** Returns a list of web cam devices. */
566 bool webcamDevices(QList<WebcamDeviceInfo> &guiWebcamDevices);
567 /** Attaches web cam device with passed @a strName and @a strPath. */
568 bool webcamAttach(const QString &strPath, const QString &strName);
569 /** Detaches web cam device with passed @a strName and @a strPath. */
570 bool webcamDetach(const QString &strPath, const QString &strName);
571 /** @} */
572
573 /** @name Network stuff.
574 ** @{ */
575 /** Acquires whether network adapter is enabled. */
576 bool acquireWhetherNetworkAdapterEnabled(ulong uSlot, bool &fEnabled);
577 /** Acquires whether at leasst one network adapter is enabled. */
578 bool acquireWhetherAtLeastOneNetworkAdapterEnabled(bool &fEnabled);
579 /** Acquires whether network adapter cable is connected. */
580 bool acquireWhetherNetworkCableConnected(ulong uSlot, bool &fConnected);
581 /** Set whether network adapter cable is connected. */
582 bool setNetworkCableConnected(ulong uSlot, bool fConnected);
583 /** @} */
584
585 /** @name Virtualization stuff.
586 ** @{ */
587 /** Returns IMachineDebugger::ExecutionEngine reference. */
588 KVMExecutionEngine vmExecutionEngine() const { return m_enmVMExecutionEngine; }
589
590 /** Returns whether nested-paging CPU hardware virtualization extension is enabled. */
591 bool isHWVirtExNestedPagingEnabled() const { return m_fIsHWVirtExNestedPagingEnabled; }
592 /** Returns whether the VM is currently making use of the unrestricted execution feature of VT-x. */
593 bool isHWVirtExUXEnabled() const { return m_fIsHWVirtExUXEnabled; }
594
595 /** Returns VM's effective paravirtualization provider. */
596 KParavirtProvider paravirtProvider() const { return m_enmParavirtProvider; }
597 /** @} */
598
599 /** @name Status-bar stuff.
600 ** @{ */
601 /** Acquires device activity composing a vector of current @a states for device with @a deviceTypes specified. */
602 bool acquireDeviceActivity(const QVector<KDeviceType> &deviceTypes, QVector<KDeviceActivity> &states);
603
604 /** Acquires status info for hard disk indicator. */
605 void acquireHardDiskStatusInfo(QString &strInfo, bool &fAttachmentsPresent);
606 /** Acquires status info for optical disk indicator. */
607 void acquireOpticalDiskStatusInfo(QString &strInfo, bool &fAttachmentsPresent, bool &fAttachmentsMounted);
608 /** Acquires status info for floppy disk indicator. */
609 void acquireFloppyDiskStatusInfo(QString &strInfo, bool &fAttachmentsPresent, bool &fAttachmentsMounted);
610 /** Acquires status info for audio indicator. */
611 void acquireAudioStatusInfo(QString &strInfo, bool &fAudioEnabled, bool &fEnabledOutput, bool &fEnabledInput);
612 /** Acquires status info for network indicator. */
613 void acquireNetworkStatusInfo(QString &strInfo, bool &fAdaptersPresent, bool &fCablesDisconnected);
614 /** Acquires status info for USB indicator. */
615 void acquireUsbStatusInfo(QString &strInfo, bool &fUsbEnableds);
616 /** Acquires status info for Shared Folders indicator. */
617 void acquireSharedFoldersStatusInfo(QString &strInfo, bool &fFoldersPresent);
618 /** Acquires status info for Display indicator. */
619 void acquireDisplayStatusInfo(QString &strInfo, bool &fAcceleration3D);
620 /** Acquires status info for Recording indicator. */
621 void acquireRecordingStatusInfo(QString &strInfo, bool &fRecordingEnabled, bool &fMachinePaused);
622 /** Acquires status info for Features indicator. */
623 void acquireFeaturesStatusInfo(QString &strInfo, KVMExecutionEngine &enmEngine);
624 /** @} */
625
626 /** @name Debugger stuff.
627 ** @{ */
628 /** Defines whether log is @a fEnabled. */
629 bool setLogEnabled(bool fEnabled);
630 /** Acquires whether log is @a fEnabled. */
631 bool acquireWhetherLogEnabled(bool &fEnabled);
632
633 /** Acquire log folder. */
634 bool acquireLogFolder(QString &strFolder);
635
636 /** Acquires effective CPU @a uLoad. */
637 bool acquireEffectiveCPULoad(ulong &uLoad);
638 /** Acquires uptime @a iUpTime as milliseconds. */
639 bool acquireUptime(LONG64 &iUpTime);
640
641#ifdef VBOX_WITH_DEBUGGER_GUI
642 /** Makes sure debugger GUI is created. */
643 bool dbgCreated(void *pActionDebug);
644 /** Makes sure debugger GUI is destroyed. */
645 void dbgDestroy();
646
647 /** Shows debugger UI statistics window. */
648 void dbgShowStatistics();
649 /** Shows debugger UI command line window. */
650 void dbgShowCommandLine();
651
652 /** Adjusts relative position for debugger window. */
653 void dbgAdjustRelativePos();
654#endif /* VBOX_WITH_DEBUGGER_GUI */
655 /** @} */
656
657 /** @name Close stuff.
658 ** @{ */
659 /** Returns whether VM is in 'manual-override' mode.
660 * @note S.a. #m_fIsManualOverride description for more information. */
661 bool isManualOverrideMode() const { return m_fIsManualOverride; }
662 /** Defines whether VM is in 'manual-override' mode.
663 * @note S.a. #m_fIsManualOverride description for more information. */
664 void setManualOverrideMode(bool fIsManualOverride) { m_fIsManualOverride = fIsManualOverride; }
665
666 /** Returns default close action. */
667 MachineCloseAction defaultCloseAction() const { return m_defaultCloseAction; }
668 /** Returns merged restricted close actions. */
669 MachineCloseAction restrictedCloseActions() const { return m_restrictedCloseActions; }
670
671 /** Acquires whether guest @a fEntered ACPI mode. */
672 bool acquireWhetherGuestEnteredACPIMode(bool &fEntered);
673
674 /** Detaches and closes Runtime UI. */
675 void detachUi();
676 /** Saves VM state, then closes Runtime UI. */
677 void saveState();
678 /** Calls for guest shutdown to close Runtime UI. */
679 void shutdown();
680 /** Powers VM off, then closes Runtime UI. */
681 void powerOff(bool fIncludingDiscard);
682 /** @} */
683
684 /** @name VM information stuff.
685 ** @{ */
686 /** Return general info. of the machine(). */
687 void generateMachineInformationGeneral(const UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral &fOptions,
688 UITextTable &returnTable);
689 /** Return system info. of the machine(). */
690 void generateMachineInformationSystem(const UIExtraDataMetaDefs::DetailsElementOptionTypeSystem &fOptions,
691 UITextTable &returnTable);
692 /** Returns system info. of the machine(). */
693 void generateMachineInformationDisplay(const UIExtraDataMetaDefs::DetailsElementOptionTypeDisplay &fOptions,
694 UITextTable &returnTable);
695 /** Returns storage info. of the machine(). */
696 void generateMachineInformationStorage(const UIExtraDataMetaDefs::DetailsElementOptionTypeStorage &fOptions,
697 UITextTable &returnTable);
698 /** Returns audio info. of the machine(). */
699 void generateMachineInformationAudio(const UIExtraDataMetaDefs::DetailsElementOptionTypeAudio &fOptions,
700 UITextTable &returnTable);
701 /** Returns network info. of the machine(). */
702 void generateMachineInformationNetwork(const UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork &fOptions,
703 UITextTable &returnTable);
704 /** Returns serial info. of the machine(). */
705 void generateMachineInformationSerial(const UIExtraDataMetaDefs::DetailsElementOptionTypeSerial &fOptions,
706 UITextTable &returnTable);
707 /** Returns USB info. of the machine(). */
708 void generateMachineInformationUSB(const UIExtraDataMetaDefs::DetailsElementOptionTypeUsb &fOptions,
709 UITextTable &returnTable);
710 /** Returns shared folders info. of the machine(). */
711 void generateMachineInformationSharedFolders(const UIExtraDataMetaDefs::DetailsElementOptionTypeSharedFolders &fOptions,
712 UITextTable &returnTable);
713 /** @} */
714
715public slots:
716
717 /** @name Guest additions stuff.
718 ** @{ */
719 /** Handles request to install guest additions image.
720 * @param strSource Brings the source of image being installed. */
721 void sltInstallGuestAdditionsFrom(const QString &strSource);
722 /** Mounts DVD adhoc.
723 * @param strSource Brings the source of image being mounted. */
724 void sltMountDVDAdHoc(const QString &strSource);
725 /** @} */
726
727 /** @name Keyboard stuff.
728 ** @{ */
729 /** Defines @a iKeyboardState. */
730 void setKeyboardState(int iKeyboardState) { m_iKeyboardState = iKeyboardState; emit sigKeyboardStateChange(m_iKeyboardState); }
731 /** @} */
732
733 /** @name Mouse stuff.
734 ** @{ */
735 /** Defines @a iMouseState. */
736 void setMouseState(int iMouseState) { m_iMouseState = iMouseState; emit sigMouseStateChange(m_iMouseState); }
737 /** @} */
738
739 /** @name Close stuff.
740 ** @{ */
741 /** Closes Runtime UI. */
742 void closeRuntimeUI();
743 /** @} */
744
745private slots:
746
747 /** Visual state-change handler. */
748 void sltChangeVisualState(UIVisualStateType enmVisualStateType);
749
750 /** @name COM events stuff.
751 ** @{ */
752 /** Handles additions state actual change signal. */
753 void sltHandleAdditionsActualChange();
754 /** Handles audio adapter change signal. */
755 void sltHandleAudioAdapterChange();
756 /** Handles recording change signal. */
757 void sltHandleRecordingChange();
758 /** Handles storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
759 void sltHandleStorageDeviceChange(const CMediumAttachment &comAttachment, bool fRemoved, bool fSilent);
760 /** Handles VRDE change signal. */
761 void sltHandleVRDEChange();
762 /** @} */
763
764 /** @name Actions stuff.
765 ** @{ */
766#ifdef VBOX_WS_MAC
767 /** macOS X: Handles menu-bar configuration-change. */
768 void sltHandleMenuBarConfigurationChange(const QUuid &uMachineID);
769#endif
770 /** @} */
771
772 /** @name Host-screen stuff.
773 ** @{ */
774 /** Handles host-screen count change. */
775 void sltHandleHostScreenCountChange();
776 /** Handles host-screen geometry change. */
777 void sltHandleHostScreenGeometryChange();
778 /** Handles host-screen available-area change. */
779 void sltHandleHostScreenAvailableAreaChange();
780
781#ifdef VBOX_WS_MAC
782 /** macOS X: Restarts display-reconfiguration watchdog timer from the beginning.
783 * @note Watchdog is trying to determine display reconfiguration in
784 * UISession::sltCheckIfHostDisplayChanged() slot every 500ms for 40 tries. */
785 void sltHandleHostDisplayAboutToChange();
786 /** MacOS X: Determines display reconfiguration.
787 * @note Calls for UISession::sltHandleHostScreenCountChange() if screen count changed.
788 * @note Calls for UISession::sltHandleHostScreenGeometryChange() if screen geometry changed. */
789 void sltCheckIfHostDisplayChanged();
790#endif /* VBOX_WS_MAC */
791 /** @} */
792
793 /** @name Guest-screen stuff.
794 ** @{ */
795 /** Handles guest-monitor state change. */
796 void sltHandleGuestMonitorChange(KGuestMonitorChangedEventType enmChangeType, ulong uScreenId, QRect screenGeo);
797 /** @} */
798
799 /** @name Keyboard stuff.
800 ** @{ */
801 /** Handles signal about keyboard LEDs change.
802 * @param fNumLock Brings NUM lock status.
803 * @param fCapsLock Brings CAPS lock status.
804 * @param fScrollLock Brings SCROLL lock status. */
805 void sltHandleKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
806
807 /** Handles signal about keyboard LEDs sync state change.
808 * @param fEnabled Brings sync status. */
809 void sltHidLedsSyncStateChanged(bool fEnabled) { m_fIsHidLedsSyncEnabled = fEnabled; }
810 /** @} */
811
812 /** @name Mouse stuff.
813 ** @{ */
814 /** Handles signal about mouse pointer shape data change.
815 * @param shapeData Brings complex struct describing mouse pointer shape aspects. */
816 void sltMousePointerShapeChange(const UIMousePointerShapeData &shapeData);
817 /** Handles signal about mouse capability change.
818 * @param fSupportsAbsolute Brings whether mouse supports absolute coordinates.
819 * @param fSupportsRelative Brings whether mouse supports relative coordinates.
820 * @param fSupportsTouchScreen Brings whether touch screen is supported.
821 * @param fSupportsTouchPad Brings whether touch pad is supported.
822 * @param fNeedsHostCursor Brings whether guest requires host cursor to be shown. */
823 void sltMouseCapabilityChange(bool fSupportsAbsolute, bool fSupportsRelative,
824 bool fSupportsTouchScreen, bool fSupportsTouchPad,
825 bool fNeedsHostCursor);
826 /** Handles signal about guest request to change the cursor position to @a uX * @a uY.
827 * @param fContainsData Brings whether the @a uX and @a uY values are valid and could be used by the GUI now.
828 * @param uX Brings cursor position X origin.
829 * @param uY Brings cursor position Y origin. */
830 void sltCursorPositionChange(bool fContainsData,
831 unsigned long uX,
832 unsigned long uY);
833 /** @} */
834
835private:
836
837 /** Constructs machine UI singleton. */
838 UIMachine();
839 /** Destructs machine UI singleton. */
840 virtual ~UIMachine() RT_OVERRIDE;
841
842 /** Prepare routine. */
843 bool prepare();
844 /** Prepares notification-center. */
845 void prepareNotificationCenter();
846 /** Prepare routine: Session stuff. */
847 bool prepareSession();
848 /** Prepare routine: Actions stuff. */
849 void prepareActions();
850 /** Prepare routine: Host-screen data stuff. */
851 void prepareHostScreenData();
852 /** Prepare routine: Keyboard stuff. */
853 void prepareKeyboard();
854 /** Prepare routine: Close stuff. */
855 void prepareClose();
856 /** Prepare routine: Visual-state stuff. */
857 void prepareVisualState();
858
859 /** Update routine: Branding. */
860 void updateBranding();
861 /** Update routine: Guest screen data stuff. */
862 void updateGuestScreenData();
863
864 /** Moves VM to initial state. */
865 void enterInitialVisualState();
866
867 /** Cleanup routine: Machine-logic stuff. */
868 void cleanupMachineLogic();
869 /** Cleanup routine: Branding. */
870 void cleanupBranding();
871 /** Cleanup routine: Host-screen data stuff. */
872 void cleanupHostScreenData();
873 /** Cleanup routine: Actions stuff. */
874 void cleanupActions();
875 /** Cleanup routine: Session stuff. */
876 void cleanupSession();
877 /** Cleanups notification-center. */
878 void cleanupNotificationCenter();
879 /** Cleanup routine. */
880 void cleanup();
881
882 /** @name Actions stuff.
883 ** @{ */
884 /** Updates action restrictions. */
885 void updateActionRestrictions();
886
887#ifdef VBOX_WS_MAC
888 /** macOS X: Updates menu-bar content. */
889 void updateMenu();
890#endif
891 /** @} */
892
893 /** @name Host-screen stuff.
894 ** @{ */
895 /** Update host-screen data. */
896 void updateHostScreenData();
897 /** @} */
898
899 /** @name Mouse stuff.
900 ** @{ */
901 /** Updates mouse pointer shape. */
902 void updateMousePointerShape();
903
904 /** Updates mouse states. */
905 void updateMouseState();
906
907#if defined(VBOX_WS_NIX) || defined(VBOX_WS_MAC)
908 /** Generate a BGRA bitmap which approximates a XOR/AND mouse pointer.
909 *
910 * Pixels which has 1 in the AND mask and not 0 in the XOR mask are replaced by
911 * the inverted pixel and 8 surrounding pixels with the original color.
912 * Fort example a white pixel (W) is replaced with a black (B) pixel:
913 * WWW
914 * W -> WBW
915 * WWW
916 * The surrounding pixels are written only if the corresponding source pixel
917 * does not affect the screen, i.e. AND bit is 1 and XOR value is 0. */
918 static void renderCursorPixels(const uint32_t *pu32XOR, const uint8_t *pu8AND,
919 uint32_t u32Width, uint32_t u32Height,
920 uint32_t *pu32Pixels, uint32_t cbPixels);
921#endif /* VBOX_WS_NIX || VBOX_WS_MAC */
922
923#ifdef VBOX_WS_WIN
924 /** Windows: Returns whether pointer of 1bpp depth. */
925 static bool isPointer1bpp(const uint8_t *pu8XorMask,
926 uint uWidth,
927 uint uHeight);
928#endif /* VBOX_WS_WIN */
929 /** @} */
930
931 /** @name Virtualization stuff.
932 ** @{ */
933 /** Updates virtualization state. */
934 void updateVirtualizationState();
935 /** @} */
936
937 /** Holds the static instance. */
938 static UIMachine *s_pInstance;
939
940 /** Holds whether machine is initialized. */
941 bool m_fInitialized;
942
943 /** Holds the session UI instance. */
944 UISession *m_pSession;
945
946 /** Holds allowed visual states. */
947 UIVisualStateType m_enmAllowedVisualStates;
948 /** Holds initial visual state. */
949 UIVisualStateType m_enmInitialVisualState;
950 /** Holds current visual state. */
951 UIVisualStateType m_enmVisualState;
952 /** Holds visual state which should be entered when possible. */
953 UIVisualStateType m_enmRequestedVisualState;
954 /** Holds current machine-logic. */
955 UIMachineLogic *m_pMachineLogic;
956
957 /** @name Branding stuff.
958 ** @{ */
959 /** Holds the cached machine-window icon. */
960 QIcon *m_pMachineWindowIcon;
961
962#ifndef VBOX_WS_MAC
963 /** Holds redefined machine-window name postfix. */
964 QString m_strMachineWindowNamePostfix;
965#endif
966 /** @} */
967
968 /** @name Actions stuff.
969 ** @{ */
970 /** Holds the action-pool instance. */
971 UIActionPool *m_pActionPool;
972
973#ifdef VBOX_WS_MAC
974 /** macOS X: Holds the menu-bar instance. */
975 QMenuBar *m_pMenuBar;
976#endif
977 /** @} */
978
979 /** @name Host-screen stuff.
980 ** @{ */
981 /** Holds the list of host-screen geometries we currently have. */
982 QList<QRect> m_hostScreens;
983
984#ifdef VBOX_WS_MAC
985 /** macOS X: Watchdog timer looking for display reconfiguration. */
986 QTimer *m_pWatchdogDisplayChange;
987#endif
988 /** @} */
989
990 /** @name Guest-screen stuff.
991 ** @{ */
992 /** Holds the list of desired guest-screen visibility flags. */
993 QVector<bool> m_guestScreenVisibilityVectorHostDesires;
994 /** Holds the list of actual guest-screen visibility flags. */
995 QVector<bool> m_guestScreenVisibilityVector;
996
997 /** Holds the list of guest-screen full-screen sizes. */
998 QVector<QSize> m_monitorLastFullScreenSizeVector;
999
1000 /** Holds whether guest screen resize should be ignored. */
1001 bool m_fIsGuestResizeIgnored;
1002 /** @} */
1003
1004 /** @name Keyboard stuff.
1005 ** @{ */
1006 /** Holds the NUM lock status. */
1007 bool m_fNumLock;
1008 /** Holds the CAPS lock status. */
1009 bool m_fCapsLock;
1010 /** Holds the SCROLL lock status. */
1011 bool m_fScrollLock;
1012
1013 /** Holds the NUM lock adaption count. */
1014 uint m_uNumLockAdaptionCnt;
1015 /** Holds the CAPS lock adaption count. */
1016 uint m_uCapsLockAdaptionCnt;
1017
1018 /** Holds whether VM should perform HID LEDs synchronization. */
1019 bool m_fIsHidLedsSyncEnabled;
1020
1021 /** Holds whether auto-capture is disabled. */
1022 bool m_fIsAutoCaptureDisabled;
1023
1024 /** Holds the keyboard-state. */
1025 int m_iKeyboardState;
1026 /** @} */
1027
1028 /** @name Mouse stuff.
1029 ** @{ */
1030 /** Holds whether we should hide host mouse pointer. */
1031 bool m_fIsHidingHostPointer;
1032 /** Holds whether there is valid mouse pointer shape present. */
1033 bool m_fIsValidPointerShapePresent;
1034 /** Holds whether the @a m_cursorPosition is valid and could be used by the GUI now. */
1035 bool m_fIsValidCursorPositionPresent;
1036
1037 /** Holds whether mouse supports absolute coordinates. */
1038 bool m_fIsMouseSupportsAbsolute;
1039 /** Holds whether mouse supports relative coordinates. */
1040 bool m_fIsMouseSupportsRelative;
1041 /** Holds whether touch screen is supported. */
1042 bool m_fIsMouseSupportsTouchScreen;
1043 /** Holds whether touch pad is supported. */
1044 bool m_fIsMouseSupportsTouchPad;
1045 /** Holds whether guest requires host cursor to be shown. */
1046 bool m_fIsMouseHostCursorNeeded;
1047
1048 /** Holds whether mouse is captured. */
1049 bool m_fIsMouseCaptured;
1050 /** Holds whether mouse is integrated. */
1051 bool m_fIsMouseIntegrated;
1052
1053 /** Holds the mouse pointer shape data. */
1054 UIMousePointerShapeData m_shapeData;
1055
1056 /** Holds cached mouse cursor shape pixmap. */
1057 QPixmap m_cursorShapePixmap;
1058 /** Holds cached mouse cursor mask pixmap. */
1059 QPixmap m_cursorMaskPixmap;
1060 /** Holds cached mouse cursor size. */
1061 QSize m_cursorSize;
1062 /** Holds cached mouse cursor hotspot. */
1063 QPoint m_cursorHotspot;
1064 /** Holds cached mouse cursor position. */
1065 QPoint m_cursorPosition;
1066
1067 /** Holds the mouse-state. */
1068 int m_iMouseState;
1069 /** @} */
1070
1071 /** @name Virtualization stuff.
1072 ** @{ */
1073 /** Holds the IMachineDebugger::ExecutionEngine reference. */
1074 KVMExecutionEngine m_enmVMExecutionEngine;
1075
1076 /** Holds whether nested-paging CPU hardware virtualization extension is enabled. */
1077 bool m_fIsHWVirtExNestedPagingEnabled;
1078 /** Holds whether the VM is currently making use of the unrestricted execution feature of VT-x. */
1079 bool m_fIsHWVirtExUXEnabled;
1080
1081 /** Holds the VM's effective paravirtualization provider. */
1082 KParavirtProvider m_enmParavirtProvider;
1083 /** @} */
1084
1085 /** @name Close stuff.
1086 ** @{ */
1087 /** Holds whether VM is in 'manual-override' mode
1088 * which means there will be no automatic UI shutdowns,
1089 * visual representation mode changes and other stuff. */
1090 bool m_fIsManualOverride : 1;
1091
1092 /** Default close action. */
1093 MachineCloseAction m_defaultCloseAction;
1094 /** Merged restricted close actions. */
1095 MachineCloseAction m_restrictedCloseActions;
1096 /** @} */
1097};
1098
1099#define gpMachine UIMachine::instance()
1100
1101#endif /* !FEQT_INCLUDED_SRC_runtime_UIMachine_h */
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use