Changeset 85681 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 11, 2020 9:36:37 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.cpp
r85455 r85681 188 188 } 189 189 190 /**191 * Retrieves the data stored in this object and store the result in192 * pMedium.193 *194 * @return IPRT status code.195 * @return HRESULT196 * @param pFormatEtc197 * @param pMedium198 */199 190 STDMETHODIMP UIDnDDataObject::GetData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium) 200 191 { … … 512 503 } 513 504 514 /**515 * Only required for IStream / IStorage interfaces.516 *517 * @return IPRT status code.518 * @return HRESULT519 * @param pFormatEtc520 * @param pMedium521 */522 505 STDMETHODIMP UIDnDDataObject::GetDataHere(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium) 523 506 { … … 527 510 } 528 511 529 /**530 * Query if this objects supports a specific format.531 *532 * @return IPRT status code.533 * @return HRESULT534 * @param pFormatEtc535 */536 512 STDMETHODIMP UIDnDDataObject::QueryGetData(LPFORMATETC pFormatEtc) 537 513 { … … 594 570 */ 595 571 572 /** 573 * Aborts waiting for data being "dropped". 574 * 575 * @returns VBox status code. 576 */ 596 577 int UIDnDDataObject::Abort(void) 597 578 { … … 601 582 } 602 583 584 /** 585 * Static helper function to convert a CLIPFORMAT to a string and return it. 586 * 587 * @returns Pointer to converted stringified CLIPFORMAT, or "unknown" if not found / invalid. 588 * @param fmt CLIPFORMAT to return string for. 589 */ 603 590 /* static */ 604 591 const char* UIDnDDataObject::ClipboardFormatToString(CLIPFORMAT fmt) … … 682 669 } 683 670 671 /** 672 * Checks whether a given FORMATETC is supported by this data object and returns its index. 673 * 674 * @returns \c true if format is supported, \c false if not. 675 * @param pFormatEtc Pointer to FORMATETC to check for. 676 * @param puIndex Where to store the index if format is supported. 677 */ 684 678 bool UIDnDDataObject::LookupFormatEtc(LPFORMATETC pFormatEtc, ULONG *puIndex) 685 679 { … … 712 706 } 713 707 708 /** 709 * Registers a new format with this data object. 710 * 711 * @param pFormatEtc Where to store the new format into. 712 * @param clipFormat Clipboard format to register. 713 * @param tyMed Format medium type to register. 714 * @param lIndex Format index to register. 715 * @param dwAspect Format aspect to register. 716 * @param pTargetDevice Format target device to register. 717 */ 714 718 void UIDnDDataObject::RegisterFormat(LPFORMATETC pFormatEtc, CLIPFORMAT clipFormat, 715 719 TYMED tyMed, LONG lIndex, DWORD dwAspect, … … 728 732 } 729 733 734 /** 735 * Sets the current status of this data object. 736 * 737 * @param enmStatus New status to set. 738 */ 730 739 void UIDnDDataObject::SetStatus(DnDDataObjectStatus enmStatus) 731 740 { … … 734 743 } 735 744 745 /** 746 * Signals that data has been "dropped". 747 * 748 ** @todo r=andy Remove? 749 */ 736 750 void UIDnDDataObject::Signal(void) 737 751 { … … 739 753 } 740 754 755 /** 756 * Signals that data has been "dropped". 757 * 758 * @returns VBox status code. 759 * @param strFormat Format of data (MIME string). 760 * @param pvData Pointer to data. 761 * @param cbData Size (in bytes) of data. 762 */ 741 763 int UIDnDDataObject::Signal(const QString &strFormat, 742 764 const void *pvData, uint32_t cbData) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDataObject_win.h
r82968 r85681 95 95 /** Internal reference count of this object. */ 96 96 LONG m_cRefs; 97 /** Number of native formats registered. This can be a different number than supplied with m lstFormats. */97 /** Number of native formats registered. This can be a different number than supplied with m_lstFormats. */ 98 98 ULONG m_cFormats; 99 /** Array of registered FORMATETC structs. Matches m_cFormats. */ 99 100 FORMATETC *m_pFormatEtc; 101 /** Array of registered STGMEDIUM structs. Matches m_cFormats. */ 100 102 STGMEDIUM *m_pStgMedium; 103 /** Event semaphore used for waiting on status changes. */ 101 104 RTSEMEVENT m_SemEvent; 105 /** List of supported formats. */ 102 106 QStringList m_lstFormats; 107 /** Format of currently retrieved data. */ 103 108 QString m_strFormat; 104 109 /** The retrieved data as a QVariant. Needed for buffering in case a second format needs the same data, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDDropSource_win.h
r82968 r85681 56 56 /** Pointer to parent widget. */ 57 57 QWidget *m_pParent; 58 /** Pointer to current data object. */ 58 59 UIDnDDataObject *m_pDataObject; 59 60 /** The current reference count. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.cpp
r85475 r85681 601 601 QVector<uint8_t> &vecData) 602 602 { 603 /** @todo r=andy Locking required? */ 604 603 605 if (!strMIMEType.compare("application/x-qt-mime-type-name", Qt::CaseInsensitive)) 604 606 return VINF_SUCCESS; … … 713 715 } 714 716 717 /** 718 * Sets the current DnD operation mode. 719 * 720 * Note: Only one mode (guest->host *or* host->guest) can be active at the same time. 721 * 722 * @param enmMode Current operation mode to set. 723 */ 715 724 void UIDnDHandler::setOpMode(DNDOPMODE enmMode) 716 725 { 717 726 QMutexLocker AutoWriteLock(&m_WriteLock); 727 728 /** @todo r=andy Check for old (current) mode and refuse new mode? */ 729 718 730 m_enmOpMode = enmMode; 719 731 LogFunc(("Operation mode is now: %RU32\n", m_enmOpMode)); … … 734 746 */ 735 747 748 /** 749 * Static helper function to convert a Qt drop action to an internal DnD drop action. 750 * 751 * @returns Converted internal drop action. 752 * @param action Qt drop action to convert. 753 */ 736 754 /* static */ 737 755 KDnDAction UIDnDHandler::toVBoxDnDAction(Qt::DropAction action) … … 747 765 } 748 766 767 /** 768 * Static helper function to convert Qt drop actions to internal DnD drop actions. 769 * 770 * @returns Vector of converted internal drop actions. 771 * @param actions Qt drop actions to convert. 772 */ 749 773 /* static */ 750 774 QVector<KDnDAction> UIDnDHandler::toVBoxDnDActions(Qt::DropActions actions) … … 763 787 } 764 788 789 /** 790 * Static helper function to convert an internal drop action to a Qt drop action. 791 * 792 * @returns Converted Qt drop action. 793 * @param actions Internal drop action to convert. 794 */ 765 795 /* static */ 766 796 Qt::DropAction UIDnDHandler::toQtDnDAction(KDnDAction action) … … 778 808 } 779 809 810 /** 811 * Static helper function to convert a vector of internal drop actions to Qt drop actions. 812 * 813 * @returns Converted Qt drop actions. 814 * @param vecActions Internal drop actions to convert. 815 */ 780 816 /* static */ 781 817 Qt::DropActions UIDnDHandler::toQtDnDActions(const QVector<KDnDAction> &vecActions) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIDnDHandler.h
r82968 r85681 38 38 class UISession; 39 39 40 /** 41 * Main class for implementing Drag'n'Drop in the frontend. 42 */ 40 43 class UIDnDHandler: public QObject 41 44 {
Note:
See TracChangeset
for help on using the changeset viewer.