VirtualBox

Ignore:
Timestamp:
Aug 11, 2020 9:36:37 AM (4 years ago)
Author:
vboxsync
Message:

DnD: Lots of documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDnD.h

    r85371 r85681  
    2929class VBoxDnDWnd;
    3030
     31/**
     32 * Class for implementing IDataObject for VBoxTray's DnD support.
     33 */
    3134class VBoxDnDDataObject : public IDataObject
    3235{
     
    8083                        LONG lindex = -1, DWORD dwAspect = DVASPECT_CONTENT, DVTARGETDEVICE *pTargetDevice = NULL);
    8184
     85    /** Current drag and drop status. */
    8286    Status      mStatus;
     87    /** Internal reference count of this object. */
    8388    LONG        mRefCount;
     89    /** Number of native formats registered. This can be a different number than supplied with m_lstFormats. */
    8490    ULONG       mcFormats;
     91    /** Array of registered FORMATETC structs. Matches m_cFormats. */
    8592    LPFORMATETC mpFormatEtc;
     93    /** Array of registered STGMEDIUM structs. Matches m_cFormats. */
    8694    LPSTGMEDIUM mpStgMedium;
     95    /** Event semaphore used for waiting on status changes. */
    8796    RTSEMEVENT  mEventDropped;
     97    /** Format of currently retrieved data. */
    8898    RTCString   mstrFormat;
     99    /** The retrieved data as a raw buffer. */
    89100    void       *mpvData;
     101    /** Raw buffer size (in bytes). */
    90102    size_t      mcbData;
    91103};
    92104
     105/**
     106 * Class for implementing IDropSource for VBoxTray's DnD support.
     107 */
    93108class VBoxDnDDropSource : public IDropSource
    94109{
     
    125140};
    126141
     142/**
     143 * Class for implementing IDropTarget for VBoxTray's DnD support.
     144 */
    127145class VBoxDnDDropTarget : public IDropTarget
    128146{
     
    153171public:
    154172
     173    /** Returns the data as mutable raw. Use with caution! */
    155174    void *DataMutableRaw(void) const { return mpvData; }
     175
     176    /** Returns the data size (in bytes). */
    156177    size_t DataSize(void) const { return mcbData; }
     178
    157179    RTCString Formats(void) const;
    158180    int WaitForDrop(RTMSINTERVAL msTimeout);
     
    181203};
    182204
     205/**
     206 * Class for implementing IEnumFORMATETC for VBoxTray's DnD support.
     207 */
    183208class VBoxDnDEnumFormatEtc : public IEnumFORMATETC
    184209{
     
    206231private:
    207232
     233    /** Reference count of this object. */
    208234    LONG        m_lRefCount;
     235    /** Current index for format iteration. */
    209236    ULONG       m_nIndex;
     237    /** Number of format this object contains. */
    210238    ULONG       m_nNumFormats;
     239    /** Array of FORMATETC formats this object contains. Matches m_nNumFormats. */
    211240    LPFORMATETC m_pFormatEtc;
    212241};
     
    215244class VBoxDnDWnd;
    216245
    217 /*
     246/**
    218247 * A drag'n drop event from the host.
    219248 */
     
    371400     *  window messages. */
    372401    RTTHREAD                   hThread;
     402    /** Critical section to serialize access. */
    373403    RTCRITSECT                 mCritSect;
     404    /** Event semaphore to wait for new DnD events. */
    374405    RTSEMEVENT                 mEventSem;
    375406#ifdef RT_OS_WINDOWS
     
    393424    bool                       mfMouseButtonDown;
    394425# ifdef VBOX_WITH_DRAG_AND_DROP_GH
    395     /** IDropTarget implementation for guest -> host
    396      *  support. */
     426    /** Pointer to IDropTarget implementation for
     427     *  guest -> host support. */
    397428    VBoxDnDDropTarget         *pDropTarget;
    398429# endif /* VBOX_WITH_DRAG_AND_DROP_GH */
Note: See TracChangeset for help on using the changeset viewer.

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