VirtualBox

忽略:
時間撮記:
2014-6-5 下午02:38:31 (10 年 以前)
作者:
vboxsync
訊息:

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

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r51489 r51556  
    2626#include "AutoCaller.h"
    2727
     28#include <algorithm> /* For std::find(). */
    2829#include <iprt/cpp/utils.h> /* For unconst(). */
    2930
     
    9091}
    9192
    92 // implementation of wrapped private getters/setters for attributes
     93// implementation of wrapped IDnDBase methods.
     94/////////////////////////////////////////////////////////////////////////////
     95
     96HRESULT GuestDnDTarget::isFormatSupported(const com::Utf8Str &aFormat,
     97                                          BOOL *aSupported)
     98{
     99#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     100    ReturnComNotImplemented();
     101#else /* VBOX_WITH_DRAG_AND_DROP */
     102
     103    return GuestDnDBase::isFormatSupported(aFormat, aSupported);
     104#endif /* VBOX_WITH_DRAG_AND_DROP */
     105}
     106
     107HRESULT GuestDnDTarget::getFormats(std::vector<com::Utf8Str> &aFormats)
     108{
     109#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     110    ReturnComNotImplemented();
     111#else /* VBOX_WITH_DRAG_AND_DROP */
     112
     113    return GuestDnDBase::getFormats(aFormats);
     114#endif /* VBOX_WITH_DRAG_AND_DROP */
     115}
     116
     117HRESULT GuestDnDTarget::addFormats(const std::vector<com::Utf8Str> &aFormats)
     118{
     119#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     120    ReturnComNotImplemented();
     121#else /* VBOX_WITH_DRAG_AND_DROP */
     122
     123    return GuestDnDBase::addFormats(aFormats);
     124#endif /* VBOX_WITH_DRAG_AND_DROP */
     125}
     126
     127HRESULT GuestDnDTarget::removeFormats(const std::vector<com::Utf8Str> &aFormats)
     128{
     129#if !defined(VBOX_WITH_DRAG_AND_DROP) || !defined(VBOX_WITH_DRAG_AND_DROP_GH)
     130    ReturnComNotImplemented();
     131#else /* VBOX_WITH_DRAG_AND_DROP */
     132
     133    return GuestDnDBase::removeFormats(aFormats);
     134#endif /* VBOX_WITH_DRAG_AND_DROP */
     135}
     136
     137// implementation of wrapped IDnDTarget methods.
    93138/////////////////////////////////////////////////////////////////////////////
    94139
     
    127172
    128173    /* Make a flat data string out of the supported format list. */
    129     Utf8Str strFormats = GuestDnD::toFormatString(GuestDnDInst()->supportedFormats(),
    130                                                   aFormats);
     174    Utf8Str strFormats = GuestDnD::toFormatString(m_strFormats, aFormats);
    131175    /* If there is no valid supported format, ignore this request. */
    132176    if (strFormats.isEmpty())
     
    195239
    196240    /* Make a flat data string out of the supported format list. */
    197     RTCString strFormats = GuestDnD::toFormatString(GuestDnDInst()->supportedFormats(),
    198                                                     aFormats);
     241    RTCString strFormats = GuestDnD::toFormatString(m_strFormats, aFormats);
    199242    /* If there is no valid supported format, ignore this request. */
    200243    if (strFormats.isEmpty())
     
    288331
    289332    /* Make a flat data string out of the supported format list. */
    290     Utf8Str strFormats = GuestDnD::toFormatString(GuestDnDInst()->supportedFormats(),
    291                                                   aFormats);
     333    Utf8Str strFormats = GuestDnD::toFormatString(m_strFormats, aFormats);
    292334    /* If there is no valid supported format, ignore this request. */
    293335    if (strFormats.isEmpty())
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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