Changeset 98938 in vbox
- Timestamp:
- Mar 13, 2023 3:47:28 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156276
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r98811 r98938 841 841 QApplication::translate("UIMessageCenter", "Failed to acquire update agent parameter.") + 842 842 UIErrorString::formatErrorInfo(comAgent)); 843 } 844 845 /* static */ 846 void UINotificationMessage::cannotAcquireMouseParameter(const CMouse &comMouse) 847 { 848 createMessage( 849 QApplication::translate("UIMessageCenter", "Mouse failure ..."), 850 QApplication::translate("UIMessageCenter", "Failed to acquire mouse parameter.") + 851 UIErrorString::formatErrorInfo(comMouse)); 843 852 } 844 853 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r98811 r98938 358 358 * @param comAgent Brings the object parameter get acquired from. */ 359 359 static void cannotAcquireUpdateAgentParameter(const CUpdateAgent &comAgent); 360 /** Notifies about inability to acquire IMouse parameter. 361 * @param comMouse Brings the object parameter get acquired from. */ 362 static void cannotAcquireMouseParameter(const CMouse &comMouse); 360 363 /** Notifies about inability to acquire IEmulatedUSB parameter. 361 364 * @param comDispatcher Brings the object parameter get acquired from. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98926 r98938 2180 2180 void UIMachine::updateMouseState() 2181 2181 { 2182 m_fIsMouseSupportsAbsolute = uisession()->getAbsoluteSupported();2183 m_fIsMouseSupportsRelative = uisession()->getRelativeSupported();2184 m_fIsMouseSupportsTouchScreen = uisession()->getTouchScreenSupported();2185 m_fIsMouseSupportsTouchPad = uisession()->getTouchPadSupported();2186 m_fIsMouseHostCursorNeeded = uisession()->getNeedsHostCursor();2182 uisession()->acquireWhetherAbsoluteSupported(m_fIsMouseSupportsAbsolute); 2183 uisession()->acquireWhetherRelativeSupported(m_fIsMouseSupportsRelative); 2184 uisession()->acquireWhetherTouchScreenSupported(m_fIsMouseSupportsTouchScreen); 2185 uisession()->acquireWhetherTouchPadSupported(m_fIsMouseSupportsTouchPad); 2186 uisession()->acquireWhetherNeedsHostCursor(m_fIsMouseHostCursorNeeded); 2187 2187 } 2188 2188 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98903 r98938 465 465 } 466 466 467 bool UISession::getAbsoluteSupported() 468 { 469 return mouse().GetAbsoluteSupported(); 470 } 471 472 bool UISession::getRelativeSupported() 473 { 474 return mouse().GetRelativeSupported(); 475 } 476 477 bool UISession::getTouchScreenSupported() 478 { 479 return mouse().GetTouchScreenSupported(); 480 } 481 482 bool UISession::getTouchPadSupported() 483 { 484 return mouse().GetTouchPadSupported(); 485 } 486 487 bool UISession::getNeedsHostCursor() 488 { 489 return mouse().GetNeedsHostCursor(); 467 bool UISession::acquireWhetherAbsoluteSupported(bool &fSupported) 468 { 469 CMouse comMouse = mouse(); 470 const BOOL fAbsoluteSupported = comMouse.GetAbsoluteSupported(); 471 const bool fSuccess = comMouse.isOk(); 472 if (!fSuccess) 473 UINotificationMessage::cannotAcquireMouseParameter(comMouse); 474 else 475 fSupported = fAbsoluteSupported == TRUE; 476 return fSuccess; 477 } 478 479 bool UISession::acquireWhetherRelativeSupported(bool &fSupported) 480 { 481 CMouse comMouse = mouse(); 482 const BOOL fRelativeSupported = comMouse.GetRelativeSupported(); 483 const bool fSuccess = comMouse.isOk(); 484 if (!fSuccess) 485 UINotificationMessage::cannotAcquireMouseParameter(comMouse); 486 else 487 fSupported = fRelativeSupported == TRUE; 488 return fSuccess; 489 } 490 491 bool UISession::acquireWhetherTouchScreenSupported(bool &fSupported) 492 { 493 CMouse comMouse = mouse(); 494 const BOOL fTouchScreenSupported = comMouse.GetTouchScreenSupported(); 495 const bool fSuccess = comMouse.isOk(); 496 if (!fSuccess) 497 UINotificationMessage::cannotAcquireMouseParameter(comMouse); 498 else 499 fSupported = fTouchScreenSupported == TRUE; 500 return fSuccess; 501 } 502 503 bool UISession::acquireWhetherTouchPadSupported(bool &fSupported) 504 { 505 CMouse comMouse = mouse(); 506 const BOOL fTouchPadSupported = comMouse.GetTouchPadSupported(); 507 const bool fSuccess = comMouse.isOk(); 508 if (!fSuccess) 509 UINotificationMessage::cannotAcquireMouseParameter(comMouse); 510 else 511 fSupported = fTouchPadSupported == TRUE; 512 return fSuccess; 513 } 514 515 bool UISession::acquireWhetherNeedsHostCursor(bool &fNeeds) 516 { 517 CMouse comMouse = mouse(); 518 const BOOL fNeedsHostCursor = comMouse.GetNeedsHostCursor(); 519 const bool fSuccess = comMouse.isOk(); 520 if (!fSuccess) 521 UINotificationMessage::cannotAcquireMouseParameter(comMouse); 522 else 523 fNeeds = fNeedsHostCursor == TRUE; 524 return fSuccess; 490 525 } 491 526 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98903 r98938 288 288 ** @{ */ 289 289 /** Returns whether VM's mouse supports absolute coordinates. */ 290 bool getAbsoluteSupported();290 bool acquireWhetherAbsoluteSupported(bool &fSupported); 291 291 /** Returns whether VM's mouse supports relative coordinates. */ 292 bool getRelativeSupported();292 bool acquireWhetherRelativeSupported(bool &fSupported); 293 293 /** Returns whether VM's mouse supports touch screen device. */ 294 bool getTouchScreenSupported();294 bool acquireWhetherTouchScreenSupported(bool &fSupported); 295 295 /** Returns whether VM's mouse supports touch pad device. */ 296 bool getTouchPadSupported();296 bool acquireWhetherTouchPadSupported(bool &fSupported); 297 297 /** Returns whether VM's mouse requires host cursor. */ 298 bool getNeedsHostCursor();298 bool acquireWhetherNeedsHostCursor(bool &fNeeds); 299 299 300 300 /** Sends relative mouse move event to VM's mouse. */
Note:
See TracChangeset
for help on using the changeset viewer.