Changeset 98699 in vbox
- Timestamp:
- Feb 23, 2023 9:43:09 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155999
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98691 r98699 515 515 { 516 516 return uisession()->acquireSavedScreenshotInfo(uScreenId, uWidth, uHeight, formats); 517 } 518 519 bool UIMachine::acquireSavedScreenshot(ulong uScreenId, KBitmapFormat enmFormat, 520 ulong &uWidth, ulong &uHeight, QVector<BYTE> &screenshot) 521 { 522 return uisession()->acquireSavedScreenshot(uScreenId, enmFormat, 523 uWidth, uHeight, screenshot); 517 524 } 518 525 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98691 r98699 319 319 /** Acquires saved screen-shot info for guest-screen with passed uScreenId. */ 320 320 bool acquireSavedScreenshotInfo(ulong uScreenId, ulong &uWidth, ulong &uHeight, QVector<KBitmapFormat> &formats); 321 /** Acquires saved screen-shot for guest-screen with passed uScreenId. */ 322 bool acquireSavedScreenshot(ulong uScreenId, KBitmapFormat enmFormat, 323 ulong &uWidth, ulong &uHeight, QVector<BYTE> &screenshot); 321 324 /** Notifies guest-screen with passed uScreenId about scale-factor change. */ 322 325 bool notifyScaleFactorChange(ulong uScreenId, ulong uScaleFactorWMultiplied, ulong uScaleFactorHMultiplied); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r98691 r98699 1631 1631 { 1632 1632 /* Acquire the screen-data from the saved-state: */ 1633 ULONG uWidth = 0, uHeight = 0; 1634 const QVector<BYTE> screenData = machine().ReadSavedScreenshotToArray(0, KBitmapFormat_PNG, uWidth, uHeight); 1635 1636 /* Make sure there is saved-state screen-data: */ 1633 ulong uDummy = 0; 1634 QVector<BYTE> screenData; 1635 uimachine()->acquireSavedScreenshot(m_uScreenId, KBitmapFormat_PNG, uDummy, uDummy, screenData); 1637 1636 if (screenData.isEmpty()) 1638 1637 return; … … 1656 1655 1657 1656 /* Dim screen-shot if it is Ok: */ 1658 if ( machine().isOk() &&!screenShot.isNull())1657 if (!screenShot.isNull()) 1659 1658 dimImage(screenShot); 1660 1659 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98691 r98699 877 877 } 878 878 879 bool UISession::acquireSavedScreenshot(ulong uScreenId, KBitmapFormat enmFormat, 880 ulong &uWidth, ulong &uHeight, QVector<BYTE> &screenshot) 881 { 882 CMachine comMachine = machine(); 883 ULONG uGuestWidth = 0, uGuestHeight = 0; 884 const QVector<BYTE> guestScreenshot = comMachine.ReadSavedScreenshotToArray(uScreenId, enmFormat, 885 uGuestWidth, uGuestHeight); 886 const bool fSuccess = comMachine.isOk(); 887 if (!fSuccess) 888 UINotificationMessage::cannotAcquireMachineParameter(comMachine); 889 else 890 { 891 uWidth = uGuestWidth; 892 uHeight = uGuestHeight; 893 screenshot = guestScreenshot; 894 } 895 return fSuccess; 896 } 897 879 898 bool UISession::notifyScaleFactorChange(ulong uScreenId, ulong uScaleFactorWMultiplied, ulong uScaleFactorHMultiplied) 880 899 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98691 r98699 366 366 /** Acquires saved screen-shot info for guest-screen with passed uScreenId. */ 367 367 bool acquireSavedScreenshotInfo(ulong uScreenId, ulong &uWidth, ulong &uHeight, QVector<KBitmapFormat> &formats); 368 /** Acquires saved screen-shot for guest-screen with passed uScreenId. */ 369 bool acquireSavedScreenshot(ulong uScreenId, KBitmapFormat enmFormat, 370 ulong &uWidth, ulong &uHeight, QVector<BYTE> &screenshot); 368 371 /** Notifies guest-screen with passed uScreenId about scale-factor change. */ 369 372 bool notifyScaleFactorChange(ulong uScreenId, ulong uScaleFactorWMultiplied, ulong uScaleFactorHMultiplied);
Note:
See TracChangeset
for help on using the changeset viewer.