VirtualBox

Ignore:
Timestamp:
Jun 5, 2014 2:38:31 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94206
Message:

DnD: Added support for dynamically managing formats on the host.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r51489 r51556  
    9292}
    9393
    94 // implementation of wrapped private getters/setters for attributes
     94// implementation of wrapped IDnDBase methods.
     95/////////////////////////////////////////////////////////////////////////////
     96
     97HRESULT GuestDnDSource::isFormatSupported(const com::Utf8Str &aFormat,
     98                                          BOOL *aSupported)
     99{
     100#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     101    ReturnComNotImplemented();
     102#else /* VBOX_WITH_DRAG_AND_DROP */
     103
     104    return GuestDnDBase::isFormatSupported(aFormat, aSupported);
     105#endif /* VBOX_WITH_DRAG_AND_DROP */
     106}
     107
     108HRESULT GuestDnDSource::getFormats(std::vector<com::Utf8Str> &aFormats)
     109{
     110#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     111    ReturnComNotImplemented();
     112#else /* VBOX_WITH_DRAG_AND_DROP */
     113
     114    return GuestDnDBase::getFormats(aFormats);
     115#endif /* VBOX_WITH_DRAG_AND_DROP */
     116}
     117
     118HRESULT GuestDnDSource::addFormats(const std::vector<com::Utf8Str> &aFormats)
     119{
     120#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     121    ReturnComNotImplemented();
     122#else /* VBOX_WITH_DRAG_AND_DROP */
     123
     124    return GuestDnDBase::addFormats(aFormats);
     125#endif /* VBOX_WITH_DRAG_AND_DROP */
     126}
     127
     128HRESULT GuestDnDSource::removeFormats(const std::vector<com::Utf8Str> &aFormats)
     129{
     130#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     131    ReturnComNotImplemented();
     132#else /* VBOX_WITH_DRAG_AND_DROP */
     133
     134    return GuestDnDBase::removeFormats(aFormats);
     135#endif /* VBOX_WITH_DRAG_AND_DROP */
     136}
     137
     138// implementation of wrapped IDnDTarget methods.
    95139/////////////////////////////////////////////////////////////////////////////
    96140
     
    135179                defaultAction = GuestDnD::toMainAction(pResp->defAction());
    136180
    137                 GuestDnD::toFormatVector(GuestDnDInst()->supportedFormats(),
    138                                          pResp->format(), aFormats);
     181                GuestDnD::toFormatVector(m_strFormats, pResp->format(), aFormats);
    139182                GuestDnD::toMainActions(pResp->allActions(), aAllowedActions);
    140183            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette